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

Commit 00f08106 by Jan Aagaard Meier

Fixed schema errors for mysql and sqlite

1 parent 444ab99b
......@@ -602,7 +602,7 @@ module.exports = (function() {
return new Utils.CustomEventEmitter(function (emitter) {
var col = this.sequelize.col('*')
if (options.include) {
col = this.sequelize.col(this.tableName+'.'+(this.primaryKeyAttributes[0] || 'id'))
col = this.sequelize.col(this.getTableName()+'.'+(this.primaryKeyAttributes[0] || 'id'))
}
options.attributes = [
......@@ -928,7 +928,7 @@ module.exports = (function() {
records.push(values)
})
self.QueryInterface.bulkInsert(self.tableName, records, options, self)
self.QueryInterface.bulkInsert(self.getTableName(), records, options, self)
.on('sql', function(sql) {
emitter.emit('sql', sql)
})
......@@ -1019,10 +1019,10 @@ module.exports = (function() {
var attrValueHash = {}
attrValueHash[self._timestampAttributes.deletedAt] = Utils.now()
query = 'bulkUpdate'
args = [self.tableName, attrValueHash, where]
args = [self.getTableName(), attrValueHash, where]
} else {
query = 'bulkDelete'
args = [self.tableName, where, options]
args = [self.getTableName(), where, options]
}
var runQuery = function(err, records) {
......@@ -1145,7 +1145,7 @@ module.exports = (function() {
return emitter.emit('error', err)
}
query = self.QueryInterface.bulkUpdate(self.tableName, attrValueHash, where, options)
query = self.QueryInterface.bulkUpdate(self.getTableName(), attrValueHash, where, options)
query.on('sql', function(sql) {
emitter.emit('sql', sql)
})
......
......@@ -371,7 +371,7 @@ module.exports = (function() {
return table
}
return this.quoteIdentifiers(param)
return this.quoteIdentifier(param)
},
/*
......@@ -508,14 +508,7 @@ module.exports = (function() {
quoteIdentifiers: function(identifiers, force) {
if (identifiers.indexOf('.') !== -1) {
identifiers = identifiers.split('.')
if (this._dialect.supports.schemas) { // quote every part
return identifiers.map(function(t) {
return this.quoteIdentifier(t, force)
}.bind(this)).join('.')
} else { // only quote the last part seperately
return this.quoteIdentifier(identifiers.slice(0, identifiers.length - 1).join('.')) + '.' + this.quoteIdentifier(identifiers[identifiers.length - 1])
}
return this.quoteIdentifier(identifiers.slice(0, identifiers.length - 1).join('.')) + '.' + this.quoteIdentifier(identifiers[identifiers.length - 1])
} else {
return this.quoteIdentifier(identifiers)
}
......
......@@ -57,7 +57,7 @@ module.exports = (function() {
}
var values = {
table: this.quoteIdentifier(tableName),
table: this.quoteTable(tableName),
attributes: attrStr.join(", "),
comment: options.comment && Utils._.isString(options.comment) ? " COMMENT " + this.escape(options.comment) : "",
engine: options.engine,
......@@ -177,7 +177,7 @@ module.exports = (function() {
var replacements = {
ignoreDuplicates: options && options.ignoreDuplicates ? ' IGNORE' : '',
table: this.quoteIdentifier(tableName),
table: this.quoteTable(tableName),
attributes: allAttributes.map(function(attr){
return this.quoteIdentifier(attr)
}.bind(this)).join(","),
......@@ -190,7 +190,7 @@ module.exports = (function() {
deleteQuery: function(tableName, where, options) {
options = options || {}
var table = this.quoteIdentifier(tableName)
var table = this.quoteTable(tableName)
if (options.truncate === true) {
// Truncate does not allow LIMIT and WHERE
return "TRUNCATE " + table
......@@ -213,7 +213,7 @@ module.exports = (function() {
bulkDeleteQuery: function(tableName, where, options) {
options = options || {}
var table = this.quoteIdentifier(tableName)
var table = this.quoteTable(tableName)
where = this.getWhereConditions(where)
var query = "DELETE FROM " + table + " WHERE " + where
......@@ -326,7 +326,7 @@ module.exports = (function() {
}
if(dataType.references) {
template += " REFERENCES " + this.quoteIdentifier(dataType.references)
template += " REFERENCES " + this.quoteTable(dataType.references)
if(dataType.referencesKey) {
template += " (" + this.quoteIdentifier(dataType.referencesKey) + ")"
......@@ -410,7 +410,7 @@ module.exports = (function() {
* @return {String} The generated sql query.
*/
dropForeignKeyQuery: function(tableName, foreignKey) {
return 'ALTER TABLE ' + this.quoteIdentifier(tableName) + ' DROP FOREIGN KEY ' + this.quoteIdentifier(foreignKey) + ';'
return 'ALTER TABLE ' + this.quoteTable(tableName) + ' DROP FOREIGN KEY ' + this.quoteIdentifier(foreignKey) + ';'
},
mysqlDataTypeMapping: function(tableName, attr, dataType) {
......
......@@ -132,14 +132,15 @@ module.exports = (function() {
}
return Utils._.template(query)({
tableName: this.quoteIdentifiers(tableName),
attributes: attrString.join(', ') })
tableName: this.quoteTable(tableName),
attributes: attrString.join(', ')
})
},
arrayValue: function(value, key, _key, factory, logicResult){
var col = null
, coltype = null
, _realKey = key.split('.').pop()
, _realKey = key.split('.').pop().replace(/"/g, '')
, _value
if (value.length === 0) { value = [null] }
......@@ -152,6 +153,7 @@ module.exports = (function() {
coltype = coltype.toString();
}
}
if ( col && ((!!coltype && coltype.match(/\[\]$/) !== null) || (col.toString().match(/\[\]$/) !== null))) {
_value = 'ARRAY[' + value.map(this.escape.bind(this)).join(',') + ']::' + (!!col.type ? col.type : col.toString())
return [_key, _value].join(" && ")
......@@ -813,27 +815,9 @@ module.exports = (function() {
* @return {String} The generated sql query.
*/
dropForeignKeyQuery: function(tableName, foreignKey) {
return 'ALTER TABLE ' + this.quoteIdentifier(tableName) + ' DROP CONSTRAINT ' + this.quoteIdentifier(foreignKey) + ';'
return 'ALTER TABLE ' + this.quoteTable(tableName) + ' DROP CONSTRAINT ' + this.quoteIdentifier(foreignKey) + ';'
}
}
// Private
var removeSerialsFromHash = function(tableName, attrValueHash) {
var returning = [];
Utils._.forEach(attrValueHash, function(value, key, hash) {
if (tables[tableName] && tables[tableName][key]) {
switch (tables[tableName][key]) {
case 'bigserial':
case 'serial':
delete hash[key]
returning.push(key)
break
}
}
});
return returning;
}
return Utils._.extend(Utils._.clone(require("../abstract/query-generator")), QueryGenerator)
})()
......@@ -28,7 +28,7 @@ module.exports = (function() {
var self = this
if (!this.QueryGenerator._dialect.supports.schemas) {
return this.dropAllTables()
return this.sequelize.drop()
} else {
return new Utils.CustomEventEmitter(function(emitter) {
self.showAllSchemas().success(function(schemaNames) {
......@@ -143,36 +143,16 @@ module.exports = (function() {
chainer2.run().success(function() {
queryAndEmit
.call(self, sql, 'createTable', options)
.success(function(res) {
self.emit('createTable', null)
emitter.emit('success', res)
})
.error(function(err) {
self.emit('createTable', err)
emitter.emit('error', err)
})
.on('sql', function(sql) {
emitter.emit('sql', sql)
})
}).error(function(err) {
emitter.emit('error', err)
}).on('sql', function(sql) {
emitter.emit('sql', sql)
.proxy(emitter, { events: ['success', 'error', 'sql']})
})
.proxy(emitter, { events: ['error', 'sql']})
})
} else {
attributes = self.QueryGenerator.attributesToSQL(attributeHashes)
sql = self.QueryGenerator.createTableQuery(tableName, attributes, options)
queryAndEmit.call(self, sql, 'createTable', options).success(function(results) {
self.emit('createTable', null)
emitter.emit('success', results)
}).error(function(err) {
self.emit('createTable', err)
emitter.emit('error', err)
}).on('sql', function(sql) {
emitter.emit('sql', sql)
})
queryAndEmit.call(self, sql, 'createTable', options)
.proxy(emitter, { events: ['success', 'error', 'sql']})
}
}).run()
}
......@@ -215,15 +195,12 @@ module.exports = (function() {
}
}
chainer.runSerially().success(function(results) {
emitter.emit('success', results[0])
self.emit('dropTable', null)
}).error(function(err) {
emitter.emit('error', err)
self.emit('dropTable', err)
}).on('sql', function(sql) {
emitter.emit('sql', sql)
})
chainer.runSerially()
.success(function(results) {
emitter.emit('success', results[0])
self.emit('dropTable', null)
})
.proxy(emitter, { events: ['error', 'sql']})
}).run()
}
......@@ -247,7 +224,6 @@ module.exports = (function() {
self.emit('dropAllTables', err)
dropAllTablesEmitter.emit('error', err)
}
self.showAllTables().success(function(tableNames) {
self.getForeignKeysForTables(tableNames).success(function(foreignKeys) {
......@@ -269,11 +245,7 @@ module.exports = (function() {
chainer
.runSerially()
.success(function() {
self.emit('dropAllTables', null)
dropAllTablesEmitter.emit('success', null)
})
.error(onError)
.proxy(dropAllTablesEmitter, { proxy: ['success', 'error', 'sql']})
}).error(onError)
}).error(onError)
}).run()
......@@ -317,7 +289,6 @@ module.exports = (function() {
QueryInterface.prototype.showAllTables = function(options) {
var self = this
options = Utils._.extend({
transaction: null,
raw: true
......@@ -327,18 +298,13 @@ module.exports = (function() {
var showTablesSql = self.QueryGenerator.showTablesQuery()
self.sequelize.query(showTablesSql, null, options).success(function(tableNames) {
self.emit('showAllTables', null)
emitter.emit('success', Utils._.flatten(tableNames))
}).error(function(err) {
self.emit('showAllTables', err)
emitter.emit('error', err)
})
}).proxy(emitter, { events: ['error', 'sql']})
}).run()
}
QueryInterface.prototype.describeTable = function(tableName, options) {
var self = this
, schema = null
var schema = null
, schemaDelimiter = null
if (typeof options === "string") {
......@@ -349,34 +315,27 @@ module.exports = (function() {
schemaDelimiter = options.schemaDelimiter || null
}
return new Utils.CustomEventEmitter(function(emitter) {
var sql;
var sql;
if (self.QueryGenerator.describeTableQuery) {
sql = self.QueryGenerator.describeTableQuery(tableName, schema, schemaDelimiter)
} else {
var table = self.QueryGenerator.quoteIdentifier(
self.QueryGenerator.addSchema({
tableName: tableName,
options: {
schema: schema,
schemaDelimiter:
schemaDelimiter
}
}),
self.QueryGenerator.options.quoteIdentifiers
)
sql = 'DESCRIBE ' + table + ';'
}
if (this.QueryGenerator.describeTableQuery) {
sql = this.QueryGenerator.describeTableQuery(tableName, schema, schemaDelimiter)
} else {
// TODO move this to abstract query gen.
var table = this.QueryGenerator.quoteTable(
this.QueryGenerator.addSchema({
tableName: tableName,
options: {
schema: schema,
schemaDelimiter:
schemaDelimiter
}
}),
this.QueryGenerator.options.quoteIdentifiers
)
sql = 'DESCRIBE ' + table + ';'
}
self.sequelize.query(sql, null, { raw: true }).success(function(data) {
emitter.emit('success', data)
}).error(function(err) {
emitter.emit('error', err)
}).on('sql', function(sql) {
emitter.emit('sql', sql)
})
}).run()
return this.sequelize.query(sql, null, { raw: true })
}
QueryInterface.prototype.addColumn = function(tableName, attributeName, dataTypeOrOptions) {
......@@ -537,26 +496,9 @@ module.exports = (function() {
}
QueryInterface.prototype.bulkUpdate = function(tableName, values, identifier, options) {
var self = this
, sql = self.QueryGenerator.updateQuery(tableName, values, identifier, options)
var sql = this.QueryGenerator.updateQuery(tableName, values, identifier, options)
return new Utils.CustomEventEmitter(function(emitter) {
var chainer = new Utils.QueryChainer()
chainer.add(self, 'queryAndEmit', [[sql, null, options], 'bulkUpdate'])
return chainer.runSerially()
.success(function(results){
emitter.query = { sql: sql }
emitter.emit('sql', sql)
emitter.emit('success', results[0])
})
.error(function(err) {
emitter.query = { sql: sql }
emitter.emit('sql', sql)
emitter.emit('error', err)
})
}).run()
return this.queryAndEmit([sql, null, options], 'bulkUpdate')
}
QueryInterface.prototype.delete = function(dao, tableName, identifier, options) {
......@@ -652,26 +594,9 @@ module.exports = (function() {
}
QueryInterface.prototype.bulkDelete = function(tableName, identifier, options) {
var self = this
var sql = self.QueryGenerator.deleteQuery(tableName, identifier, Utils._.defaults(options || {}, {limit: null}))
return new Utils.CustomEventEmitter(function(emitter) {
var chainer = new Utils.QueryChainer()
chainer.add(self, 'queryAndEmit', [[sql, null, options], 'bulkDelete', options])
var sql = this.QueryGenerator.deleteQuery(tableName, identifier, Utils._.defaults(options || {}, {limit: null}))
chainer.runSerially()
.success(function(results){
emitter.query = { sql: sql }
emitter.emit('sql', sql)
emitter.emit('success', results[0])
})
.error(function(err) {
emitter.query = { sql: sql }
emitter.emit('sql', sql)
emitter.emit('error', err)
})
}).run()
return this.queryAndEmit([sql, null, options], 'bulkDelete', options)
}
QueryInterface.prototype.select = function(factory, tableName, options, queryOptions) {
......@@ -744,13 +669,7 @@ module.exports = (function() {
self.emit('rawSelect', null)
emitter.emit('success', result)
})
.error(function(err) {
self.emit('rawSelect', err)
emitter.emit('error', err)
})
.on('sql', function(sql) {
emitter.emit('sql', sql)
})
.proxy(emitter, { events: ['error', 'sql']})
}).run()
}
......
......@@ -384,7 +384,7 @@ module.exports = (function() {
// creation order
if (options.force) {
chainer.add(this, 'drop')
chainer.add(this, 'drop', [options])
}
this.daoFactoryManager.forEachDAO(function(dao) {
......@@ -398,7 +398,7 @@ module.exports = (function() {
return chainer.runSerially()
}
Sequelize.prototype.drop = function() {
Sequelize.prototype.drop = function(options) {
var self = this
return new Utils.CustomEventEmitter(function(emitter) {
......@@ -406,7 +406,7 @@ module.exports = (function() {
self.daoFactoryManager.forEachDAO(function(dao) {
if (dao) {
chainer.add(dao, 'drop', [])
chainer.add(dao, 'drop', [options])
}
}, { reverse: false})
......
......@@ -637,7 +637,6 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
AcmeUser.hasMany(AcmeProject, {through: AcmeProjectUsers})
AcmeProject.hasMany(AcmeUser, {through: AcmeProjectUsers})
self.sequelize.dropAllSchemas().done(function(err) {
expect(err).not.to.be.ok
self.sequelize.createSchema('acme').done(function(err) {
......
......@@ -46,7 +46,7 @@ describe(Support.getTestDialectTeaser("Multiple Level Filters"), function() {
}]).success(function() {
Task.findAll({
where: {
'project.user.username': 'leia'
'Project.User.username': 'leia'
},
include: [
{model: Project, include: [
......@@ -111,8 +111,8 @@ describe(Support.getTestDialectTeaser("Multiple Level Filters"), function() {
}]).success(function() {
Task.findAll({
where: {
'project.user.username': 'leia',
'project.user.id': 1
'Project.User.username': 'leia',
'Project.User.id': 1
},
include: [
{model: Project, include: [
......@@ -174,7 +174,7 @@ describe(Support.getTestDialectTeaser("Multiple Level Filters"), function() {
}]).success(function() {
User.findAll({
where: {
'projects.tasks.title': 'fight empire'
'Projects.Tasks.title': 'fight empire'
},
include: [
{model: Project, include: [
......@@ -223,7 +223,7 @@ describe(Support.getTestDialectTeaser("Multiple Level Filters"), function() {
user.setProjects([project]).success(function(){
User.findAll({
where: {
'projects.title': 'republic'
'Projects.title': 'republic'
},
include: [
{model: Project}
......
......@@ -135,7 +135,7 @@ if (dialect.match(/^postgres/)) {
expectation: "CREATE TABLE IF NOT EXISTS \"myTable\" (\"data\" bytea);"
},
{
arguments: ['mySchema.myTable', {title: 'VARCHAR(255)', name: 'VARCHAR(255)'}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {title: 'VARCHAR(255)', name: 'VARCHAR(255)'}],
expectation: "CREATE TABLE IF NOT EXISTS \"mySchema\".\"myTable\" (\"title\" VARCHAR(255), \"name\" VARCHAR(255));"
},
{
......@@ -185,7 +185,7 @@ if (dialect.match(/^postgres/)) {
expectation: "DROP TABLE IF EXISTS \"myTable\";"
},
{
arguments: ['mySchema.myTable'],
arguments: [{tableName: 'myTable', schema: 'mySchema'}],
expectation: "DROP TABLE IF EXISTS \"mySchema\".\"myTable\";"
},
{
......@@ -193,7 +193,7 @@ if (dialect.match(/^postgres/)) {
expectation: "DROP TABLE IF EXISTS \"myTable\" CASCADE;"
},
{
arguments: ['mySchema.myTable', {cascade: true}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {cascade: true}],
expectation: "DROP TABLE IF EXISTS \"mySchema\".\"myTable\" CASCADE;"
},
......@@ -204,7 +204,7 @@ if (dialect.match(/^postgres/)) {
context: {options: {quoteIdentifiers: false}}
},
{
arguments: ['mySchema.myTable'],
arguments: [{tableName: 'myTable', schema: 'mySchema'}],
expectation: "DROP TABLE IF EXISTS mySchema.myTable;",
context: {options: {quoteIdentifiers: false}}
},
......@@ -214,7 +214,7 @@ if (dialect.match(/^postgres/)) {
context: {options: {quoteIdentifiers: false}}
},
{
arguments: ['mySchema.myTable', {cascade: true}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {cascade: true}],
expectation: "DROP TABLE IF EXISTS mySchema.myTable CASCADE;",
context: {options: {quoteIdentifiers: false}}
}
......@@ -352,10 +352,10 @@ if (dialect.match(/^postgres/)) {
arguments: ['myTable', {offset: 2}],
expectation: "SELECT * FROM \"myTable\" OFFSET 2;"
}, {
arguments: ['mySchema.myTable'],
arguments: [{tableName: 'myTable', schema: 'mySchema'}],
expectation: "SELECT * FROM \"mySchema\".\"myTable\";"
}, {
arguments: ['mySchema.myTable', {where: {name: "foo';DROP TABLE mySchema.myTable;"}}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {where: {name: "foo';DROP TABLE mySchema.myTable;"}}],
expectation: "SELECT * FROM \"mySchema\".\"myTable\" WHERE \"mySchema\".\"myTable\".\"name\"='foo'';DROP TABLE mySchema.myTable;';"
}, {
title: 'buffer as where argument',
......@@ -427,11 +427,11 @@ if (dialect.match(/^postgres/)) {
expectation: "SELECT * FROM myTable OFFSET 2;",
context: {options: {quoteIdentifiers: false}}
}, {
arguments: ['mySchema.myTable'],
arguments: [{tableName: 'myTable', schema: 'mySchema'}],
expectation: "SELECT * FROM mySchema.myTable;",
context: {options: {quoteIdentifiers: false}}
}, {
arguments: ['mySchema.myTable', {where: {name: "foo';DROP TABLE mySchema.myTable;"}}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {where: {name: "foo';DROP TABLE mySchema.myTable;"}}],
expectation: "SELECT * FROM mySchema.myTable WHERE mySchema.myTable.name='foo'';DROP TABLE mySchema.myTable;';",
context: {options: {quoteIdentifiers: false}}
}, {
......@@ -486,13 +486,13 @@ if (dialect.match(/^postgres/)) {
expectation: "INSERT INTO \"myTable\" (\"name\") VALUES ('foo') RETURNING *;",
context: {options: {omitNull: true}}
}, {
arguments: ['mySchema.myTable', {name: 'foo'}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {name: 'foo'}],
expectation: "INSERT INTO \"mySchema\".\"myTable\" (\"name\") VALUES ('foo') RETURNING *;"
}, {
arguments: ['mySchema.myTable', {name: JSON.stringify({info: 'Look ma a " quote'})}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {name: JSON.stringify({info: 'Look ma a " quote'})}],
expectation: "INSERT INTO \"mySchema\".\"myTable\" (\"name\") VALUES ('{\"info\":\"Look ma a \\\" quote\"}') RETURNING *;"
}, {
arguments: ['mySchema.myTable', {name: "foo';DROP TABLE mySchema.myTable;"}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {name: "foo';DROP TABLE mySchema.myTable;"}],
expectation: "INSERT INTO \"mySchema\".\"myTable\" (\"name\") VALUES ('foo'';DROP TABLE mySchema.myTable;') RETURNING *;"
}, {
arguments: ['myTable', function (sequelize) {
......@@ -542,15 +542,15 @@ if (dialect.match(/^postgres/)) {
expectation: "INSERT INTO myTable (name) VALUES ('foo') RETURNING *;",
context: {options: {omitNull: true, quoteIdentifiers: false}}
}, {
arguments: ['mySchema.myTable', {name: 'foo'}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {name: 'foo'}],
expectation: "INSERT INTO mySchema.myTable (name) VALUES ('foo') RETURNING *;",
context: {options: {quoteIdentifiers: false}}
}, {
arguments: ['mySchema.myTable', {name: JSON.stringify({info: 'Look ma a " quote'})}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {name: JSON.stringify({info: 'Look ma a " quote'})}],
expectation: "INSERT INTO mySchema.myTable (name) VALUES ('{\"info\":\"Look ma a \\\" quote\"}') RETURNING *;",
context: {options: {quoteIdentifiers: false}}
}, {
arguments: ['mySchema.myTable', {name: "foo';DROP TABLE mySchema.myTable;"}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {name: "foo';DROP TABLE mySchema.myTable;"}],
expectation: "INSERT INTO mySchema.myTable (name) VALUES ('foo'';DROP TABLE mySchema.myTable;') RETURNING *;",
context: {options: {quoteIdentifiers: false}}
}
......@@ -676,10 +676,10 @@ if (dialect.match(/^postgres/)) {
expectation: "UPDATE \"myTable\" SET \"bar\"=2 WHERE \"name\"='foo' RETURNING *",
context: {options: {omitNull: true}}
}, {
arguments: ['mySchema.myTable', {name: 'foo', birthday: moment("2011-03-27 10:01:55 +0000", "YYYY-MM-DD HH:mm:ss Z").toDate()}, {id: 2}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {name: 'foo', birthday: moment("2011-03-27 10:01:55 +0000", "YYYY-MM-DD HH:mm:ss Z").toDate()}, {id: 2}],
expectation: "UPDATE \"mySchema\".\"myTable\" SET \"name\"='foo',\"birthday\"='2011-03-27 10:01:55.000 +00:00' WHERE \"id\"=2 RETURNING *"
}, {
arguments: ['mySchema.myTable', {name: "foo';DROP TABLE mySchema.myTable;"}, {name: 'foo'}],
arguments: [{tableName: 'myTable', schema: 'mySchema'}, {name: "foo';DROP TABLE mySchema.myTable;"}, {name: 'foo'}],
expectation: "UPDATE \"mySchema\".\"myTable\" SET \"name\"='foo'';DROP TABLE mySchema.myTable;' WHERE \"name\"='foo' RETURNING *"
}, {
arguments: ['myTable', function (sequelize) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!