Skip to content

Commit d0283ca

Browse files
Merge pull request #194 from terminusdb/fix-woql-docs
Fixed woql docs
2 parents 57c3048 + 5ad0784 commit d0283ca

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

docs/api/woql.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Logical conjunction of the contained queries - all queries must match or the ent
7676
//a start_station Start, and that start_station is labeled Start_Label
7777
let [Journey, Start, Start_Label] = vars("Journey", "Start", "Start_Label")
7878
WOQL.and(
79-
WOQL.triple(Journey, "type", "scm:Journey"),
79+
WOQL.triple(Journey, "rdf:type", "@schema:Journey"),
8080
WOQL.triple(Journey, "start_station", Start),
8181
WOQL.triple(Start, "label", Start_Label))
8282
```
@@ -195,7 +195,7 @@ Specifies the graph resource to write the contained query into
195195
**Example**
196196
```javascript
197197
//Subq is an argument or a chained query
198-
using("admin/minecraft").into("instance/main").add_triple("a", "type", "scm:X")
198+
using("admin/minecraft").into("instance/main").add_triple("a", "rdf:type", "@schema:X")
199199
//writes a single tripe (doc:a, rdf:type, scm:X) into the main instance graph
200200
```
201201

@@ -453,8 +453,8 @@ Deletes a single triple from the graph [Subject, Predicate, Object, Graph]
453453

454454
**Example**
455455
```javascript
456-
remove the class Person from the schema/main graph
457-
WOQL.delete_quad("Person", "type", "owl:Class", "schema/main")
456+
remove the class Person from the schema graph
457+
WOQL.delete_quad("Person", "rdf:type", "sys:Class", "schema")
458458
```
459459

460460
## add_triple
@@ -1051,7 +1051,7 @@ Creates a count of the results of the query
10511051
**Example**
10521052
```javascript
10531053
let [count, Person] = vars("count", "Person")
1054-
WOQL.count(count).triple(Person, "type", "scm:Person")
1054+
WOQL.count(count).triple(Person, "rdf:type", "@schema:Person")
10551055
```
10561056

10571057
## typecast
@@ -1261,7 +1261,7 @@ optionally into the specified graph
12611261
**Example**
12621262
```javascript
12631263
insert("mydoc", "MyType")
1264-
//equivalent to add_triple("mydoc", "type", "MyType")
1264+
//equivalent to add_triple("mydoc", "rdf:type", "@schema:MyType")
12651265
```
12661266

12671267
## graph

lib/woql.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ WOQL.distinct = function (...varNames) {
8383
* //a start_station Start, and that start_station is labeled Start_Label
8484
* let [Journey, Start, Start_Label] = vars("Journey", "Start", "Start_Label")
8585
* WOQL.and(
86-
* WOQL.triple(Journey, "type", "scm:Journey"),
86+
* WOQL.triple(Journey, "rdf:type", "@schema:Journey"),
8787
* WOQL.triple(Journey, "start_station", Start),
8888
* WOQL.triple(Start, "label", Start_Label))
8989
*
@@ -191,7 +191,7 @@ WOQL.from = function (graphRef, query) {
191191
* @returns {WOQLQuery} A WOQLQuery which will be written into the graph in question
192192
* @example
193193
* //Subq is an argument or a chained query
194-
* using("admin/minecraft").into("instance/main").add_triple("a", "type", "scm:X")
194+
* using("admin/minecraft").into("instance/main").add_triple("a", "rdf:type", "@schema:X")
195195
* //writes a single tripe (doc:a, rdf:type, scm:X) into the main instance graph
196196
*
197197
*/
@@ -424,8 +424,8 @@ WOQL.delete_triple = function (subject, predicate, object) {
424424
* @param {string} object - The IRI of a node or a variable, or a literal
425425
* @param {typedef.GraphRef} graphRef - A valid graph resource identifier string
426426
* @returns {WOQLQuery} - A WOQLQuery which contains the Delete Quad Statement
427-
* @example remove the class Person from the schema/main graph
428-
* WOQL.delete_quad("Person", "type", "owl:Class", "schema/main")
427+
* @example remove the class Person from the schema graph
428+
* WOQL.delete_quad("Person", "rdf:type", "sys:Class", "schema")
429429
*/
430430
WOQL.delete_quad = function (subject, predicate, object, graphRef) {
431431
return new WOQLQuery().delete_quad(subject, predicate, object, graphRef);
@@ -975,7 +975,7 @@ WOQL.immediately = function (subquery) {
975975
* @returns {WOQLQuery} A WOQLQuery object containing the count sub Query
976976
* @example
977977
* let [count, Person] = vars("count", "Person")
978-
* WOQL.count(count).triple(Person, "type", "scm:Person")
978+
* WOQL.count(count).triple(Person, "rdf:type", "@schema:Person")
979979
*/
980980
WOQL.count = function (countVarName, subquery) {
981981
return new WOQLQuery().count(countVarName, subquery);
@@ -1186,7 +1186,7 @@ WOQL.node = function (nodeid, chainType) {
11861186
* @returns {WOQLQuery} A WOQLQuery which contains the insert expression
11871187
* @example
11881188
* insert("mydoc", "MyType")
1189-
* //equivalent to add_triple("mydoc", "type", "MyType")
1189+
* //equivalent to add_triple("mydoc", "rdf:type", "@schema:MyType")
11901190
*/
11911191
WOQL.insert = function (classId, classType, graphRef) {
11921192
return new WOQLQuery().insert(classId, classType, graphRef);

0 commit comments

Comments
 (0)