[Devel] Patch for DB-API / mysql Module

Carsten Bock openser-list at qbiz.de
Thu Oct 19 15:41:34 CEST 2006

Hi Bogdan,

Actually i did add a capability flag in db_cap.h and the API will set 
the flag, if the database-module (e. g. the mySQL module) supports it.
After all, i did not add it to "DB_CAP_ALL", so all existing modules 
should still work even with databases that does not support this 
function (e. g. the usrloc-module). A module, requiring this 
functionality, can check in the capabilities...
Actually, i wanted to keep all existing modules working.... ;-)


Bogdan-Andrei Iancu schrieb:
> Hi Carsten,
> no, the patch was no lost :). I was trying to see if a similar 
> function exists for postgres. Any change in the DB API is translated 
> in updating *all* module implementing it - mysql, postgres, flatstore, 
> dbtext, unixodbc.
> Maybe a better approach is to add a new capability flag for this 
> feature; if supported, the DB module will advertise this flag; see 
> db/db_cap.h
> regards,
> bogdan
> Carsten Bock wrote:
>> Hi everybody,
>> I am not really sure, if anyone excepts me needs this functionality, 
>> but however:
>> I extended the OpenSER-Database-API and the mySQL-Module with an 
>> "last_inserted_id" method. This method returns the last inserted ID 
>> of an INSERT-statement, in case the table has an auto-increment field.
>> I did only implement this functionality in the mySQL module; i took a 
>> look in the PostgreSQL-Docs and i did not find an according 
>> functionality in the postgres-C-API.... (to be honest: since we do 
>> not use postgres in this project, i did not spend too much time 
>> searching...)
>> What do you think?
>> Kind regards,
>> Carsten

More information about the Devel mailing list