Socket
Socket
Sign inDemoInstall

tedious

Package Overview
Dependencies
Maintainers
1
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 0.1.2 to 0.1.3

examples/parameters.js

24

lib/data-type.js

@@ -217,3 +217,25 @@ // Generated by CoffeeScript 1.3.3

hasTextPointerAndTimestamp: true,
dataLengthLength: 4
dataLengthLength: 4,
declaration: function(parameter) {
return 'text';
},
writeParameterData: function(buffer, parameter) {
var length;
if (parameter.length) {
length = parameter.length;
} else if (parameter.value != null) {
length = parameter.value.toString().length;
} else {
length = -1;
}
buffer.writeUInt8(typeByName.Text.id);
buffer.writeInt32LE(length);
buffer.writeBuffer(new Buffer([0x00, 0x00, 0x00, 0x00, 0x00]));
if (parameter.value != null) {
buffer.writeInt32LE(length);
return buffer.writeString(parameter.value.toString(), 'ascii');
} else {
return buffer.writeInt32LE(length);
}
}
},

@@ -220,0 +242,0 @@ 0x24: {

// Generated by CoffeeScript 1.3.3
var DIGITS_REGEX, parser, sprintf, valueParse;
var DIGITS_REGEX, parser, saveColumn, sprintf, valueParse;

@@ -22,3 +22,3 @@ valueParse = require('../value-parser');

if (!(DIGITS_REGEX.test(columnMetaData.colName))) {
columns[columnMetaData.colName] = column;
saveColumn(columnMetaData.colName, columns, column);
}

@@ -33,2 +33,14 @@ }

saveColumn = function(columnName, columns, value) {
var entry;
entry = columns[columnName];
if (!entry) {
return columns[columnName] = value;
} else if (Array.isArray(entry)) {
return entry.push(value);
} else {
return columns[columnName] = [entry, value];
}
};
module.exports = parser;

10

lib/value-parser.js

@@ -25,5 +25,6 @@ // Generated by CoffeeScript 1.3.3

parse = function(buffer, metaData) {
var codepage, dataLength, high, low, sign, textPointerLength, type, value;
var codepage, dataLength, high, low, sign, textPointerLength, textPointerNull, type, value;
value = void 0;
dataLength = void 0;
textPointerNull = void 0;
type = metaData.type;

@@ -37,2 +38,3 @@ if (type.hasTextPointerAndTimestamp) {

dataLength = 0;
textPointerNull = true;
}

@@ -182,3 +184,3 @@ }

case 'Text':
if (dataLength === 0) {
if (textPointerNull) {
value = null;

@@ -190,3 +192,3 @@ } else {

case 'NText':
if (dataLength === 0) {
if (textPointerNull) {
value = null;

@@ -198,3 +200,3 @@ } else {

case 'Image':
if (dataLength === 0) {
if (textPointerNull) {
value = null;

@@ -201,0 +203,0 @@ } else {

@@ -27,3 +27,3 @@ {

],
"version": "0.1.2",
"version": "0.1.3",
"main": "./lib/tedious.js",

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

@@ -8,2 +8,4 @@ Tedious (node implementation of TDS)

It is intended to be a fairly slim implementation of the protocol, with not too much additional functionality.
Name

@@ -15,3 +17,3 @@ ----

------
Current version: v0.1.2
Current version: v0.1.3

@@ -18,0 +20,0 @@ Coming soon

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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