Re: Patch for MS SQL Server 2000 via ODBC
Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Fri, 4 Nov 2005 13:02:05 -0700
| Newsgroups | gmane.lisp.clsql.devel |
|---|---|
| Message-ID | <[email protected]> |
lisp wrote: > The attached patches are for an interface to Microsoft SQL Server 2000 > via the ODBC interface. > They implement an underlying database type :mssqlserver for the generic > odbc interface. > The patches are relative to the 3.3.0 release. Hi Dominic, This is an interesting patch. In general, I'm glad to add support for MSSQL, though I have some relucatance in that I don't have MSSQL available to me and I'm not able to help with development and testing. Nonetheless, I think it is a win to add support for MSSQL. > This code has been tested on LispWorks Pro 4.4.5 on Windows XP. > The unit tests (with minor modifications and exclusions) all pass ok > with MS SQL Server. That's good, thanks for that information. > I've tried not to break anything else, but I don't have the other > backends set up to be able to test against them. Not breaking is good, but I think your patch needs to be more integrated (see below). > This is the first time I've created a patch so please bear with me if > there any howlers in here. In the future, it'd be easier to submit a single, recursive unified diff. Such as: diff -ur clsql-3.3.x my-clsql-tree > patchfile I see a few issues with your patch. First, since the interface is odbc, it would be perferred is your patch did not create a new backend but rather was integrated into the current odbc backend. ODBC backends do vary in functionality. That's why I store the odbc-db-type so behaviour can be accounted for at runtime. I see that you override some of the generic functions to express the characteristics of MSSQL. That's good. However, rather than creating a whole new backend, could you set and use odbc-db-type to control the behavior of the ODBC backend? The odbc db type is stored in the STORE-TYPE-OF-CONNECTED-DATABASE function in odbc-sql.lisp. I set some of the odbc backend in sql/generic-odbc.lisp so that both the db-odbc and db-aodbc backends can share the same logic. That'd probably be the best place to put some of the MSSQL-specific behavior. I expect that Allegro's aodbc can talk to MSSQL via ODBC fine. Second, rather than :mssqlserver, I perfer :mssql as a type. It's shorter and the 'server' component of your name doesn't do anything to uniquely identify one SQL server engine from another. Thanks again for the contribution. I look forward to hearing your thoughts about integrating your MSSQL support into the current ODBC backend. Kevin > _______________________________________________ > CLSQL-Devel mailing list > [email protected] > http://lists.b9.com/mailman/listinfo/clsql-devel -- Kevin Rosenberg kevin-HJRc7zDS/[email protected]