Skip to content

Commit fb31590

Browse files
committed
remove CSV methods
1 parent b903ddf commit fb31590

File tree

6 files changed

+129
-756
lines changed

6 files changed

+129
-756
lines changed

docs/_sidebar.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
- [Pull](api/woqlClient.js?id=pull)
1414
- [Push](api/woqlClient.js?id=push)
1515
- [Fetch](api/woqlClient.js?id=fetch)
16-
- [Insert CSV](api/woqlClient.js?id=insert-csv)
17-
- [Get CSV](api/woqlClient.js?id=get-csv)
18-
- [Update CSV](api/woqlClient.js?id=update-csv)
19-
- [Delete CSV](api/woqlClient.js?id=delete-csv)
2016
- [customHeaders](api/woqlClient.js?id=customHeaders)
2117
- [copy](api/woqlClient.js?id=copy)
2218
- [server](api/woqlClient.js?id=server)
@@ -90,9 +86,6 @@
9086
- [sub](api/woql.js?id=sub)
9187
- [eq](api/woql.js?id=eq)
9288
- [substr](api/woql.js?id=substr)
93-
- [update_object](api/woql.js?id=update_object)
94-
- [delete_object](api/woql.js?id=delete_object)
95-
- [read_object](api/woql.js?id=read_object)
9689
- [get](api/woql.js?id=get)
9790
- [put](api/woql.js?id=put)
9891
- [as](api/woql.js?id=as)

docs/api/woql.js.md

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -246,51 +246,12 @@ Substring
246246
| Param | Type | Description |
247247
| --- | --- | --- |
248248
| 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) |
252252
| [substring] | <code>string</code> | String or variable |
253253

254254

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-
294255
### get
295256
#### WOQL.get(asvars, queryResource) ⇒ <code>WOQLQuery</code>
296257
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
11021063

11031064
**Example**
11041065
```js
1105-
let [tc] = vars("s")
1106-
triple_count("admin/minecraft/local/_commits", tc)
1066+
triple_count("admin/minecraft/local/_commits", "v:count")
11071067
//returns the number of bytes in the local commit graph
11081068
```
11091069

@@ -1365,7 +1325,7 @@ add extra information about the type of the value object
13651325
| subject | <code>string</code> | The IRI of a triple’s subject or a variable |
13661326
| predicate | <code>string</code> | The IRI of a property or a variable |
13671327
| 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 |
13691329

13701330

13711331
### link
@@ -1379,7 +1339,7 @@ Creates a pattern matching rule for a quad [Subject, Predicate, Object, Graph] o
13791339
| subject | <code>string</code> | The IRI of a triple’s subject or a variable |
13801340
| predicate | <code>string</code> | The IRI of a property or a variable |
13811341
| 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 |
13831343

13841344

13851345
### libs

docs/api/woqlClient.js.md

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -234,76 +234,6 @@ Fetch updates to a remote database to a remote repository with the local databas
234234
| remoteId | <code>string</code> | if of the remote to fetch (eg: 'origin') |
235235
236236
237-
### Insert CSV
238-
#### woqlClient.insertCSV(csvPathList, commitMsg) ⇒ <code>Promise</code>
239-
Inserts a csv from a specified path
240-
241-
**Returns**: <code>Promise</code> - A promise that returns the call response object, or an Error if rejected.
242-
243-
| Param | Type | Description |
244-
| --- | --- | --- |
245-
| csvPathList | <code>array</code> | is an array of csv file names with file path |
246-
| commitMsg | <code>string</code> | Textual message describing the reason for the update |
247-
248-
**Example**
249-
```js
250-
const filePath = ["C:/Users/User Name/Documents/example.csv"]
251-
client.insertCSV(filePath, "inserting a CSV file", "instance", "main")
252-
```
253-
254-
### Get CSV
255-
#### woqlClient.getCSV(csvName) ⇒ <code>Promise</code>
256-
Retrieves the contents of the specified graph as a CSV
257-
258-
**Returns**: <code>Promise</code> - An API success message
259-
260-
| Param | Type | Description |
261-
| --- | --- | --- |
262-
| csvName | <code>string</code> | Name of csv to dump from the specified database to extract |
263-
264-
**Example**
265-
```js
266-
const name = ["example.csv"]
267-
client.getCSV(name, true, "instance", "main")
268-
```
269-
270-
### Update CSV
271-
#### woqlClient.updateCSV(csvPathList, commitMsg) ⇒ <code>Promise</code>
272-
Updates the contents of the specified path with a csv, creating the appropriate
273-
diff object as the commit.
274-
275-
**Returns**: <code>Promise</code> - A promise that returns the call response object, or an Error if rejected.
276-
277-
| Param | Type | Description |
278-
| --- | --- | --- |
279-
| csvPathList | <code>array</code> | Array csvs to upload |
280-
| commitMsg | <code>string</code> | Textual message describing the reason for the update |
281-
282-
**Example**
283-
```js
284-
const filePath = [{fileToBeUpdated: "File.csv", updateWith: "C:/Users/User Name/Documents/example.csv"}]
285-
client.updateCSV(filePath, "updating a CSV file", "instance", "main")
286-
// Here fileToBeUpdated is the CSV in TerminusDB which we are going to update. updateWith includes the file path of the CSV whose contents is going to be updated to fileToBeUpdated. Note that during an Update CSV only
287-
//the diffs are considered and are updated which makes update of big files more efficient.
288-
```
289-
290-
### Delete CSV
291-
#### woqlClient.deleteCSV(csvName, commitMsg) ⇒ <code>Promise</code>
292-
Deletes CSV from your database
293-
294-
**Returns**: <code>Promise</code> - the rest api call results
295-
296-
| Param | Type | Description |
297-
| --- | --- | --- |
298-
| csvName | <code>array</code> | is an array of csv file names |
299-
| commitMsg | <code>string</code> | Textual message describing the reason for the delete |
300-
301-
**Example**
302-
```js
303-
const name = ["example.csv"]
304-
client.deleteCSV(name, "deleting CSV")
305-
```
306-
307237
### local_auth
308238
#### ~~woqlClient.local\_auth~~
309239
***Deprecated***

0 commit comments

Comments
 (0)