@@ -246,51 +246,12 @@ Substring
246
246
| Param | Type | Description |
247
247
| --- | --- | --- |
248
248
| string | <code >string</code > | String or variable |
249
- | before | <code >string </code > | integer or variable (characters from start to begin) |
250
- | [ length] | <code >string </code > | integer or variable (length of substring) |
251
- | [ after] | <code >string </code > | integer or variable (number of characters after substring) |
249
+ | before | <code >number </code > | integer or variable (characters from start to begin) |
250
+ | [ length] | <code >number </code > | integer or variable (length of substring) |
251
+ | [ after] | <code >number </code > | integer or variable (number of characters after substring) |
252
252
| [ substring] | <code >string</code > | String or variable |
253
253
254
254
255
- ### update_object
256
- #### WOQL.update\_ object(JSON) ⇒ <code >WOQLQuery</code >
257
- Updates a document (or any object) in the db with the passed copy
258
-
259
-
260
- | Param | Type | Description |
261
- | --- | --- | --- |
262
- | JSON | <code >string</code > | JSON-LD document |
263
-
264
-
265
- ### delete_object
266
- #### WOQL.delete\_ object(JSON_or_IRI) ⇒ <code >WOQLQuery</code >
267
- Deletes a node identified by an IRI or a JSON-LD document
268
-
269
-
270
- | Param | Type | Description |
271
- | --- | --- | --- |
272
- | JSON_or_IRI | <code >string</code > \| <code >object</code > | IRI or a JSON-LD document |
273
-
274
-
275
- ### read_object
276
- #### WOQL.read\_ object(IRI, output, [ formatObj] ) ⇒ <code >WOQLQuery</code >
277
- Saves the entire document with IRI DocumentIRI into the JSONLD variable
278
-
279
- ** Returns** : <code >WOQLQuery</code > - A WOQLQuery which contains the document retrieval expression
280
-
281
- | Param | Type | Description |
282
- | --- | --- | --- |
283
- | IRI | <code >string</code > | either an IRI literal or a variable containing an IRI |
284
- | output | <code >string</code > | a variable into which the document’s will be saved |
285
- | [ formatObj] | <code >typedef.DataFormatObj</code > | the export format descriptor, default value is JSON-LD |
286
-
287
- ** Example**
288
- ``` js
289
- const [mydoc ] = vars (" mydoc" )
290
- read_object (" doc:a" , mydoc)
291
- // mydoc will have the json-ld document with ID doc:x stored in it
292
- ```
293
-
294
255
### get
295
256
#### WOQL.get(asvars, queryResource) ⇒ <code >WOQLQuery</code >
296
257
Retrieves the exernal resource defined by QueryResource and copies values from it into variables defined in AsVars
@@ -1102,8 +1063,7 @@ Calculates the number of triples of the contents of the resource identified in R
1102
1063
1103
1064
** Example**
1104
1065
``` js
1105
- let [tc] = vars (" s" )
1106
- triple_count (" admin/minecraft/local/_commits" , tc)
1066
+ triple_count (" admin/minecraft/local/_commits" , " v:count" )
1107
1067
// returns the number of bytes in the local commit graph
1108
1068
```
1109
1069
@@ -1365,7 +1325,7 @@ add extra information about the type of the value object
1365
1325
| subject | <code >string</code > | The IRI of a triple’s subject or a variable |
1366
1326
| predicate | <code >string</code > | The IRI of a property or a variable |
1367
1327
| objValue | <code >string</code > \| <code >number</code > \| <code >boolean</code > | an specific value |
1368
- | [ graphRef] | <code >typedef.GraphRef</code > | the resource identifier of a graph possible value are schema/{main - myschema - * } | instance/{main - myschema - * } | inference/{main - myschema - * } |
1328
+ | [ graphRef] | <code >typedef.GraphRef</code > | specify a graph type, default is instance schema | instance |
1369
1329
1370
1330
1371
1331
### link
@@ -1379,7 +1339,7 @@ Creates a pattern matching rule for a quad [Subject, Predicate, Object, Graph] o
1379
1339
| subject | <code >string</code > | The IRI of a triple’s subject or a variable |
1380
1340
| predicate | <code >string</code > | The IRI of a property or a variable |
1381
1341
| object | <code >string</code > | The IRI of a node or a variable, or a literal |
1382
- | [ graphRef] | <code >typedef.GraphRef</code > | the resource identifier of a graph possible value are schema/{main - myschema - * } | instance/{main - myschema - * } | inference/{main - myschema - * } |
1342
+ | [ graphRef] | <code >typedef.GraphRef</code > | specify a graph type, default is instance schema | instance |
1383
1343
1384
1344
1385
1345
### libs
0 commit comments