Skip to content

Commit 4f12423

Browse files
committed
Add debug logs
1 parent 9eabc72 commit 4f12423

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/adapters/common.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var _ = require('lodash')
22
var assert = require('assert')
3+
const debug = require('debug')('entity:adapter:common')
34
var EntityError = require('../entity-error')
45

56
exports.create = function (record, data, options) {
@@ -53,6 +54,7 @@ exports.create = function (record, data, options) {
5354
options.schema
5455
}.${insertCommand.substr(12)}`
5556
}
57+
debug(insertCommand, params)
5658
return this.db
5759
.execute(insertCommand, params, options)
5860
.then(function (recordset) {
@@ -146,6 +148,7 @@ exports.update = function (record, data, options) {
146148
7
147149
)}`
148150
}
151+
debug(updateCommand, params)
149152
return this.db
150153
.execute(updateCommand, params, options)
151154
.then(function (recordset) {
@@ -204,6 +207,7 @@ exports.destroy = function (data, options) {
204207
options.schema
205208
}.${deleteCommand.substr(12)}`
206209
}
210+
debug(deleteCommand, params)
207211
return this.db
208212
.execute(deleteCommand, params, options)
209213
.then(function (recordset) {

0 commit comments

Comments
 (0)