On Feb 26, 2009, at 3:55 PM, phrrn...@googlemail.com wrote:

>
> I am doing some work on a SA engine for Sybase Adaptive Server
> Enterprise (ASE) on top of both pyodbc and the Sybase DB-API driver.
> The existing sybase engine for SA only works with Sybase Anywhere
> (ASA).

that is correct ; I've recently had to take a look at this driver and  
realized that it was not really written for Sybase at all, and the  
original author is whereabouts unknown.   To that end I would like it  
to be replaced with an actual Sybase driver.

> There is a problem with named parameters with the Sybase driver in
> that the placeholders are prepended with an '@' *and* the execute
> method expects any dict paramers to have have keys that also have an
> '@'. I was able  to get the placeholders generated correctly by
> subclassing the compiler. Any suggestions on how to get the execute
> method to work nicely or do I have to do some much around with copying
> parameters or monkeypatching the Sybase module with an implementation
> of execute that will work with 'ordinary' dictionaries?

the attached patch, which represents my partial progress, addresses  
this.  Unfortuantely I was not able to continue since I was developing  
from a Mac to a development server, and it turns out that connecting  
with the Sybase driver using FreeTDS renders bind parameters  
inoperable.  After several days of attempting to get the developer  
edition of sybase ASE running in a virtual linux environment  
(apparently only works on older versions of ubuntu/fedora, but even  
after installing those, I was unsuccessful), I gave up.

If you have access to a working Sybase ASE environment, you can have  
full reign over the sybase.py dialect - anything specific to SQL  
Anywhere can be removed, since its an obsolete product and if it were  
supported, it would be in its own dialect.     The Sybase driver may  
be targeted towards the 0.6 release of SQLAlchemy.  Version 0.6 is  
oriented around a dialect refactor and schema expression refactor  
(there are no ORM changes) and would be a much better place to start  
building out new drivers - there are some significant differences in  
how dialects are constructed between 0.5 versus 0.6.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: sybase.patch
Description: Binary data



Reply via email to