Skip to content

Commit 8b224db

Browse files
Merge pull request #214 from terminusdb/docs-update
documentation - document interface, add raw_json parameter
2 parents f8f4ac0 + fc41248 commit 8b224db

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

docs/api/typedef.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ the POST document interface query parameters
3232

3333
| Name | Type | Description |
3434
| --- | --- | --- |
35+
| [raw_json] | <code>boolean</code> | default is false, If true, the input documents are treated as raw JSON, inserted as type sys:JSONDocument and are not subject to schema restrictions. |
3536
| [graph_type] | <code>GraphType</code> | default is instance instance|schema Used to switch between getting documents from the instance or the schema graph. |
3637
| [full_replace] | <code>boolean</code> | default is false, If true, all existing documents are deleted before inserting the posted documents. This allows the full replacement of the contents of a database. This is especially useful for replacing the schema. |
3738

@@ -44,6 +45,7 @@ the PUT document interface query parameters
4445

4546
| Name | Type | Description |
4647
| --- | --- | --- |
48+
| [raw_json] | <code>boolean</code> | default is false, If true, the input documents are treated as raw JSON, inserted as type sys:JSONDocument and are not subject to schema restrictions. |
4749
| [graph_type] | <code>GraphType</code> | default is instance, instance|schema Used to switch between getting documents from the instance or the schema graph. |
4850

4951

docs/api/woqlclient.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ and *dataVersion* object if ***getDataVersion*** parameter is true, or an Error
699699
| Param | Type | Description |
700700
| --- | --- | --- |
701701
| json | <code>object</code> | |
702-
| [params] | <code>typedef.DocParamsPost</code> | the post parameters |
702+
| [params] | <code>typedef.DocParamsPost</code> | the post parameters [#typedef.DocParamsPost](#typedef.DocParamsPost) |
703703
| [dbId] | <code>string</code> | the dbid |
704704
| [string] | <code>message</code> | the insert commit message |
705705
| [lastDataVersion] | <code>string</code> | the last data version tracking id. |
@@ -866,7 +866,7 @@ and *dataVersion* object if ***getDataVersion*** parameter is true, or an Error
866866
| Param | Type | Description |
867867
| --- | --- | --- |
868868
| json | <code>object</code> | |
869-
| [params] | <code>typedef.DocParamsPut</code> | the Put parameters |
869+
| [params] | <code>typedef.DocParamsPut</code> | the Put parameters [#typedef.DocParamsPut](#typedef.DocParamsPut) |
870870
| [dbId] | <code>\*</code> | the database id |
871871
| [message] | <code>\*</code> | the update commit message |
872872
| [lastDataVersion] | <code>string</code> | the last data version tracking id. |

lib/typedef.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ const { ACTIONS } = require('./utils');
2727

2828
/**
2929
*@typedef {Object} DocParamsPost - the POST document interface query parameters
30+
*@property {boolean} [raw_json] - default is false, If true, the input documents
31+
are treated as raw JSON, inserted as type sys:JSONDocument and are not subject
32+
to schema restrictions.
3033
*@property {GraphType} [graph_type] - default is instance instance|schema Used to switch between
3134
getting documents from the instance or the schema graph.
3235
*@property {boolean} [full_replace] - default is false, If true, all existing documents are deleted
@@ -36,6 +39,9 @@ const { ACTIONS } = require('./utils');
3639

3740
/**
3841
*@typedef {Object} DocParamsPut - the PUT document interface query parameters
42+
*@property {boolean} [raw_json] - default is false, If true, the input documents
43+
are treated as raw JSON, inserted as type sys:JSONDocument and are not subject
44+
to schema restrictions.
3945
*@property {GraphType} [graph_type] - default is instance, instance|schema Used to switch between
4046
getting documents from the instance or the schema graph.
4147
*/

lib/woqlClient.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ WOQLClient.prototype.updateDatabase = function (dbDoc) {
942942
/**
943943
* to add a new document or a list of new documents into the instance or the schema graph.
944944
* @param {object} json
945-
* @param {typedef.DocParamsPost} [params] - the post parameters
945+
* @param {typedef.DocParamsPost} [params] - the post parameters {@link #typedef.DocParamsPost}
946946
* @param {string} [dbId] - the dbid
947947
* @param {message} [string] - the insert commit message
948948
* @param {string} [lastDataVersion] the last data version tracking id.
@@ -1159,7 +1159,7 @@ WOQLClient.prototype.getDocument = function (params, dbId, branch, lastDataVersi
11591159
/**
11601160
*
11611161
* @param {object} json
1162-
* @param {typedef.DocParamsPut} [params] - the Put parameters
1162+
* @param {typedef.DocParamsPut} [params] - the Put parameters {@link #typedef.DocParamsPut}
11631163
* @param {*} [dbId] - the database id
11641164
* @param {*} [message] - the update commit message
11651165
* @param {string} [lastDataVersion] the last data version tracking id.

0 commit comments

Comments
 (0)