@@ -226,7 +226,7 @@ WOQLClient.prototype.resource = function(type, val) {
226
226
* @param {object } config - see constructor for structure
227
227
* @return {Promise }
228
228
* @public
229
- *
229
+ *
230
230
*/
231
231
WOQLClient . prototype . connect = function ( config ) {
232
232
if ( config ) this . connectionConfig . update ( config )
@@ -369,7 +369,7 @@ WOQLClient.prototype.updateTriples = function(gtype, gid, turtle, commit_msg) {
369
369
370
370
371
371
/**
372
- * Appends the passed turtle to the contents of a graph
372
+ * Appends the passed turtle to the contents of a graph
373
373
*
374
374
* @param {string } gtype type of graph |instance|schema|inference|
375
375
* @param {string } gid TerminusDB Graph ID to update, main is the default value
@@ -393,6 +393,33 @@ WOQLClient.prototype.insertTriples = function(gtype, gid, turtle, commit_msg) {
393
393
)
394
394
}
395
395
396
+
397
+ /**
398
+ * Appends the passed turtle to the contents of a graph
399
+ *
400
+ * @param {string } gtype type of graph |instance|schema|inference|
401
+ * @param {string } gid TerminusDB Graph ID to update, main is the default value
402
+ * @param {string } csv is an array of csv file names
403
+ * @param {string } commit_msg Textual message describing the reason for the update
404
+ * @return {Promise }
405
+ */
406
+
407
+ //DispatchRequest(url, action, payload, local_auth, remote_auth = null, files) {
408
+ WOQLClient . prototype . addCSV = function ( gtype , gid , csv , commit_msg ) {
409
+ if ( commit_msg && csv ) {
410
+ let commit = this . generateCommitInfo ( commit_msg )
411
+ return this . dispatch (
412
+ CONST . ADD_CSV ,
413
+ this . connectionConfig . dbURL ( ) ,
414
+ commit ,
415
+ files = csv
416
+ )
417
+ }
418
+ }
419
+
420
+
421
+
422
+
396
423
/**
397
424
* Executes a WOQL query on the specified database and returns the results
398
425
*
@@ -586,7 +613,7 @@ WOQLClient.prototype._load_db_prefixes = function(dbs) {
586
613
ndb . prefix_pairs = { }
587
614
}
588
615
if ( row [ 'Prefix_' + j ] && row [ 'Prefix_' + j ] [ '@value' ] && row [ 'IRI_' + j ] [ "@value" ] ) {
589
- ndb . prefix_pairs [ row [ 'Prefix_' + j ] [ "@value" ] ] = row [ 'IRI_' + j ] [ "@value" ]
616
+ ndb . prefix_pairs [ row [ 'Prefix_' + j ] [ "@value" ] ] = row [ 'IRI_' + j ] [ "@value" ]
590
617
}
591
618
}
592
619
}
@@ -598,8 +625,8 @@ WOQLClient.prototype._load_db_prefixes = function(dbs) {
598
625
/**
599
626
* Not yet released - subject to change in parameters
600
627
* The class frame API endpoint is not yet sufficiently stable for release
601
- * It should be considered unreliable and subject to change in parameters until
602
- * it has been released
628
+ * It should be considered unreliable and subject to change in parameters until
629
+ * it has been released
603
630
*/
604
631
605
632
/**
@@ -621,12 +648,12 @@ WOQLClient.prototype.getClassFrame = function(cls) {
621
648
622
649
623
650
/***
624
- * Server Version API
651
+ * Server Version API
625
652
* Note: the below endpoints are not part of the terminusdb desktop package
626
- * they belong to the server package version of the DB which is under construction.
653
+ * they belong to the server package version of the DB which is under construction.
627
654
* Until that package is released all of the below endpoints should be considered
628
655
* as unreliable and subject to change - they are provided complete with the desktop
629
- * version to show users what is coming and to allow people to use them at their own risk
656
+ * version to show users what is coming and to allow people to use them at their own risk
630
657
* Any use of them should be considered unsupported and at your own risk
631
658
*/
632
659
0 commit comments