JavaScript LABKEY.Query API and Database transactions

LabKey Support Forum (Inactive)
JavaScript LABKEY.Query API and Database transactions Matthew Bellew  2012-11-06 08:29
Status: Closed
 
Unfortunately, using transactions from JavaScript is impossibly problematic. It's very bad to have a long running transaction and disastrous to have one that is not closed, either because of a javascript bug, or the user walking away, or even just closing a browser tab.

This would require building a server-side java action to accomplish all the transacted steps in one call.

Matt

PS: the transaction id returned by executeSQL refers to the http transaction (send->receive) and can be used to cancel the request.

PPS: prepare transaction is related to transactions that cross server boundaries (e.g. getting a postgres server and a sql server to commit a transaction together). it doesn't help us here.