Comparing version 1.5.8 to 1.6.0
@@ -254,3 +254,3 @@ // Generated by CoffeeScript 1.7.1 | ||
buffer.writeUInt8(parameter.precision); | ||
return buffer.writeUInt8(parameter.scale); | ||
return buffer.writeUInt8(this.resolveScale(parameter)); | ||
}, | ||
@@ -261,3 +261,3 @@ writeParameterData: function(buffer, parameter) { | ||
sign = parameter.value < 0 ? 0 : 1; | ||
value = Math.round(Math.abs(parameter.value * Math.pow(10, parameter.scale))); | ||
value = Math.round(Math.abs(parameter.value * Math.pow(10, this.resolveScale(parameter)))); | ||
if (parameter.precision <= 9) { | ||
@@ -324,3 +324,3 @@ buffer.writeUInt8(5); | ||
buffer.writeUInt8(parameter.precision); | ||
return buffer.writeUInt8(parameter.scale); | ||
return buffer.writeUInt8(this.resolveScale(parameter)); | ||
}, | ||
@@ -331,3 +331,3 @@ writeParameterData: function(buffer, parameter) { | ||
sign = parameter.value < 0 ? 0 : 1; | ||
value = Math.round(Math.abs(parameter.value * Math.pow(10, parameter.scale))); | ||
value = Math.round(Math.abs(parameter.value * Math.pow(10, this.resolveScale(parameter)))); | ||
if (parameter.precision <= 9) { | ||
@@ -416,10 +416,10 @@ buffer.writeUInt8(5); | ||
buffer.writeUInt8(this.id); | ||
return buffer.writeInt32LE(parameter.length); | ||
return buffer.writeInt32LE(this.resolveLength(parameter)); | ||
}, | ||
writeParameterData: function(buffer, parameter) { | ||
if (parameter.value != null) { | ||
buffer.writeInt32LE(parameter.length); | ||
buffer.writeInt32LE(this.resolveLength(parameter)); | ||
return buffer.writeBuffer(parameter.value); | ||
} else { | ||
return buffer.writeInt32LE(parameter.length); | ||
return buffer.writeInt32LE(this.resolveLength(parameter)); | ||
} | ||
@@ -790,3 +790,3 @@ } | ||
buffer.writeUInt8(this.id); | ||
return buffer.writeUInt8(parameter.scale); | ||
return buffer.writeUInt8(this.resolveScale(parameter)); | ||
}, | ||
@@ -799,4 +799,4 @@ writeParameterData: function(buffer, parameter) { | ||
parameter.value.setUTCDate(1); | ||
time = (+parameter.value / 1000 + ((_ref = parameter.value.nanosecondDelta) != null ? _ref : 0)) * Math.pow(10, parameter.scale); | ||
switch (parameter.scale) { | ||
time = (+parameter.value / 1000 + ((_ref = parameter.value.nanosecondDelta) != null ? _ref : 0)) * Math.pow(10, this.resolveScale(parameter)); | ||
switch (this.resolveScale(parameter)) { | ||
case 0: | ||
@@ -877,3 +877,3 @@ case 1: | ||
buffer.writeUInt8(this.id); | ||
return buffer.writeUInt8(parameter.scale); | ||
return buffer.writeUInt8(this.resolveScale(parameter)); | ||
}, | ||
@@ -887,4 +887,4 @@ writeParameterData: function(buffer, parameter) { | ||
time.setUTCDate(1); | ||
time = (+time / 1000 + ((_ref = parameter.value.nanosecondDelta) != null ? _ref : 0)) * Math.pow(10, parameter.scale); | ||
switch (parameter.scale) { | ||
time = (+time / 1000 + ((_ref = parameter.value.nanosecondDelta) != null ? _ref : 0)) * Math.pow(10, this.resolveScale(parameter)); | ||
switch (this.resolveScale(parameter)) { | ||
case 0: | ||
@@ -948,3 +948,3 @@ case 1: | ||
buffer.writeUInt8(this.id); | ||
return buffer.writeUInt8(parameter.scale); | ||
return buffer.writeUInt8(this.resolveScale(parameter)); | ||
}, | ||
@@ -958,5 +958,5 @@ writeParameterData: function(buffer, parameter) { | ||
time.setUTCDate(1); | ||
time = (+time / 1000 + ((_ref = parameter.value.nanosecondDelta) != null ? _ref : 0)) * Math.pow(10, parameter.scale); | ||
time = (+time / 1000 + ((_ref = parameter.value.nanosecondDelta) != null ? _ref : 0)) * Math.pow(10, this.resolveScale(parameter)); | ||
offset = -parameter.value.getTimezoneOffset(); | ||
switch (parameter.scale) { | ||
switch (this.resolveScale(parameter)) { | ||
case 0: | ||
@@ -963,0 +963,0 @@ case 1: |
@@ -33,3 +33,3 @@ { | ||
], | ||
"version": "1.5.8", | ||
"version": "1.6.0", | ||
"main": "./lib/tedious.js", | ||
@@ -36,0 +36,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
191445