@@ -464,17 +464,7 @@ WOQLClient.prototype.updateCSV = function(csv_path, commit_msg, gtype, gid) {
464
464
WOQLClient . prototype . getCSV = function ( csv_name , download , gtype , gid ) {
465
465
let options = { } , filePath
466
466
options . name = csv_name ;
467
- return this . dispatch ( CONST . GET_CSV , this . connectionConfig . csvURL ( gtype , gid ) , options ) . then ( results => {
468
- if ( download ) {
469
- const url = window . URL . createObjectURL ( new Blob ( [ results ] ) ) ;
470
- const link = document . createElement ( 'a' ) ;
471
- link . href = url ;
472
- link . setAttribute ( 'download' , csv_name ) ;
473
- document . body . appendChild ( link ) ;
474
- link . click ( ) ;
475
- }
476
- return results ;
477
- } )
467
+ return this . dispatch ( CONST . GET_CSV , this . connectionConfig . csvURL ( gtype , gid ) , options )
478
468
}
479
469
480
470
/**
@@ -525,12 +515,14 @@ WOQLClient.prototype.info = function() {
525
515
* @param {WOQLQuery } woql is a "woql query object"
526
516
* @param {string } commit_msg - if the query contains any updates, it should include a textual message describing the reason for the update
527
517
*/
528
- WOQLClient . prototype . query = function ( woql , commit_msg ) {
518
+ WOQLClient . prototype . query = function ( woql , commit_msg , all_witnesses ) {
519
+ all_witnesses = all_witnesses || false
529
520
commit_msg = commit_msg || 'Commit generated with javascript client without message'
530
521
if ( woql && woql . json && ( ! woql . containsUpdate ( ) || commit_msg ) ) {
531
522
woql . context ( this . connection . getContextForOutboundQuery ( woql , this . db ( ) , this . organization ( ) ) )
532
523
let doql = woql . containsUpdate ( ) ? this . generateCommitInfo ( commit_msg ) : { }
533
524
doql . query = woql . json ( )
525
+ if ( all_witnesses ) doql . all_witnesses = true
534
526
return this . dispatch ( CONST . WOQL_QUERY , this . connectionConfig . queryURL ( ) , doql )
535
527
}
536
528
let errmsg = `WOQL query parameter error`
0 commit comments