Skip to content

Commit

Permalink
add notes for refactoring of engine interface
Browse files Browse the repository at this point in the history
  • Loading branch information
tagomoris committed Jan 7, 2014
1 parent 261fcf3 commit cb59598
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion lib/shib/engines/dummyengine.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,24 @@ Executer.prototype.setup = function(setups, callback){
callback(null);
};

Executer.prototype.execute = function(query, callback){
Executer.prototype.execute = function(jobname, query, callback){ //TODO: jobname -> queryid ( jobname generation should be done in each engines)
callback(null, new Fetcher());
};

/*
* Fetcher
*
* schema(callback): callback(err, schema)
* schema: {fieldSchemas: ['fieldname1', 'fieldname2', 'fieldname3', ...]}
* //?? schema: ['fieldname1', 'fieldname2', ...]
*
* fetch(num, callback): callback(err, rows, cb)
* num: rows to fetch (null == all)
* rows: ["_col1value_\t_col2value_\t_col3value_", "_col1value_\t_col2value_\t_col3value_", ...]
* no more rows exists if (rows === null || rows.length < 1 || (rows.length == 1 && rows[0].length < 1))
* cb: callback function to call after iterative callback process
*/

Executer.prototype.end = function(){};

var Monitor = exports.Monitor = function(){
Expand Down

0 comments on commit cb59598

Please sign in to comment.