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

Commit a100b16d by Sascha Depold

use new abstract query for postgresql and sqlite

1 parent 3ac912bc
var Utils = require("../../utils");
var Utils = require("../../utils")
, AbstractQuery = require('../abstract/query')
module.exports = (function() {
var Query = function(client, sequelize, callee, options) {
......@@ -23,7 +24,7 @@ module.exports = (function() {
this.options.logging = function(s) { console.log(s) }
}
}
Utils._.extend(Query.prototype, require("../query").prototype)
Utils.inherit(Query, AbstractQuery)
Query.prototype.run = function(sql) {
var self = this
......
var Utils = require("../utils")
module.exports = (function() {
var Query = function(database, sequelize, callee, options) {
throw new Error('Constructor was not overwritten!')
}
Utils._.extend(Query.prototype, require("../emitters/custom-event-emitter").prototype)
Query.prototype.run = function(sql) {
throw new Error("The run method wasn't overwritten!")
}
Query.prototype.success = Query.prototype.ok = function(fct) {
this.on('success', fct)
return this
}
Query.prototype.failure = Query.prototype.fail = Query.prototype.error = function(fct) {
this.on('error', fct)
return this
}
return Query
})()
var Utils = require("../../utils")
, AbstractQuery = require('../abstract/query')
module.exports = (function() {
var Query = function(database, sequelize, callee, options) {
......@@ -21,7 +23,7 @@ module.exports = (function() {
this.options.logging = function(s) { console.log(s) }
}
}
Utils._.extend(Query.prototype, require("../query").prototype)
Utils.inherit(Query, AbstractQuery)
Query.prototype.run = function(sql) {
var self = this
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!