exports.callProceduresSync = function(schema, procedure, array){ var rows; try{ db2client.openSync(connString); rows = db2client.querySync("call "+schema+"."+procedure+"("+"?".concat(Array(array.length).join(",?"))+")", array); } catch (err){ throw err; }finally{ return rows; } }
exports.selectDataFromTableSync = function(tableName, colName, options){ var rows; try{ db2client.openSync(connString); var colStrList = "*"; var conditions = ""; if(colName) colStrList = generateCol(colName); if(options) conditions = generateConditions(options); rows = db2client.querySync("select "+colStrList+" from "+ tableName+conditions); }catch (e){ throw e; }finally{ return rows; } }