Comparing version 0.5.5 to 0.6.0
@@ -20,2 +20,3 @@ // Copyright 2013 SAP AG. | ||
var util = require('../util'); | ||
var ClientInfo = require('./ClientInfo'); | ||
var Transaction = require('./Transaction'); | ||
@@ -62,2 +63,3 @@ var MessageBuffer = require('./MessageBuffer'); | ||
this._state = new ConnectionState(); | ||
this._clientInfo = new ClientInfo(); | ||
this._statementContext = undefined; | ||
@@ -245,2 +247,5 @@ this._transaction = new Transaction(); | ||
} | ||
if (this._clientInfo.shouldSend(message.type)) { | ||
message.add(PartKind.CLIENT_INFO, this._clientInfo.getUpdatedProperties()); | ||
} | ||
@@ -279,2 +284,7 @@ debug('send', message); | ||
Connection.prototype.getClientInfo = function getClientInfo() { | ||
return this._clientInfo; | ||
} | ||
Connection.prototype.setStatementContext = function setStatementContext(options) { | ||
@@ -410,8 +420,4 @@ if (options && options.length) { | ||
function done(err, reply) { | ||
if (err) { | ||
return cb(err); | ||
} | ||
self._statementContext = undefined; | ||
self._state = new ConnectionState(); | ||
cb(null, reply); | ||
self.destroy(); | ||
cb(err, reply); | ||
} | ||
@@ -418,0 +424,0 @@ |
@@ -22,2 +22,4 @@ // Copyright 2013 SAP AG. | ||
var Fields = require('./Fields'); | ||
var TextList = require('./TextList'); | ||
var Int32 = require('./Int32'); | ||
@@ -41,2 +43,3 @@ var MultilineOptions = require('./MultilineOptions'); | ||
rw[PartKind.CLIENT_ID] = Text20; | ||
rw[PartKind.CLIENT_INFO] = TextList; | ||
rw[PartKind.CONNECT_OPTIONS] = Options; | ||
@@ -73,2 +76,2 @@ rw[PartKind.COMMIT_OPTIONS] = Options; | ||
} | ||
} | ||
} |
@@ -17,2 +17,3 @@ // Copyright 2013 SAP AG. | ||
exports.Connection = require('./Connection'); | ||
exports.ClientInfo = require('./ClientInfo'); | ||
exports.Parser = require('./Parser'); | ||
@@ -36,2 +37,2 @@ exports.Result = require('./Result'); | ||
exports.request = require('./request'); | ||
exports.tcp = require('./tcp'); | ||
exports.tcp = require('./tcp'); |
@@ -41,9 +41,4 @@ // Copyright 2013 SAP AG. | ||
exports.pid = process.pid; | ||
exports._debuglog = util.debuglog; | ||
try { | ||
exports._debuglog = util.debuglog || require('debuglog'); | ||
} catch (err) { | ||
// ignore error | ||
} | ||
exports.debuglog = function debuglog() { | ||
@@ -271,2 +266,2 @@ if (typeof exports._debuglog === 'function') { | ||
} | ||
exports.filter = filter; | ||
exports.filter = filter; |
{ | ||
"author": { | ||
"name": "Holger Koser", | ||
"email": "holger.koser@sap.com" | ||
}, | ||
"author": "Koser, Holger <holger.koser@sap.com>", | ||
"contributors": [ | ||
"Vachkov, Georgi <georgi.vachkov@sap.com>", | ||
"Penev, Alexander <alexander.penev@sap.com>" | ||
], | ||
"name": "hdb", | ||
"description": "SAP HANA Database Client for Node", | ||
"version": "0.5.5", | ||
"version": "0.6.0", | ||
"repository": { | ||
@@ -28,3 +29,3 @@ "type": "git", | ||
"engines": { | ||
"node": ">= 0.10" | ||
"node": ">= 0.12" | ||
}, | ||
@@ -37,3 +38,2 @@ "dependencies": {}, | ||
"coveralls": "^2.11.4", | ||
"debuglog": "^1.0.1", | ||
"fstream": "^1.0.8", | ||
@@ -46,2 +46,2 @@ "generic-pool": "^2.2.0", | ||
"optionalDependencies": {} | ||
} | ||
} |
@@ -353,2 +353,21 @@ SAP HANA Database Client for Node | ||
### Using Datetime types | ||
If you want to use datetime types in a prepared statement, | ||
be aware that strings like `'14.04.2016 12:41:11.215'` are not | ||
processed by the SAP HANA Database but by the node-hdb module. | ||
Therefore you must use the exact required format that would be returned | ||
by a selection made with this module. | ||
The formats are: | ||
```js | ||
TIME: '13:32:20' | ||
DATE: '2016-04-14' | ||
TIMESTAMP: '2016-04-14T13:32:20.737' | ||
SECONDDATE: '2016-04-14T13:32:20' | ||
``` | ||
Another possibility is to use the functions | ||
`TO_DATE`, `TO_DATS`, `TO_TIME` and `TO_TIMESTAMP` in your | ||
SQL statement to convert your string to a valid datetime type. | ||
Bulk Insert | ||
@@ -451,3 +470,3 @@ --------------- | ||
Reading large object as stream can be done if you use the `execute` method of client or statement. In this case for all LOB columns a [Lob](https://github.wdf.sap.corp/d021332/node-hdb/blob/master/lib/protocol/Lob.js#L74-L89) object is returned. You can call `createReadStream` or `read` in order create a readable stream or to read the LOB completely. | ||
Reading large object as stream can be done if you use the `execute` method of client or statement. In this case for all LOB columns a [Lob](https://github.com/SAP/node-hdb/blob/master/lib/protocol/Lob.js) object is returned. You can call `createReadStream` or `read` in order create a readable stream or to read the LOB completely. | ||
@@ -454,0 +473,0 @@ ### Write Streams |
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
271746
9
94
7711
529