Attach a sql command to transaction

19 views
Skip to first unread message

chrismi...@gmail.com

unread,
Jul 28, 2015, 3:31:17 PM7/28/15
to OrientDB
I am using the PhpOrient driver and am trying to setup transactions. I have everything working fine, until I try to attach a sql command to the transaction.

I am not sure if this is a limitation of the PhpDriver or of Orient itself, or the binary protocol the driver is built upon.

I have also come across SQL Batch, and am not sure the difference between batch and transactions.

Is it possible to attach sql commands to transactions?

My code:
//get the transaction and start it
$tx
= $client->getTransactionStatement();

//BEGIN THE TRANSACTION
$tx
= $tx->begin()

$create
= $client->command("INSERT INTO V set test = 'a'");

$tx
->attach($create);

$result
= $tx->commit();
Reply all
Reply to author
Forward
0 new messages