xardao 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,6 +57,7 @@ class Connection {
57
57
  execMultiple() {}
58
58
  readTableStructure() {}
59
59
  close() {}
60
+ setNoCount() {}
60
61
 
61
62
  debug(f,s) {
62
63
  if (this.debugMode) console.error(f + ": " + s)
@@ -57,6 +57,7 @@ class Connection {
57
57
  execMultiple() {}
58
58
  readTableStructure() {}
59
59
  close() {}
60
+ setNoCount() {}
60
61
 
61
62
  debug(f,s) {
62
63
  if (this.debugMode) console.error(f + ": " + s)
@@ -44,6 +44,7 @@ class Connection {
44
44
  this.commitTrans = ESNext(this.commitTransCB, this)
45
45
  this.rollbackTrans = ESNext(this.rollbackTransCB, this)
46
46
  this.close = ESNext(this.closeCB, this)
47
+ this.noCount = false
47
48
  }
48
49
 
49
50
  open() {}
@@ -57,6 +58,9 @@ class Connection {
57
58
  execMultiple() {}
58
59
  readTableStructure() {}
59
60
  close() {}
61
+ setNoCount() {
62
+ this.noCount = true
63
+ }
60
64
 
61
65
  debug(f,s) {
62
66
  if (this.debugMode) console.error(f + ": " + s)
@@ -331,7 +335,8 @@ class Connection {
331
335
  var ts = Date.now()
332
336
  var realSql = this.getRealSql(params);
333
337
  this.debug("execSingle",realSql)
334
- realSql = realSql + "; select @@ROWCOUNT, @@IDENTITY"
338
+ if ( ! this.noCount ) realSql = realSql + "; select @@ROWCOUNT, @@IDENTITY"
339
+ this.noCount = false
335
340
  let request = new mssql.Request(realSql, function(err, rowcount, rows) {
336
341
  if (err) {
337
342
  self.debug("execSingle",'Error: '+err.code)
@@ -57,6 +57,7 @@ class Connection {
57
57
  execMultiple() {}
58
58
  readTableStructure() {}
59
59
  close() {}
60
+ setNoCount() {}
60
61
 
61
62
  debug(f,s) {
62
63
  if (this.debugMode) console.error(f + ": " + s)
@@ -59,6 +59,7 @@ class Connection {
59
59
  execMultiple() {}
60
60
  readTableStructure() {}
61
61
  close() {}
62
+ setNoCount() {}
62
63
 
63
64
  debug(f,s) {
64
65
  if (this.debugMode) console.error(f + ": " + s)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xardao",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Common Relational Data Access library",
5
5
  "main": "./lib/xardao.js",
6
6
  "scripts": {