diff --git a/index.js b/index.js index a02d6f1..bd7d811 100644 --- a/index.js +++ b/index.js @@ -34,12 +34,12 @@ class ADODB { * @param {string} [scalar] * @returns {Promise} */ - execute(sql, scalar) { + execute(sql, scalar, commandtimeout) { debug('cmd:', 'execute'); debug('sql:', sql); const connection = this.connection; - const params = { connection, sql }; + const params = { connection, sql, commandtimeout }; if (arguments.length > 1) { debug('scalar:', scalar); @@ -55,13 +55,13 @@ class ADODB { * @param {string} sql * @returns {Promise} */ - query(sql) { + query(sql, commandtimeout) { debug('cmd:', 'query'); debug('sql:', sql); const connection = this.connection; - return this.proxy.exec('query', { connection, sql }); + return this.proxy.exec('query', { connection, sql, commandtimeout }); } /** @@ -71,13 +71,13 @@ class ADODB { * @param {string} [id] * @returns {Promise} */ - schema(type, criteria, id) { + schema(type, criteria, id, commandtimeout) { debug('cmd:', 'schema'); debug('type:', type); const length = arguments.length; const connection = this.connection; - const params = { connection, type }; + const params = { connection, type, commandtimeout }; if (length > 1) { debug('criteria:', criteria); diff --git a/lib/adodb.js b/lib/adodb.js index 61b8531..0e98492 100644 --- a/lib/adodb.js +++ b/lib/adodb.js @@ -6,4 +6,5 @@ * @description A Node.js JavaScript Client implementing the ADODB protocol. * @see https://github.com/nuintun/node-adodb#readme */ -!function(){"use strict";function t(t){t.State&&t.Close()}function e(t){WScript.StdOut.Write(JSON.stringify(t))}function n(t){return 7===t||64===t||133===t||134===t||135===t}function r(t){return 128===t||204===t||205===t}function o(e){var n=new ActiveXObject("ADODB.Stream");n.Type=1,n.Open(),n.Position=0,n.Write(e),n.Position=0,n.Type=2;var r=n.ReadText();return t(n),r}function i(t){var e=[],i=t.Fields;if(!t.BOF||!t.EOF){var u,c,f,a,s,p=i.Count;for(t.MoveFirst();!t.EOF;){for(c={},u=0;u