Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function insertOrReplace(schemaName, tableName, objects) {
- var info = getTableInfo(schemaName, tableName);
- console.log("csharp insertOrReplace: info");
- console.log(info);
- if (info.error) { return Promise.reject(info.error); }
- var rows = objects.map(function(r) { return info.table.createRow(r) });
- console.log("csharp insertOrReplace: rows");
- console.log(rows);
- return info.schema.db.insertOrReplace().into(info.table)
- .values(rows).exec().then(function() { return true; });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement