不要怂,就是干,撸起袖子干!

Commit cbf8fa1a by Joel Trost Committed by Matt Broadstone

added alias for updates

1 parent ff83d129
Showing with 6 additions and 5 deletions
......@@ -52,7 +52,7 @@ module.exports = (function() {
createSchema: function(schema){
return SqlGenerator.getCreateSchemaSql(schema);
},
showSchemasQuery: function(){
showSchemasQuery: function(){
return 'SELECT name FROM sys.Tables;';
},
/*
......@@ -208,10 +208,11 @@ module.exports = (function() {
for(var key in attributes){
//console.log(key);
//console.log('some more action', attributes.deletedAtThisTime);
if(attributes[key].primaryKey && attrValueHash[key]){
delete attrValueHash[key];
var aliasKey = attributes[key].field || key;
if(attributes[key].primaryKey && attrValueHash[aliasKey]){
delete attrValueHash[aliasKey];
}
if(attrValueHash[key] && attrValueHash[key].fn){
if(attrValueHash[aliasKey] && attrValueHash[aliasKey].fn){
}
}
......@@ -428,7 +429,7 @@ module.exports = (function() {
}
// add 1st string as quoted, 2nd as unquoted raw
var sql = (i > 0 ? SqlGenerator.quoteIdentifier(tableNames.join('.')) + '.' : '')
var sql = (i > 0 ? SqlGenerator.quoteIdentifier(tableNames.join('.')) + '.' : '')
+ this.quote(obj[i], parent, force);
if (i < len - 1) {
sql += ' ' + obj[i + 1];
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!