bmuller / twistar

Twistar is an object-relational mapper (ORM) for Python that uses the Twisted library to provide asynchronous DB interaction.
http://findingscience.com/twistar
Other
132 stars 38 forks source link

Change getLastInsertID to use cursor.lastrowid from DB-API instead of hard coded query #56

Closed nocko closed 9 years ago

nocko commented 9 years ago

Perhaps a controversial change? It seems preferable to me to punt this to the DB-API layer for implementation/optimization.

I don't think the SELECT hardcoded on the current implementation works on postgres (untested)... confusingly, this change may not help postgres support... but it doesn't break mysql nor sqlite.

bmuller commented 9 years ago

Merged in ad9125c. Good catch! Thanks!