Skip to content

Commit 9e2e31a

Browse files
committed
Subdocuments headings with WOQL
1 parent b89b0a1 commit 9e2e31a

File tree

1 file changed

+5
-5
lines changed
  • src/app/docs/add-documents-with-woql

1 file changed

+5
-5
lines changed

src/app/docs/add-documents-with-woql/page.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
nextjs:
33
metadata:
4-
title: How to add documents using WOQL
4+
title: How to add and delete documents and subdocuments using WOQL
55
description: >-
6-
A how-to guide with an example showing how to add documents using a WOQL
6+
A how-to guide with an example showing how to add documents and subdocuments using a WOQL
77
query.
88
openGraph:
99
images: >-
@@ -30,7 +30,7 @@ and(isa(v.person, "People"),
3030
insert_document(doc({'@type' : 'Planet', label: v.name})))
3131
```
3232

33-
## Create and link a subdocument
33+
## Create and link a subdocument in WOQL
3434

3535
Subdocuments have two components linking them to their parent, one triple, and one subdocument, which are required by the schema checker to accept the document. The triple links the parent with the subdocument, and the subdocument is linked to the parent using the special property `@linked-by`.
3636

@@ -43,7 +43,7 @@ and(
4343
)
4444
```
4545

46-
## Delete a subdocument
46+
## Delete a subdocument in WOQL
4747

4848
Subdocuments can be deleted using the `delete_document` keyword, but it's important to also delete the triple that links the subdocument from the parent document. Here we resolve the parent document in the variable `v:parentdoc`.
4949

@@ -56,7 +56,7 @@ and(
5656
)
5757
```
5858

59-
## Update a subdocument
59+
## Update a subdocument in WOQL
6060

6161
Let's combine creating and deleting a document into a single query to update the subdocument.
6262

0 commit comments

Comments
 (0)