Comparing version 0.1.1 to 0.1.2
@@ -115,3 +115,3 @@ // Generated by CoffeeScript 1.3.3 | ||
# ParamMetaData (TYPE_INFO) | ||
# Some issues with rounding | ||
@@ -410,2 +410,7 @@ | ||
dataLengthLength: 2 | ||
}, | ||
0xF1: { | ||
type: 'XML', | ||
name: 'Xml', | ||
hasSchemaPresent: true | ||
} | ||
@@ -426,3 +431,2 @@ }; | ||
XMLTYPE: 0xF1 # XML (introduced in TDS 7.2) | ||
UDTTYPE: 0xF0 # CLR-UDT (introduced in TDS 7.2) | ||
@@ -429,0 +433,0 @@ |
@@ -11,3 +11,3 @@ // Generated by CoffeeScript 1.3.3 | ||
parse = function(buffer, tdsVersion) { | ||
var collation, collationData, dataLength, flags, metadata, precision, scale, type, typeNumber, userType; | ||
var collation, collationData, dataLength, flags, metadata, precision, scale, schema, schemaPresent, type, typeNumber, userType; | ||
if (tdsVersion < "7_2") { | ||
@@ -65,2 +65,13 @@ userType = buffer.readUInt16LE(); | ||
} | ||
schema = void 0; | ||
if (type.hasSchemaPresent) { | ||
schemaPresent = buffer.readUInt8(); | ||
if (schemaPresent === 0x01) { | ||
schema = { | ||
dbname: buffer.readBVarchar(), | ||
owningSchema: buffer.readBVarchar(), | ||
xmlSchemaCollection: buffer.readUsVarchar() | ||
}; | ||
} | ||
} | ||
return metadata = { | ||
@@ -73,3 +84,4 @@ userType: userType, | ||
scale: scale, | ||
dataLength: dataLength | ||
dataLength: dataLength, | ||
schema: schema | ||
}; | ||
@@ -76,0 +88,0 @@ }; |
// Generated by CoffeeScript 1.3.3 | ||
var metadataParse, parser; | ||
var DIGITS_REGEX, metadataParse, parser; | ||
metadataParse = require('../metadata-parser'); | ||
DIGITS_REGEX = /^\d+$/; | ||
parser = function(buffer, colMetadata, tdsVersion) { | ||
@@ -38,3 +40,5 @@ var c, colName, column, columnCount, columns, metadata, numberOfTableNameParts, part, tableName, _i; | ||
columns.push(column); | ||
columns[column.colName] = column; | ||
if (!(DIGITS_REGEX.test(column.colName))) { | ||
columns[column.colName] = column; | ||
} | ||
} | ||
@@ -41,0 +45,0 @@ return { |
// Generated by CoffeeScript 1.3.3 | ||
var parser, sprintf, valueParse; | ||
var DIGITS_REGEX, parser, sprintf, valueParse; | ||
@@ -8,2 +8,4 @@ valueParse = require('../value-parser'); | ||
DIGITS_REGEX = /^\d+$/; | ||
parser = function(buffer, columnsMetaData) { | ||
@@ -20,3 +22,5 @@ var column, columnMetaData, columns, value, _i, _len; | ||
columns.push(column); | ||
columns[columnMetaData.colName] = column; | ||
if (!(DIGITS_REGEX.test(columnMetaData.colName))) { | ||
columns[columnMetaData.colName] = column; | ||
} | ||
} | ||
@@ -23,0 +27,0 @@ return { |
@@ -22,3 +22,3 @@ // Generated by CoffeeScript 1.3.3 | ||
UNKNOWN_PLP_LEN = new Buffer([0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE]); | ||
UNKNOWN_PLP_LEN = new Buffer([0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]); | ||
@@ -201,2 +201,5 @@ parse = function(buffer, metaData) { | ||
break; | ||
case 'Xml': | ||
value = readMaxNChars(buffer); | ||
break; | ||
case 'SmallDateTime': | ||
@@ -203,0 +206,0 @@ value = readSmallDateTime(buffer); |
@@ -27,3 +27,3 @@ { | ||
], | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"main": "./lib/tedious.js", | ||
@@ -30,0 +30,0 @@ "repository": { |
@@ -14,3 +14,3 @@ Tedious (node implementation of TDS) | ||
------ | ||
Current version: v0.1.0 | ||
Current version: v0.1.2 | ||
@@ -17,0 +17,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
Sorry, the diff of this file is not supported yet
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
295369
3669