6.8.6 Java APIs for Executing UPDATE Queries
The UPDATE
queries make changes to existing graphs using
the INSERT
, UPDATE
, and
DELETE
operations as detailed in the section
Graph Modification of the PGQL 1.3 specification.
Note that INSERT
allows you to insert new vertices and edges into a
graph, UPDATE
allows you to update existing
vertices and edges by setting their properties to new values,
and DELETE
allows you to delete vertices and
edges from a graph.
- Updatability of Graphs Through PGQL
Graph data that is loaded from the Oracle RDBMS or from CSV files into the PGX is not updatable through PGQL right away. - Executing UPDATE Queries against a Graph in the in-memory Graph Server (PGX)
To executeUPDATE
queries against a graph, use thePgxGraph.executePgql(String query)
method. - Executing UPDATE Queries Against a PGX Session
For now, there is no support for executingUPDATE
queries against aPgxSession
and therefore, updates always have to be executed against a PgxGraph. To obtain a graph from a session, use thePgxSession.getGraph(String graphName)
method. - Altering the Underlying Schema of a Graph
TheINSERT
operations can only insert vertices and edges with known labels and properties. Similarly,UPDATE
operations can only set values of known properties. Thus, new data must always conform to the existing schema of the graph.