cayley
cayley copied to clipboard
LinkedQL: Transactions & Update Data
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()
Later on, we can have specific operations for data types:
g.V().increment({ [key: property]: number })