OpenGamma / ElSql

Manage external SQL files in Java with a little DSL goodness
Other
101 stars 26 forks source link

More generic support for SQL Server #12

Open andrewdmay opened 9 years ago

andrewdmay commented 9 years ago

Is there anything in the SqlServer2008 configuration that is known to be specific to the 2008 version of SQL Server? If not, it would be preferable to have a generic SqlServer config, and SqlServer2008 could be an alias for that (for anyone who is already using it).

I'm willing to put in a pull request if it sounds like a reasonable change. Thanks, Andrew

jodastephen commented 9 years ago

I believe that there is something in there that doesn't work on earlier versions, but it should be OK for later ones. An alias with suitable caveats sounds reasonable.

andrewdmay commented 9 years ago

Any idea what it is that's incompatible with earlier versions of SQL Server - we have to support SQL Server 2005 (but typically develop against 2008 or later). We're not currently using the paging functionality, but it might be useful for later as we move more of the codebase to ElSql.

jodastephen commented 9 years ago

No idea I'm afraid. If you can test the various bits of SQL on 2005 that would be great as we can then document the issues.

jimmoores commented 9 years ago

I think it was the new date and time types.

andrewdmay commented 9 years ago

We're going to try and spin up a test SQL Server 2005 instance so that we can test the paging SQL. When you mention date and time types, is that elsewhere in OpenGamma? We are only using the ElSql module, so we only need to determine if the paging works in older versions of SQL Server.

jodastephen commented 9 years ago

ElSql doesn't know about date and time types so that must have been OpenGamma. So it might be that the OpenGamma restriction caused an unecessary restriction in ElSql.

Basically, the database specific stuff is defined in the config class. Providing these elements work in SQL server 2005 you should be fine. The rest of ElSql is standard SQL or just passing your SQL around.

Looking forward to hearing your results!

jimmoores commented 9 years ago

Yes, actually, the date and times thing must have been a deeper OG code restriction. From what I can tell from looking at the code, the 2008 pagination should work on 2005. I guess your experiment will find out one way or the other definitively.