|
1 | 1 | var _ = require('lodash')
|
2 | 2 | var assert = require('assert')
|
| 3 | +const debug = require('debug')('entity:adapter:common') |
3 | 4 | var EntityError = require('../entity-error')
|
4 | 5 |
|
5 | 6 | exports.create = function (record, data, options) {
|
@@ -53,6 +54,7 @@ exports.create = function (record, data, options) {
|
53 | 54 | options.schema
|
54 | 55 | }.${insertCommand.substr(12)}`
|
55 | 56 | }
|
| 57 | + debug(insertCommand, params) |
56 | 58 | return this.db
|
57 | 59 | .execute(insertCommand, params, options)
|
58 | 60 | .then(function (recordset) {
|
@@ -146,6 +148,7 @@ exports.update = function (record, data, options) {
|
146 | 148 | 7
|
147 | 149 | )}`
|
148 | 150 | }
|
| 151 | + debug(updateCommand, params) |
149 | 152 | return this.db
|
150 | 153 | .execute(updateCommand, params, options)
|
151 | 154 | .then(function (recordset) {
|
@@ -204,6 +207,7 @@ exports.destroy = function (data, options) {
|
204 | 207 | options.schema
|
205 | 208 | }.${deleteCommand.substr(12)}`
|
206 | 209 | }
|
| 210 | + debug(deleteCommand, params) |
207 | 211 | return this.db
|
208 | 212 | .execute(deleteCommand, params, options)
|
209 | 213 | .then(function (recordset) {
|
|
0 commit comments