cayley icon indicating copy to clipboard operation
cayley copied to clipboard

LinkedQL: Transactions & Update Data

Open iddan opened this issue 6 years ago • 1 comments

Description Currently, data can only be queried with LinkedQL. With this change data can be edited with LinkedQL using transactions. API

// start a new transaction
g.tx().start()
// Add an additional properties, don't remove existing
g.V().update({ [key: property]: value })
// Remove existing properties, add new properties
g.V().set({ [key: property]: value })
// Remove existing properties
g.V().unset(property)
// commit the active transaction
g.tx().commit()

iddan avatar Oct 13 '19 11:10 iddan

Later on, we can have specific operations for data types:

g.V().increment({ [key: property]: number })

iddan avatar Oct 13 '19 11:10 iddan