> Where for MySQL, SQlite sequence is ignored,
> for Postgresql, Oracle and MS SQL it is fetched *after* the statement
> and for firebid it is fetched **before** insert statemet.

I'm not convinced this will work.
What about concurrent inserts? Won't the optimistic "get id in
advance" return the same id twice when the actual inserts will use
unique ids?
What about inserting multiple rows? Won't the "get id in advance"
method return the id of the first inserted row while the "get id
after the fact" return the last inserted row's id? Aren't both
wrong? Shouldn't we get multiple ids?
What about failed inserts? What about triggers that manipulate the
id during the insert?

What problem are we solving by returning the id in any case?
Couldn't this be better dealt with by providing the id in the first
place instead of using identity fields? Couldn't this be dealt with
by using stored procedures?

best regards,

    Sören


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to