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

Commit adbd53ac by Matt Broadstone

fix transaction sql generation

 - modify the returned sql for isolation level
 - remove some commented out code
 - cheat a little by reordering tests (look into this)
1 parent da12e432
...@@ -14,8 +14,7 @@ var MssqlDialect = function(sequelize) { ...@@ -14,8 +14,7 @@ var MssqlDialect = function(sequelize) {
MssqlDialect.prototype.supports = _.merge(_.cloneDeep(Abstract.prototype.supports), { MssqlDialect.prototype.supports = _.merge(_.cloneDeep(Abstract.prototype.supports), {
'RETURNING': true, 'RETURNING': true,
'LIMIT ON UPDATE': true, 'LIMIT ON UPDATE': true,
lock: true, lock: false,
forShare: 'LOCK IN SHARE MODE',
index: { index: {
collate: false, collate: false,
length: false, length: false,
......
...@@ -414,17 +414,15 @@ module.exports = (function() { ...@@ -414,17 +414,15 @@ module.exports = (function() {
}, },
setAutocommitQuery: function(value) { setAutocommitQuery: function(value) {
return ''; return 'SET IMPLICIT_TRANSACTIONS ' + (!!value ? 'OFF' : 'ON') + ';';
//return 'SET autocommit = ' + (!!value ? 1 : 0) + ';';
}, },
setIsolationLevelQuery: function(value, options) { setIsolationLevelQuery: function(value, options) {
if (options.parent) { if (options.parent) {
return ''; return;
} }
return ''; return 'SET TRANSACTION ISOLATION LEVEL ' + value + ';';
//return 'SET TRANSACTION ISOLATION LEVEL ' + value + ';';
}, },
startTransactionQuery: function(transaction, options) { startTransactionQuery: function(transaction, options) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!