You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usage of this API would probably look just like db.query() does today, so that you could get back results and continue to make queries based on them, except that you'd have to explicitly begin and commit the transaction for the effects to persist. (Or for efficiency, explicitly rollback instead of letting it expire.)
How should that be implemented? E.g. a db.beginTransaction() method that returns a Transaction object that has query(), commit(), and rollback() methods? Or have beginTransaction() return a transaction ID, that you could optionally pass to db.query(), db.commitTransaction(), and db.rollbackTransaction()? Or something different altogether?
The REST API implementation of transactional Cypher queries is different than regular Cypher, so that'll need updating too.
The text was updated successfully, but these errors were encountered:
I like the "returning a Transaction" idea. You can set batch size and automatically batch requests for the client. That's how I did it in https://github.com/wfreeman/cq (although the underlying API was already built-out for me, so I didn't have much choice if I wanted to use it.) I set the default batch size to 100 statements, and built-in automatic keepalives for transactions if they were still alive in my client, which felt like the right thing to do, although some people might argue against that.
New in Neo4j 2.0.
Usage of this API would probably look just like
db.query()
does today, so that you could get back results and continue to make queries based on them, except that you'd have to explicitly begin and commit the transaction for the effects to persist. (Or for efficiency, explicitly rollback instead of letting it expire.)How should that be implemented? E.g. a
db.beginTransaction()
method that returns aTransaction
object that hasquery()
,commit()
, androllback()
methods? Or havebeginTransaction()
return a transaction ID, that you could optionally pass todb.query()
,db.commitTransaction()
, anddb.rollbackTransaction()
? Or something different altogether?The REST API implementation of transactional Cypher queries is different than regular Cypher, so that'll need updating too.
The text was updated successfully, but these errors were encountered: