Doc­u­men­ta­tion/Graph Query Language

UPDATE

The update state­ment set the accord­ing attribute(s) of a spec­i­fied object or object list to a given value.

UPDATE identifier SET ( update_attr_element, [, update_attr_element] ) where_cond
  • In order to update the age of the users with the name SIMPSON:

    UPDATE User SET (Age=39) WHERE User.Name=’SIMPSON’’


update_attr_element

assign_list | remove_list | update_list
  • An update_attr_list con­tains an assign_list or a remove_list or an update_list. It is also pos­si­ble to have an assign_list and a remove_list or an update_list


remove_list

REMOVE ATTRIBUTES ( identifier_list )
  • Removes attribute(s) of an object.


identifier_list

identifier [, identifier]


update_list

add_to_list_update | remove_from_list_update
  • The update list can update an attribute list or remove an attribute list.
  • for exam­ple a list attribute could be a list of friends the fol­low­ing state­ment update the list of friends:

    UPDATE User SET (ADD TO Friends SETOF (Name = ‘Marge’))’

    UPDATE User SET (REMOVE FROM Friends (Name = ‘Bar­ney’))’


add_to_list_update

ADD TO identifier dbobject_list | ADD TO identifier dbobject_set


remove_from_list_update

REMOVE FROM identifier tuple