On Wed, Aug 13, 2008 at 07:06:10PM -0400, Baron Schwartz wrote:
> How about inserting and getting the result back at the same time?
> (Postgres does this already)  Or inserting into two tables at once?
> Or deleting from one table and inserting into another at the same
> time?

I think these could be implemented by batching in the client protocol.

Possible today with NDB through NDBAPI :)

But anyway, how it would work programmatically is something like:

b = new batch;
op1= new insert operation (table,columns,value)
op2 = new insert operation (table,columns,value)
op3 = new update opertaion (foo)
b.send()
b.wait_for_result()
op1.getresult()
op2.getresult()
op3.getresult()

where nothing is sent until b.send() (and even then... client could
batch from multiple threads, so send() really could just queue it to
send... hence wait_for_result).

NOTE: this isn't sending "INSERT foo; DROP TABLE students;", it's one
statement at a time just with a much smarter and more modern protocol.
-- 
Stewart Smith

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to