2015-04-22 15:39:29 -04:00
|
|
|
'use strict';
|
2015-04-22 10:34:14 -04:00
|
|
|
var makeKnex = require('../../util/make-knex')
|
2015-04-22 15:39:29 -04:00
|
|
|
var Promise = require('../../promise')
|
2015-04-19 16:31:52 -04:00
|
|
|
|
|
|
|
function Transaction_WebSQL(client) {
|
|
|
|
this.client = client
|
|
|
|
}
|
|
|
|
|
|
|
|
Transaction_WebSQL.prototype.run = function(container) {
|
2015-04-22 15:24:29 -04:00
|
|
|
var client = this.client
|
2015-04-19 16:31:52 -04:00
|
|
|
return Promise.try(function() {
|
2015-04-22 10:34:14 -04:00
|
|
|
return container(makeKnex(client))
|
2015-04-19 16:31:52 -04:00
|
|
|
})
|
|
|
|
}
|
2015-04-22 15:24:29 -04:00
|
|
|
|
2015-04-22 15:39:29 -04:00
|
|
|
module.exports = Transaction_WebSQL
|