incubator-empire-db-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrew cooke <>
Subject Retrieving auto-generated keys after insert
Date Thu, 01 Oct 2009 23:45:35 GMT

I realise that this is a complex problem, and that each database
engine has a different solution, but does Empire DB provide any
uniform way to retrieve the key for an insert if it has been

Looking at the API I can see several related functions, but I can't
work out what the standard approach should be.  Maybe related - I
cannot work out how to create and insert a record, only retrieve or
modify one (I thought that if I could insert a record then I could
read the key from the record, which might be how it is supposed to
work - obviously I can use a "raw" SQL insert to insert data, but then
I am back with the key problem)

Anyway, if this is possible, I would love to know how.  Sorry if I've
missed something obvious - I've been looking through the docs and
googling, but I really can't find the answer...

Otherwise, I really like the library.  It's like SQLAlchey, but
simpler (thankfully!)


PS If there is no uniform way I can live with a HSQLDB specific
solution if someone happens to know what that might be.

View raw message