From cdbe41afaabdde1c10187f12e2c35f2d2d61bcdd Mon Sep 17 00:00:00 2001 From: AyeshaFirdausTG Date: Thu, 20 Nov 2025 02:34:40 +0530 Subject: [PATCH 1/2] DOC-2122-insert-into-[4.2] --- modules/querying/pages/data-modification-statements.adoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/querying/pages/data-modification-statements.adoc b/modules/querying/pages/data-modification-statements.adoc index bfaca6ca..b356c61f 100644 --- a/modules/querying/pages/data-modification-statements.adoc +++ b/modules/querying/pages/data-modification-statements.adoc @@ -285,7 +285,10 @@ will produce the following result: == `INSERT INTO` Statement The `INSERT INTO` statement adds edges or vertices to the graph. -When the ID value(s) for the inserted vertex/edge match those of an existing vertex/edge, the new values will overwrite the old values. +When the ID value(s) of the inserted vertex or edge match an existing one, the new value(s) are updated depending on the attribute type: + +* **Primitive attributes** — the new value will overwrite the old value. +* **Collection attributes (`LIST`, `SET`, `MAP`)** — the new value(s) are appended to the old value. To insert an edge, its endpoint vertices must already exist, either before running the query or inserted earlier in that query. The `INSERT INTO` statement can be used as a query-body-level statement or a DML-sub statement. From 7c524e5372dd47f0b29748f1f045a6b363cb552e Mon Sep 17 00:00:00 2001 From: AyeshaFirdausTG Date: Thu, 25 Jun 2026 22:58:17 +0530 Subject: [PATCH 2/2] Update data-modification-statements.adoc --- modules/querying/pages/data-modification-statements.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/querying/pages/data-modification-statements.adoc b/modules/querying/pages/data-modification-statements.adoc index b356c61f..3e91900c 100644 --- a/modules/querying/pages/data-modification-statements.adoc +++ b/modules/querying/pages/data-modification-statements.adoc @@ -287,8 +287,9 @@ will produce the following result: The `INSERT INTO` statement adds edges or vertices to the graph. When the ID value(s) of the inserted vertex or edge match an existing one, the new value(s) are updated depending on the attribute type: -* **Primitive attributes** — the new value will overwrite the old value. -* **Collection attributes (`LIST`, `SET`, `MAP`)** — the new value(s) are appended to the old value. +* **Primitive attributes** — The new value will overwrite the old value. +* **Collection attributes (`LIST`, `SET`, `MAP`)** — the new value(s) are appended to the old value. This behavior is similar to xref:gsql-ref:ddl-and-loading:creating-a-loading-job.adoc#_loading_a_list_or_set_attribute[cumulative loading for collection attributes]. + To insert an edge, its endpoint vertices must already exist, either before running the query or inserted earlier in that query. The `INSERT INTO` statement can be used as a query-body-level statement or a DML-sub statement.