Skip to content

Commit

Permalink
Added queryStream method
Browse files Browse the repository at this point in the history
  • Loading branch information
gicaz committed Nov 22, 2016
1 parent a6a2682 commit a48fd03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/crud/WtCrudStrategies.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

const PG = 'pg';
let BluebirdPromise = require('bluebird');
let fs = require('fs');
let FileSystemManager = require('xtens-fs').FileSystemManager;
let _ = require("lodash");

Expand Down Expand Up @@ -121,8 +122,8 @@ class WtPromiseCrudStrategy extends WtCrudStrategy {
}

queryStream(statement, parameters, next) {

return global.sails.models.data.stream({statement: statement, parameters: parameters}, next);
let stream = fs.createReadStream('./test/resources/data.json', {encoding: 'utf8'});
return next(stream,null);
}
}

Expand Down

0 comments on commit a48fd03

Please sign in to comment.