@@ -397,14 +397,14 @@ WOQLClient.prototype.insertTriples = function(gtype, gid, turtle, commit_msg) {
397397 * Inserts a csv from a specified path
398398 *
399399 * @param {array } csv_path is an array of csv file names with file path
400- * @param {string } commitMsg Textual message describing the reason for the update
400+ * @param {string } commit_msg Textual message describing the reason for the update
401401 * @param {string } gtype type of graph |instance|schema|inference|
402402 * @param {string } gid TerminusDB Graph ID to update, main is the default value
403403 * @return {Promise } An API success message
404404 */
405405WOQLClient . prototype . insertCSV = function ( csv_path , commit_msg , gtype , gid ) {
406- if ( commitMsg && csv_path ) {
407- let commit = this . generateCommitInfo ( commitMsg )
406+ if ( commit_msg && csv_path ) {
407+ let commit = this . generateCommitInfo ( commit_msg )
408408 const formData = new FormData ( ) ;
409409 csv_path . map ( ( item ) => {
410410 if ( typeof ( item . name ) == "string" ) {
@@ -429,17 +429,17 @@ WOQLClient.prototype.insertCSV = function(csv_path, commit_msg, gtype, gid) {
429429 * Updates the contents of the specified path with a csv, creating the appropriate
430430 * diff object as the commit.
431431 *
432- * @param {array } csvPaths Array csvs to upload
433- * @param {string } commitMsg Textual message describing the reason for the update
432+ * @param {array } csv_path Array csvs to upload
433+ * @param {string } commit_msg Textual message describing the reason for the update
434434 * @param {string } gtype type of graph |instance|schema|inference|
435435 * @param {string } gid TerminusDB Graph ID to update, main is the default value
436436 * @return {Promise } An API success message
437437 */
438- WOQLClient . prototype . updateCSV = function ( csv , commit_msg , gtype , gid ) {
439- if ( commitMsg && csv ) {
440- let commit = this . generateCommitInfo ( commitMsg )
438+ WOQLClient . prototype . updateCSV = function ( csv_path , commit_msg , gtype , gid ) {
439+ if ( commit_msg && csv_path ) {
440+ let commit = this . generateCommitInfo ( commit_msg )
441441 const formData = new FormData ( ) ;
442- csv . map ( ( item ) => {
442+ csv_path . map ( ( item ) => {
443443 formData . append ( item . fileToBeUpdated , item . updateWith )
444444 } )
445445 formData . append ( 'payload' , JSON . stringify ( commit ) )
@@ -454,23 +454,22 @@ WOQLClient.prototype.updateCSV = function(csv, commit_msg, gtype, gid) {
454454/**
455455 * Retrieves the contents of the specified graph as a CSV
456456 *
457- * @param {string } csvName Name of csv to dump from the specified database to extract
458- * @param {string } csvDirectory CSV output directory path. (defaults to current directory).
457+ * @param {string } csv_name Name of csv to dump from the specified database to extract
459458 * @param {string } download flag to download csv file
460459 * @param {string } gtype Type of graph (instance|schema|inference)
461460 * @param {string } gid identifier.
462461 * @return {Promise } An API success message
463462 *
464463 */
465- WOQLClient . prototype . getCSV = function ( csvName , download , gtype , gid ) {
464+ WOQLClient . prototype . getCSV = function ( csv_name , download , gtype , gid ) {
466465 let options = { } , filePath
467- options . name = csvName ;
466+ options . name = csv_name ;
468467 return this . dispatch ( CONST . GET_CSV , this . connectionConfig . csvURL ( gtype , gid ) , options ) . then ( results => {
469468 if ( download ) {
470469 const url = window . URL . createObjectURL ( new Blob ( [ results ] ) ) ;
471470 const link = document . createElement ( 'a' ) ;
472471 link . href = url ;
473- link . setAttribute ( 'download' , csvName ) ;
472+ link . setAttribute ( 'download' , csv_name ) ;
474473 document . body . appendChild ( link ) ;
475474 link . click ( ) ;
476475 }
@@ -481,17 +480,17 @@ WOQLClient.prototype.getCSV = function(csvName, download, gtype, gid) {
481480/**
482481 * Deletes a csv into the specified path
483482 *
484- * @param {array } csvName is an array of csv file names
485- * @param {string } commitMsg Textual message describing the reason for the delete
483+ * @param {array } csv_name is an array of csv file names
484+ * @param {string } commit_msg Textual message describing the reason for the delete
486485 * @param {string } gtype type of graph |instance|schema|inference|
487486 * @param {string } gid TerminusDB Graph ID to update, main is the default value
488487 * @return {Promise } An API success message
489488 */
490- WOQLClient . prototype . deleteCSV = function ( csvName , commit_msg , gtype , gid ) {
491- if ( commitMsg && csvName ) {
492- let commit = this . generateCommitInfo ( commitMsg )
489+ WOQLClient . prototype . deleteCSV = function ( csv_name , commit_msg , gtype , gid ) {
490+ if ( commit_msg && csv_name ) {
491+ let commit = this . generateCommitInfo ( commit_msg )
493492 let options = { } , filePath
494- options . name = csvName ;
493+ options . name = csv_name ;
495494 options . commit_info = commit . commit_info
496495 return this . dispatch ( CONST . DELETE_CSV , this . connectionConfig . csvURL ( ) , options ) . then ( results => {
497496 return results ;
0 commit comments