future database support
Gustavo Niemeyer
gustavo at niemeyer.net
Mon Jul 16 23:43:52 BST 2007
Greetings!
> Hi I play with storm over a couple of days and it is a joy. I also
> start to play to add support for SQL Server with pyodbc and basic
> stuff I got working.
Nice! How's it coming?
> The only problem that I did not solved and which is kind of big is to
> get after "INSERT stmt" last_insert_row ID. For now I issued a sql
> stmt wiht MAX(primary_key) column and it works but as you know it's a
> weak approach.
Indeed..
> There is way to avoid this , SQL Server requires to set like
> self._connection.execute('SET IDENTITY_INSERT %s ON' % cls_info.table)
> before insert and set it off after
> self._connection.execute('SET IDENTITY_INSERT %s OFF' % cls_info.table)
>
> I try to add this code in store.py (line 322) but kept getting sql server
> errors(545) I think is something to do about session
> bec. you can issue above code only for one table per session
All of these customizations should be doable from the backend, since
the backend can tweak queries at will, and also intercept executed
statements.
You're welcome to ask about these topics online at #storm on FreeNode,
if you're interested.
--
Gustavo Niemeyer
http://niemeyer.net
More information about the storm
mailing list