Skip to content

Commit 1827b98

Browse files
committed
move the commits query method into WOQLLibrary
1 parent 0507f11 commit 1827b98

File tree

5 files changed

+127
-619
lines changed

5 files changed

+127
-619
lines changed

docs/_sidebar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
- [getRoles](api/woqlClient.js?id=getRoles)
5959
- [updateRoles](api/woqlClient.js?id=updateRoles)
6060
- [addDocument](api/woqlClient.js?id=addDocument)
61+
- [queryDocument](api/woqlClient.js?id=queryDocument)
6162
- [getDocument](api/woqlClient.js?id=getDocument)
6263
- [updateDocument](api/woqlClient.js?id=updateDocument)
6364
- [deleteDocument](api/woqlClient.js?id=deleteDocument)

docs/api/woqlClient.js.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,28 @@ const json = [{ "@type" : "Class",
795795
client.addDocument(json,{"graph_type":"schema"},"mydb","add new schema")
796796
```
797797
798+
### queryDocument
799+
#### woqlClient.queryDocument([query], [params], [dbId], [branch]) ⇒ <code>Promise</code>
800+
Retrieves all documents that match a given document template
801+
802+
**Returns**: <code>Promise</code> - A promise that returns the call response object, or an Error if rejected.
803+
804+
| Param | Type | Description |
805+
| --- | --- | --- |
806+
| [query] | <code>object</code> | the query template |
807+
| [params] | <code>typedef.DocParamsGet</code> | the get parameters |
808+
| [dbId] | <code>string</code> | the database id |
809+
| [branch] | <code>string</code> | the database branch |
810+
811+
**Example**
812+
```js
813+
const query = {
814+
"type": "Person",
815+
"query": { "age": 42 },
816+
}
817+
client.queryDocument(query,{"as_list":true})
818+
```
819+
798820
### getDocument
799821
#### woqlClient.getDocument([params], [dbId], [branch]) ⇒ <code>Promise</code>
800822
**Returns**: <code>Promise</code> - A promise that returns the call response object, or an Error if rejected.

0 commit comments

Comments
 (0)