On 15/02/07, Jonathan Mitchem <[EMAIL PROTECTED]> wrote: > Hi Anton - > > Thanks for adding Postgres support to Alchemi. > > There were a few changes I had to make to get SQL Server to work however. > Specifically, there were a few queries in GenericManagerDatabaseStorage that > you had changed that work with Postgres but don't with SQL Server. > > What I did was refactor those queries into their own methods (e.g., > protected virtual string GetPowerUsageSqlQuery() ) within > GenericManagerDatabaseStorage and then overrode the methods in > PostgresqlManagerDatabaseStorage to return the Postgres > version of those same queries. > > You may want to take a look at GenericManagerDatabaseStorage and > PostgresqlManagerDatabaseStorage to see how and what I did. > > You also might want to test to ensure that the changes I made still work > with Postgres. They _should_, but I don't have Alchemi installed on > Postgres here. > > However, once again, thanks.
Hey Jonathan, I had a look and both mysql and sqlserver said they supported cast(myvalue as mytype), in line with the standard... I guess not! Sorry about putting that wee spanner in the works... I will check but from the changelog it would surprise me very much if it didn't work with postgres. At one stage I was contemplating suggesting factoring out all queries but it seemed a pretty big job and as I got it working thought it wasn't necessary :-). I would quite like to have a go at implementing an oodbms, and that will certainly require some refactoring. I have had a look at db4o so far, and it looks very nice. It is fully managed, has a gpl version (the manager is gpl if I remember correctly) and works by opening a file which is written to and/or read from. It is transactional, and would enable us to migrate from one machine to another very easily sending the db file only. It also can work using the client/server model, and means we could almost completely get rid of the persistence abstraction layer. I'll have a go and see how it turns out. Cheers Anton ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Alchemi-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/alchemi-developers
