Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tedious

Package Overview
Dependencies
Maintainers
4
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tedious - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

21

lib/bulk-load.js

@@ -43,4 +43,5 @@ // Generated by CoffeeScript 1.7.1

function BulkLoad(table, callback) {
function BulkLoad(table, options, callback) {
this.table = table;
this.options = options;
this.callback = callback;

@@ -89,3 +90,3 @@ this.columns = [];

c.value = row[arr ? i : c.objName];
_results.push(c.type.writeParameterData(this.rowsData, c));
_results.push(c.type.writeParameterData(this.rowsData, c, this.options));
}

@@ -110,9 +111,9 @@ return _results;

BulkLoad.prototype.getPayload = function(tdsVersion) {
BulkLoad.prototype.getPayload = function() {
var done, length, metaData, payload, rows, status, tBuf;
metaData = this.getColMetaData(tdsVersion);
metaData = this.getColMetaData();
length = metaData.length;
rows = this.rowsData.data;
length += rows.length;
tBuf = new WritableTrackingBuffer(tdsVersion < "7_2" ? 9 : 13);
tBuf = new WritableTrackingBuffer(this.options.tdsVersion < "7_2" ? 9 : 13);
tBuf.writeUInt8(TOKEN_TYPE.DONE);

@@ -123,3 +124,3 @@ status = DONE_STATUS.FINAL;

tBuf.writeUInt32LE(0);
if (tdsVersion >= "7_2") {
if (this.options.tdsVersion >= "7_2") {
tBuf.writeUInt32LE(0);

@@ -136,3 +137,3 @@ }

BulkLoad.prototype.getColMetaData = function(tdsVersion) {
BulkLoad.prototype.getColMetaData = function() {
var c, flags, tBuf, _i, _len, _ref;

@@ -145,3 +146,3 @@ tBuf = new WritableTrackingBuffer(100);

c = _ref[_i];
if (tdsVersion < "7_2") {
if (this.options.tdsVersion < "7_2") {
tBuf.writeUInt16LE(0);

@@ -154,7 +155,7 @@ } else {

flags |= FLAGS.nullable;
} else if (c.nullable === void 0 && tdsVersion >= "7_2") {
} else if (c.nullable === void 0 && this.options.tdsVersion >= "7_2") {
flags |= FLAGS.nullableUnknown;
}
tBuf.writeUInt16LE(flags);
c.type.writeTypeInfo(tBuf, c);
c.type.writeTypeInfo(tBuf, c, this.options);
tBuf.writeBVarchar(c.name, 'ucs2');

@@ -161,0 +162,0 @@ }

@@ -859,2 +859,6 @@ // Generated by CoffeeScript 1.7.1

Connection.prototype.newBulkLoad = function(table, callback) {
return new BulkLoad(table, this.config.options, callback);
};
Connection.prototype.execBulkLoad = function(bulkLoad) {

@@ -868,3 +872,3 @@ var request;

} else {
return _this.makeRequest(bulkLoad, TYPE.BULK_LOAD, bulkLoad.getPayload(_this.config.options.tdsVersion));
return _this.makeRequest(bulkLoad, TYPE.BULK_LOAD, bulkLoad.getPayload());
}

@@ -871,0 +875,0 @@ };

@@ -29,3 +29,3 @@ {

],
"version": "1.3.0",
"version": "1.3.1",
"main": "./lib/tedious.js",

@@ -32,0 +32,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc