The comment here says I can use LightSpeed, which I've downloaded and installed. Then I get to this screen:
And I'm not sure what to do. I'm not too familiar with connection strings, first of all. I found this, but... I think "Model assembly" and "Unit of work class" are required. I don't have any DLL's and I'm not working with LightSpeed models, so I'm not sure this is even useful.
The IQ addon Driver works great with my MySQL database. Really easy to set up and use. Are there any drivers that work with PostgreSQL yet? Looks like you can add them by choosing an "*.lpx" file.
I've developed a dynamic LINQPad driver for PostgreSQL databases. Using it you can query the database without the necessity to define your model first (similar to the IQ or the built in LINQ to SQL driver).
You can find it on GitHub:
https://github.com/fknx/linqpad-postgresql-driver
The LightSpeed driver is a static driver, meaning that you must first create a model (and hence a typed DataContext) using the LightSpeed tools.
If you just want to query PostgreSQL in LINQ, you need a dynamic LINQPad driver which no-one has written has yet, AFAIK.
Related
I'm interested to use an AnsiDialect from spring-data-jdbc to connect to my Oracle database using a proprietary driver. However, this dialect is not present in spring-data-jpa (only contains dialects from hibernate)
Is there a way to do this, or do I need to implement my own dialect?
By the looks of it, it seem that the equivalent of AnsiDialect is simply org.hibernate.dialect.Dialect. Don't know why I didn't think about this :)
I am new to Solr with the specific need to crawl existing database table and generate results.
Any online example/tutorial so far only explains about you give documents and it gets indexed, but not any indication of how to do same on database.
Can anyone please explain steps how to achieve this ?
Links like this wiki shows everything with jdbc driver and mysql so I even doubt if Solr supports this with .NET or not. My tech boundries are in C# and Postgresql
You have stumpled over the included support for JDBC already, but you have to use the postgres JDBC driver. The example will be identical with the MySQL one, but you'll have to use the proper URL for postgres instead and reference the JDBC driver (which will depend on which Postgres JDBC driver you use).
jdbc:postgresql://localhost/test
This is a configuration option in Solr, and isn't related to .NET or other external dependencies.
However, the other option is to write the indexing code yourself, and this can often be a good solution as it makes it easier to pre-process the content and apply certain logic before storing content in Solr. For .NET you have Solrnet, a Solr client, that'll make it easy to both query from and submit documents to Solr.
In my persistence code all through out the tables, etc. I have the following import
import scala.slick.driver.PostgresDriver.simple._
This is nice because it works, but this is a problem because all my code is bound to Postgres exclusively. If I want my production to do Postgres and my test to be HSQLDB, for example, I can't. I'd like to declare which DataSource/Driver when I'm running my persistence manager (which will do the create) instead of at the table declaration. What am I missing?
This is certainly possible using the cake pattern. My team uses H2 in development and MySQL in production.
See MultiDBExample and MultiDBCakeExample in https://github.com/slick/slick-examples
As far as I was able to find, I think this is a definite restriction in Slick. So much so that I dropped my test environments database and switched it to the same type as my production one. In retrospect, this is what I should have been doing in the first place, but I do understand this is sometimes easier said than done.
We are using FluentMongo and now that LINQ support has been added into the C# driver, we are going to remove the dependency on Fluent and go with the official C# driver alone.
Has anyone done this already, and was it simple and straightforward? Is there anything we need to be looking out for?
Hopefully others will report back to you as well, but as the implementer of the LINQ support in the 1.4 C# driver I can tell you a bit about what to expect.
Overall you can expect some features to be missing and some new ones to be present. One difference is that the official C# driver only supports LINQ queries that can be mapped to reasonably equivalent MongoDB queries. The FluentMongo library would handle some LINQ queries that didn't have MongoDB equivalent queries with techniques like building Javascript where clauses or dynamically building map/reduce jobs. The official C# driver is not going to do that, because we don't want deceptively simple looking LINQ queries to have unexpectedly inefficient implementations.
In the future we are looking at mapping certain types of LINQ queries onto the new aggregation framework coming in the 2.2. release of the server.
If you run into any issues porting to the 1.4 C# driver please report them at https://jira.mongodb.org/browse/CSHARP and we will look at them as quickly as possible.
I am trying to create a website using Symfony and PostgreSQL. I cant find any documentation that shows how to do this. All the documentation assumes the backend db is mySQL.
Anyone knows how to do this?
If you are using Doctrine, just use a dsn for pgSQL in your databases.yml, like this :
pgsql:dbname=testdb;host=127.0.0.1
It use the PDO syntax. Check the Doctrine documentation and PDO documentation.
Symfony uses 3rd-parties ORMs for DB communication which provide abstraction layer over RDBMS specific architecture. Basically everything you have to do is to change Doctrine's/Propel's driver name, so in /config/databaes.yml set pgsql instead of mysql and you're done.
The full answer (took me about an hour to figure this out) is:
Modify database.yml as described here (see under Propel or Doctrine)
(assuming you're using the Propel ORM like I am) Modify propel.ini as shown below (undocumented AFAIK)
Look for a section in your propel.ini names ;mysql options
comment the mysql options out - otherwise the generated SQL is a mix of postgresql and mysql - which confuses the hell out of psql.