@zowe/db2-for-zowe-cli 6.1.16 → 6.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -0
- package/lib/Db2PluginLifeCycle.d.ts +80 -0
- package/lib/Db2PluginLifeCycle.js +154 -0
- package/lib/Db2PluginLifeCycle.js.map +1 -0
- package/lib/imperative.js +1 -0
- package/lib/imperative.js.map +1 -1
- package/node_modules/adm-zip/LICENSE +21 -0
- package/node_modules/adm-zip/README.md +90 -0
- package/node_modules/adm-zip/adm-zip.js +994 -0
- package/node_modules/adm-zip/headers/entryHeader.js +384 -0
- package/node_modules/adm-zip/headers/index.js +2 -0
- package/node_modules/adm-zip/headers/mainHeader.js +177 -0
- package/node_modules/adm-zip/methods/deflater.js +33 -0
- package/node_modules/adm-zip/methods/index.js +3 -0
- package/node_modules/adm-zip/methods/inflater.js +34 -0
- package/node_modules/adm-zip/methods/zipcrypto.js +175 -0
- package/node_modules/adm-zip/package.json +56 -0
- package/node_modules/adm-zip/types.d.ts +223 -0
- package/node_modules/adm-zip/util/constants.js +142 -0
- package/node_modules/adm-zip/util/decoder.js +5 -0
- package/node_modules/adm-zip/util/errors.js +63 -0
- package/node_modules/adm-zip/util/fattr.js +76 -0
- package/node_modules/adm-zip/util/index.js +5 -0
- package/node_modules/adm-zip/util/utils.js +393 -0
- package/node_modules/adm-zip/zipEntry.js +390 -0
- package/node_modules/adm-zip/zipFile.js +456 -0
- package/node_modules/asynckit/LICENSE +21 -0
- package/node_modules/asynckit/README.md +233 -0
- package/node_modules/asynckit/bench.js +76 -0
- package/node_modules/asynckit/index.js +6 -0
- package/node_modules/asynckit/lib/abort.js +29 -0
- package/node_modules/asynckit/lib/async.js +34 -0
- package/node_modules/asynckit/lib/defer.js +26 -0
- package/node_modules/asynckit/lib/iterate.js +75 -0
- package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/node_modules/asynckit/lib/state.js +37 -0
- package/node_modules/asynckit/lib/streamify.js +141 -0
- package/node_modules/asynckit/lib/terminator.js +29 -0
- package/node_modules/asynckit/package.json +63 -0
- package/node_modules/asynckit/parallel.js +43 -0
- package/node_modules/asynckit/serial.js +17 -0
- package/node_modules/asynckit/serialOrdered.js +75 -0
- package/node_modules/asynckit/stream.js +21 -0
- package/node_modules/available-typed-arrays/.eslintrc +5 -0
- package/node_modules/available-typed-arrays/.github/FUNDING.yml +12 -0
- package/node_modules/available-typed-arrays/.nycrc +9 -0
- package/node_modules/available-typed-arrays/CHANGELOG.md +100 -0
- package/node_modules/available-typed-arrays/LICENSE +21 -0
- package/node_modules/available-typed-arrays/README.md +55 -0
- package/node_modules/available-typed-arrays/index.d.ts +8 -0
- package/node_modules/available-typed-arrays/index.js +17 -0
- package/node_modules/available-typed-arrays/package.json +93 -0
- package/node_modules/available-typed-arrays/test/index.js +18 -0
- package/node_modules/available-typed-arrays/tsconfig.json +49 -0
- package/node_modules/axios/CHANGELOG.md +1872 -0
- package/node_modules/axios/LICENSE +7 -0
- package/node_modules/axios/MIGRATION_GUIDE.md +877 -0
- package/node_modules/axios/README.md +2623 -0
- package/node_modules/axios/dist/axios.js +5509 -0
- package/node_modules/axios/dist/axios.min.js +5 -0
- package/node_modules/axios/dist/axios.min.js.map +1 -0
- package/node_modules/axios/dist/browser/axios.cjs +5469 -0
- package/node_modules/axios/dist/esm/axios.js +5490 -0
- package/node_modules/axios/dist/esm/axios.min.js +3 -0
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
- package/node_modules/axios/dist/node/axios.cjs +6356 -0
- package/node_modules/axios/index.d.cts +762 -0
- package/node_modules/axios/index.d.ts +783 -0
- package/node_modules/axios/index.js +45 -0
- package/node_modules/axios/lib/adapters/README.md +36 -0
- package/node_modules/axios/lib/adapters/adapters.js +132 -0
- package/node_modules/axios/lib/adapters/fetch.js +643 -0
- package/node_modules/axios/lib/adapters/http.js +1406 -0
- package/node_modules/axios/lib/adapters/xhr.js +228 -0
- package/node_modules/axios/lib/axios.js +89 -0
- package/node_modules/axios/lib/cancel/CancelToken.js +135 -0
- package/node_modules/axios/lib/cancel/CanceledError.js +22 -0
- package/node_modules/axios/lib/cancel/isCancel.js +5 -0
- package/node_modules/axios/lib/core/Axios.js +301 -0
- package/node_modules/axios/lib/core/AxiosError.js +219 -0
- package/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
- package/node_modules/axios/lib/core/InterceptorManager.js +72 -0
- package/node_modules/axios/lib/core/README.md +8 -0
- package/node_modules/axios/lib/core/buildFullPath.js +88 -0
- package/node_modules/axios/lib/core/dispatchRequest.js +89 -0
- package/node_modules/axios/lib/core/mergeConfig.js +174 -0
- package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
- package/node_modules/axios/lib/core/settle.js +27 -0
- package/node_modules/axios/lib/core/transformData.js +28 -0
- package/node_modules/axios/lib/defaults/index.js +177 -0
- package/node_modules/axios/lib/defaults/transitional.js +10 -0
- package/node_modules/axios/lib/env/README.md +3 -0
- package/node_modules/axios/lib/env/classes/FormData.js +2 -0
- package/node_modules/axios/lib/env/data.js +1 -0
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
- package/node_modules/axios/lib/helpers/Http2Sessions.js +119 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +78 -0
- package/node_modules/axios/lib/helpers/README.md +7 -0
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
- package/node_modules/axios/lib/helpers/bind.js +14 -0
- package/node_modules/axios/lib/helpers/buildURL.js +69 -0
- package/node_modules/axios/lib/helpers/callbackify.js +18 -0
- package/node_modules/axios/lib/helpers/combineURLs.js +23 -0
- package/node_modules/axios/lib/helpers/composeSignals.js +68 -0
- package/node_modules/axios/lib/helpers/cookies.js +64 -0
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
- package/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
- package/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
- package/node_modules/axios/lib/helpers/fromDataURI.js +68 -0
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
- package/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
- package/node_modules/axios/lib/helpers/null.js +2 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
- package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
- package/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
- package/node_modules/axios/lib/helpers/readBlob.js +15 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +105 -0
- package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +329 -0
- package/node_modules/axios/lib/helpers/speedometer.js +55 -0
- package/node_modules/axios/lib/helpers/spread.js +28 -0
- package/node_modules/axios/lib/helpers/throttle.js +44 -0
- package/node_modules/axios/lib/helpers/toFormData.js +286 -0
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
- package/node_modules/axios/lib/helpers/trackStream.js +89 -0
- package/node_modules/axios/lib/helpers/validator.js +112 -0
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/browser/index.js +13 -0
- package/node_modules/axios/lib/platform/common/utils.js +52 -0
- package/node_modules/axios/lib/platform/index.js +7 -0
- package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
- package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/node/index.js +37 -0
- package/node_modules/axios/lib/utils.js +1029 -0
- package/node_modules/axios/node_modules/agent-base/README.md +145 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.d.ts +78 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js +203 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/package.json +64 -0
- package/node_modules/axios/node_modules/agent-base/src/index.ts +345 -0
- package/node_modules/axios/node_modules/agent-base/src/promisify.ts +33 -0
- package/node_modules/axios/node_modules/https-proxy-agent/README.md +137 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/package.json +56 -0
- package/node_modules/axios/package.json +203 -0
- package/node_modules/big-integer/BigInteger.d.ts +2393 -0
- package/node_modules/big-integer/BigInteger.js +1453 -0
- package/node_modules/big-integer/BigInteger.min.js +1 -0
- package/node_modules/big-integer/LICENSE +24 -0
- package/node_modules/big-integer/README.md +589 -0
- package/node_modules/big-integer/bower.json +29 -0
- package/node_modules/big-integer/package.json +48 -0
- package/node_modules/big-integer/tsconfig.json +24 -0
- package/node_modules/bindings/LICENSE.md +22 -0
- package/node_modules/bindings/README.md +98 -0
- package/node_modules/bindings/bindings.js +221 -0
- package/node_modules/bindings/package.json +28 -0
- package/node_modules/buffer-alloc/index.js +32 -0
- package/node_modules/buffer-alloc/package.json +26 -0
- package/node_modules/buffer-alloc/readme.md +43 -0
- package/node_modules/buffer-alloc-unsafe/index.js +17 -0
- package/node_modules/buffer-alloc-unsafe/package.json +24 -0
- package/node_modules/buffer-alloc-unsafe/readme.md +46 -0
- package/node_modules/buffer-fill/index.js +113 -0
- package/node_modules/buffer-fill/package.json +16 -0
- package/node_modules/buffer-fill/readme.md +54 -0
- package/node_modules/call-bind/.eslintignore +1 -0
- package/node_modules/call-bind/.eslintrc +16 -0
- package/node_modules/call-bind/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind/.nycrc +9 -0
- package/node_modules/call-bind/CHANGELOG.md +115 -0
- package/node_modules/call-bind/LICENSE +21 -0
- package/node_modules/call-bind/README.md +64 -0
- package/node_modules/call-bind/callBound.js +15 -0
- package/node_modules/call-bind/index.js +24 -0
- package/node_modules/call-bind/package.json +93 -0
- package/node_modules/call-bind/test/callBound.js +54 -0
- package/node_modules/call-bind/test/index.js +82 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +42 -0
- package/node_modules/call-bound/LICENSE +21 -0
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +94 -0
- package/node_modules/call-bound/index.js +19 -0
- package/node_modules/call-bound/package.json +99 -0
- package/node_modules/call-bound/test/index.js +61 -0
- package/node_modules/call-bound/tsconfig.json +10 -0
- package/node_modules/combined-stream/License +19 -0
- package/node_modules/combined-stream/Readme.md +138 -0
- package/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/node_modules/combined-stream/package.json +25 -0
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/README.md +3 -0
- package/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/core-util-is/package.json +38 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/define-data-property/.eslintrc +24 -0
- package/node_modules/define-data-property/.github/FUNDING.yml +12 -0
- package/node_modules/define-data-property/.nycrc +13 -0
- package/node_modules/define-data-property/CHANGELOG.md +70 -0
- package/node_modules/define-data-property/LICENSE +21 -0
- package/node_modules/define-data-property/README.md +67 -0
- package/node_modules/define-data-property/index.d.ts +12 -0
- package/node_modules/define-data-property/index.js +56 -0
- package/node_modules/define-data-property/package.json +106 -0
- package/node_modules/define-data-property/test/index.js +392 -0
- package/node_modules/define-data-property/tsconfig.json +59 -0
- package/node_modules/delayed-stream/.npmignore +1 -0
- package/node_modules/delayed-stream/License +19 -0
- package/node_modules/delayed-stream/Makefile +7 -0
- package/node_modules/delayed-stream/Readme.md +141 -0
- package/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/node_modules/delayed-stream/package.json +27 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/end-of-stream/LICENSE +21 -0
- package/node_modules/end-of-stream/README.md +54 -0
- package/node_modules/end-of-stream/index.js +96 -0
- package/node_modules/end-of-stream/package.json +37 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +44 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +79 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +7 -0
- package/node_modules/es-set-tostringtag/.eslintrc +13 -0
- package/node_modules/es-set-tostringtag/.nycrc +9 -0
- package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
- package/node_modules/es-set-tostringtag/LICENSE +21 -0
- package/node_modules/es-set-tostringtag/README.md +53 -0
- package/node_modules/es-set-tostringtag/index.d.ts +10 -0
- package/node_modules/es-set-tostringtag/index.js +35 -0
- package/node_modules/es-set-tostringtag/package.json +78 -0
- package/node_modules/es-set-tostringtag/test/index.js +85 -0
- package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
- package/node_modules/file-uri-to-path/.npmignore +1 -0
- package/node_modules/file-uri-to-path/.travis.yml +30 -0
- package/node_modules/file-uri-to-path/History.md +21 -0
- package/node_modules/file-uri-to-path/LICENSE +20 -0
- package/node_modules/file-uri-to-path/README.md +74 -0
- package/node_modules/file-uri-to-path/index.d.ts +2 -0
- package/node_modules/file-uri-to-path/index.js +66 -0
- package/node_modules/file-uri-to-path/package.json +32 -0
- package/node_modules/file-uri-to-path/test/test.js +24 -0
- package/node_modules/file-uri-to-path/test/tests.json +13 -0
- package/node_modules/follow-redirects/LICENSE +18 -0
- package/node_modules/follow-redirects/README.md +157 -0
- package/node_modules/follow-redirects/debug.js +15 -0
- package/node_modules/follow-redirects/http.js +1 -0
- package/node_modules/follow-redirects/https.js +1 -0
- package/node_modules/follow-redirects/index.js +709 -0
- package/node_modules/follow-redirects/package.json +58 -0
- package/node_modules/for-each/.editorconfig +20 -0
- package/node_modules/for-each/.eslintrc +30 -0
- package/node_modules/for-each/.github/FUNDING.yml +12 -0
- package/node_modules/for-each/.github/SECURITY.md +3 -0
- package/node_modules/for-each/.nycrc +8 -0
- package/node_modules/for-each/CHANGELOG.md +107 -0
- package/node_modules/for-each/LICENSE +22 -0
- package/node_modules/for-each/README.md +39 -0
- package/node_modules/for-each/index.d.ts +35 -0
- package/node_modules/for-each/index.js +69 -0
- package/node_modules/for-each/package.json +76 -0
- package/node_modules/for-each/test/test.js +224 -0
- package/node_modules/for-each/tsconfig.json +8 -0
- package/node_modules/form-data/CHANGELOG.md +686 -0
- package/node_modules/form-data/License +19 -0
- package/node_modules/form-data/README.md +355 -0
- package/node_modules/form-data/index.d.ts +62 -0
- package/node_modules/form-data/lib/browser.js +4 -0
- package/node_modules/form-data/lib/form_data.js +506 -0
- package/node_modules/form-data/lib/populate.js +10 -0
- package/node_modules/form-data/package.json +82 -0
- package/node_modules/fs-constants/LICENSE +21 -0
- package/node_modules/fs-constants/README.md +26 -0
- package/node_modules/fs-constants/browser.js +1 -0
- package/node_modules/fs-constants/index.js +1 -0
- package/node_modules/fs-constants/package.json +19 -0
- package/node_modules/fs-extra/LICENSE +15 -0
- package/node_modules/fs-extra/README.md +294 -0
- package/node_modules/fs-extra/lib/copy/copy-sync.js +176 -0
- package/node_modules/fs-extra/lib/copy/copy.js +180 -0
- package/node_modules/fs-extra/lib/copy/index.js +7 -0
- package/node_modules/fs-extra/lib/empty/index.js +39 -0
- package/node_modules/fs-extra/lib/ensure/file.js +66 -0
- package/node_modules/fs-extra/lib/ensure/index.js +23 -0
- package/node_modules/fs-extra/lib/ensure/link.js +64 -0
- package/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
- package/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
- package/node_modules/fs-extra/lib/ensure/symlink.js +108 -0
- package/node_modules/fs-extra/lib/esm.mjs +68 -0
- package/node_modules/fs-extra/lib/fs/index.js +146 -0
- package/node_modules/fs-extra/lib/index.js +16 -0
- package/node_modules/fs-extra/lib/json/index.js +16 -0
- package/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- package/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- package/node_modules/fs-extra/lib/json/output-json.js +12 -0
- package/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- package/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
- package/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/node_modules/fs-extra/lib/move/index.js +7 -0
- package/node_modules/fs-extra/lib/move/move-sync.js +55 -0
- package/node_modules/fs-extra/lib/move/move.js +59 -0
- package/node_modules/fs-extra/lib/output-file/index.js +31 -0
- package/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- package/node_modules/fs-extra/lib/remove/index.js +17 -0
- package/node_modules/fs-extra/lib/util/async.js +29 -0
- package/node_modules/fs-extra/lib/util/stat.js +165 -0
- package/node_modules/fs-extra/lib/util/utimes.js +53 -0
- package/node_modules/fs-extra/package.json +71 -0
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/graceful-fs/LICENSE +15 -0
- package/node_modules/graceful-fs/README.md +143 -0
- package/node_modules/graceful-fs/clone.js +23 -0
- package/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/node_modules/graceful-fs/package.json +53 -0
- package/node_modules/graceful-fs/polyfills.js +355 -0
- package/node_modules/has-property-descriptors/.eslintrc +13 -0
- package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
- package/node_modules/has-property-descriptors/.nycrc +9 -0
- package/node_modules/has-property-descriptors/CHANGELOG.md +35 -0
- package/node_modules/has-property-descriptors/LICENSE +21 -0
- package/node_modules/has-property-descriptors/README.md +43 -0
- package/node_modules/has-property-descriptors/index.js +22 -0
- package/node_modules/has-property-descriptors/package.json +77 -0
- package/node_modules/has-property-descriptors/test/index.js +57 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +5 -0
- package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
- package/node_modules/has-tostringtag/LICENSE +21 -0
- package/node_modules/has-tostringtag/README.md +46 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +8 -0
- package/node_modules/has-tostringtag/package.json +108 -0
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +8 -0
- package/node_modules/has-tostringtag/test/index.js +21 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
- package/node_modules/has-tostringtag/test/tests.js +15 -0
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +58 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/ibm_db/APIDocumentation.md +2024 -0
- package/node_modules/ibm_db/LICENSE +23 -0
- package/node_modules/ibm_db/README.md +735 -0
- package/node_modules/ibm_db/binding.gyp +98 -0
- package/node_modules/ibm_db/installer/clidriver/bin/db2cli +0 -0
- package/node_modules/ibm_db/installer/clidriver/bin/db2diag +0 -0
- package/node_modules/ibm_db/installer/clidriver/bin/db2drdat +0 -0
- package/node_modules/ibm_db/installer/clidriver/bin/db2dsdcfgfill +0 -0
- package/node_modules/ibm_db/installer/clidriver/bin/db2ldcfg +0 -0
- package/node_modules/ibm_db/installer/clidriver/bin/db2lddrg +0 -0
- package/node_modules/ibm_db/installer/clidriver/bin/db2level +0 -0
- package/node_modules/ibm_db/installer/clidriver/bin/db2support +0 -0
- package/node_modules/ibm_db/installer/clidriver/bin/db2trc +0 -0
- package/node_modules/ibm_db/installer/clidriver/bnd/db2ajgrt.bnd +0 -0
- package/node_modules/ibm_db/installer/clidriver/bnd/db2cli.bnd +0 -0
- package/node_modules/ibm_db/installer/clidriver/bnd/db2cli.lst +4 -0
- package/node_modules/ibm_db/installer/clidriver/bnd/db2clipk.bnd +0 -0
- package/node_modules/ibm_db/installer/clidriver/bnd/db2clist.bnd +0 -0
- package/node_modules/ibm_db/installer/clidriver/bnd/db2spcdb.bnd +0 -0
- package/node_modules/ibm_db/installer/clidriver/cfg/db2cli.ini.sample +16 -0
- package/node_modules/ibm_db/installer/clidriver/cfg/db2dsdriver.cfg.sample +50 -0
- package/node_modules/ibm_db/installer/clidriver/cfg/db2dsdriver.xsd +216 -0
- package/node_modules/ibm_db/installer/clidriver/cfgcache/conlic.bin +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/04370923.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/08500923.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/08501252.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/08600923.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/08630923.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/09230437.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/09230850.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/09230860.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/09231043.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/09231051.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/09231114.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/09231208.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/09231252.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/09231275.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/09241252.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/09370950.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/10430923.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/10510923.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/11140923.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/12080923.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/12520850.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/12520923.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/12750923.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/1388ucs2.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/IBM00850.ucs +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/IBM00923.ucs +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/alt/IBM01252.ucs +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/ms/0930ucs2.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/ms/0939ucs2.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/ms/0943ucs2.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/ms/0954ucs2.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/ms/1390ucs2.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/ms/1399ucs2.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/ms/5039ucs2.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/conv/ms/ucs20943.cnv +0 -0
- package/node_modules/ibm_db/installer/clidriver/db2dump/db2diag.log +0 -0
- package/node_modules/ibm_db/installer/clidriver/include/sql.h +3172 -0
- package/node_modules/ibm_db/installer/clidriver/include/sqlca.h +119 -0
- package/node_modules/ibm_db/installer/clidriver/include/sqlcli.h +1042 -0
- package/node_modules/ibm_db/installer/clidriver/include/sqlcli1.h +1962 -0
- package/node_modules/ibm_db/installer/clidriver/include/sqlda.h +303 -0
- package/node_modules/ibm_db/installer/clidriver/include/sqlenv.h +7409 -0
- package/node_modules/ibm_db/installer/clidriver/include/sqlext.h +2189 -0
- package/node_modules/ibm_db/installer/clidriver/include/sqlstate.h +1500 -0
- package/node_modules/ibm_db/installer/clidriver/include/sqlsystm.h +119 -0
- package/node_modules/ibm_db/installer/clidriver/include/sqltypes.h +22 -0
- package/node_modules/ibm_db/installer/clidriver/include/sqlucode.h +22 -0
- package/node_modules/ibm_db/installer/clidriver/include/sqlunx.h +24 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/C/icc/Standard_International_Program_License_Agreement.pdf +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/C/icc/icclib/ICCSIG.txt +23 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/C/icc/icclib/libicclib084.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/N/icc/Standard_International_Program_License_Agreement.pdf +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/N/icc/icclib/ICCSIG.txt +23 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/N/icc/icclib/libicclib085.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8acmeidup_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8cms_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8dbfl_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8drld_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8iccs_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8kicc_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8km2_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8km_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8ldap_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8p11_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8ssl_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8sys_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/icc/libgsk8valn_64.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/libDB2xml4c.so.58.0 +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/libdb2.so.1 +0 -0
- package/node_modules/ibm_db/installer/clidriver/lib/libdb2clixml4c.so.1 +0 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_cs +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_de +747 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_el +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_en +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_es +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_fr +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_in +747 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_it +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_ja +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_ko +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_lt +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_pl +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_pt +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_ru +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_sl +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_tr +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_zh +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/UNIX/odbc_LI_zh_TW +743 -0
- package/node_modules/ibm_db/installer/clidriver/license/dsdriver_fixlist.html +134 -0
- package/node_modules/ibm_db/installer/clidriver/license/odbc_REDIST.txt +216 -0
- package/node_modules/ibm_db/installer/clidriver/license/odbc_notices.txt +444 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2adm.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2admh.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2caem.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2cklog.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2cli.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2clia1.lst +35 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2clias.lst +21 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2clih.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2clit.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2clp.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2clp2.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2diag.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2fodc.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2sql.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2sqlh.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2stt.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2supp.mo +0 -0
- package/node_modules/ibm_db/installer/clidriver/properties/version/ibm.com_IBM_Data_Server_Driver_for_ODBC_and_CLI-12.1.4.swidtag +6 -0
- package/node_modules/ibm_db/installer/clidriver/scripts/setenv.sh +25 -0
- package/node_modules/ibm_db/installer/clidriver/scripts/testconnection.sh +67 -0
- package/node_modules/ibm_db/installer/clidriver/security64/plugin/IBM/client/IBMIAMauth.so +0 -0
- package/node_modules/ibm_db/installer/clidriver/security64/plugin/IBM/client/IBMkrb5.so +0 -0
- package/node_modules/ibm_db/installer/driverInstall.js +958 -0
- package/node_modules/ibm_db/installer/ifx.sh +38 -0
- package/node_modules/ibm_db/installer/setenv.sh +23 -0
- package/node_modules/ibm_db/installer/testODBCConnection.bat +51 -0
- package/node_modules/ibm_db/installer/testODBCConnection.sh +61 -0
- package/node_modules/ibm_db/lib/climacros.js +431 -0
- package/node_modules/ibm_db/lib/odbc.js +3487 -0
- package/node_modules/ibm_db/lib/simple-queue.js +42 -0
- package/node_modules/ibm_db/package.json +70 -0
- package/node_modules/ibm_db/src/odbc.cpp +1396 -0
- package/node_modules/ibm_db/src/odbc.h +473 -0
- package/node_modules/ibm_db/src/odbc_connection.cpp +1612 -0
- package/node_modules/ibm_db/src/odbc_connection.h +215 -0
- package/node_modules/ibm_db/src/odbc_result.cpp +1547 -0
- package/node_modules/ibm_db/src/odbc_result.h +152 -0
- package/node_modules/ibm_db/src/odbc_statement.cpp +861 -0
- package/node_modules/ibm_db/src/odbc_statement.h +135 -0
- package/node_modules/ibm_db/src/strptime.c +389 -0
- package/node_modules/ibm_db/src/strptime.h +47 -0
- package/node_modules/ibm_db/test/README +23 -0
- package/node_modules/ibm_db/test/bench-insert.js +62 -0
- package/node_modules/ibm_db/test/bench-insertBatch10.js +74 -0
- package/node_modules/ibm_db/test/bench-insertBatch100.js +75 -0
- package/node_modules/ibm_db/test/bench-insertBatch1000.js +75 -0
- package/node_modules/ibm_db/test/bench-insertBatch10000.js +75 -0
- package/node_modules/ibm_db/test/bench-prepare-bind-execute-closeSync.js +60 -0
- package/node_modules/ibm_db/test/bench-prepare-bind-executeNonQuery.js +53 -0
- package/node_modules/ibm_db/test/bench-prepare-bindSync-execute-closeSync.js +50 -0
- package/node_modules/ibm_db/test/bench-prepare-bindSync-executeNonQuery.js +48 -0
- package/node_modules/ibm_db/test/bench-prepare-execute-closeSync.js +51 -0
- package/node_modules/ibm_db/test/bench-prepare-executeNonQuery.js +47 -0
- package/node_modules/ibm_db/test/bench-prepare-not.js +43 -0
- package/node_modules/ibm_db/test/bench-query-fetch.js +59 -0
- package/node_modules/ibm_db/test/bench-query-fetchAll.js +49 -0
- package/node_modules/ibm_db/test/bench-query-fetchAllSync.js +43 -0
- package/node_modules/ibm_db/test/bench-query.js +40 -0
- package/node_modules/ibm_db/test/bench-querySync-fetchArray.js +28 -0
- package/node_modules/ibm_db/test/bench-querySync.js +29 -0
- package/node_modules/ibm_db/test/common.d.ts +10 -0
- package/node_modules/ibm_db/test/common.js +127 -0
- package/node_modules/ibm_db/test/config.json +7 -0
- package/node_modules/ibm_db/test/config.zos.json +4 -0
- package/node_modules/ibm_db/test/data/panda.jpg +0 -0
- package/node_modules/ibm_db/test/data/phool.jpg +0 -0
- package/node_modules/ibm_db/test/data/pushpa.jpg +0 -0
- package/node_modules/ibm_db/test/data/sample1.txt +10 -0
- package/node_modules/ibm_db/test/data/sample2.txt +1 -0
- package/node_modules/ibm_db/test/data/sample3.txt +1 -0
- package/node_modules/ibm_db/test/data/sampledoc.docx +0 -0
- package/node_modules/ibm_db/test/data/trc.fmt +30114 -0
- package/node_modules/ibm_db/test/disabled/test-binding-statement-rebinding.js +59 -0
- package/node_modules/ibm_db/test/disabled/test-open-dont-close.js +12 -0
- package/node_modules/ibm_db/test/disabled/test-param-select-with-booleans-only.js +21 -0
- package/node_modules/ibm_db/test/disabled/test-param-select-with-decimals-only.js +20 -0
- package/node_modules/ibm_db/test/disabled/test-param-select-with-null.js +21 -0
- package/node_modules/ibm_db/test/disabled/test-param-select-with-nulls-mixed.js +23 -0
- package/node_modules/ibm_db/test/disabled/test-param-select-with-numbers-mixed.js +22 -0
- package/node_modules/ibm_db/test/disabled/test-param-select-with-numbers-only.js +24 -0
- package/node_modules/ibm_db/test/disabled/test-param-select-with-strings-only.js +23 -0
- package/node_modules/ibm_db/test/disabled/test-param-select-with-unicode.js +15 -0
- package/node_modules/ibm_db/test/disabled/test-prepare-bind-execute-closeSync.js +62 -0
- package/node_modules/ibm_db/test/disabled/test-prepare-bind-execute-error.js +49 -0
- package/node_modules/ibm_db/test/disabled/test-prepare-bind-execute-long-string.js +63 -0
- package/node_modules/ibm_db/test/disabled/test-prepare-bind-executeNonQuery.js +63 -0
- package/node_modules/ibm_db/test/disabled/test-prepare-bindSync-execute-closeSync.js +46 -0
- package/node_modules/ibm_db/test/disabled/test-prepare-bindSync-executeNonQuery.js +50 -0
- package/node_modules/ibm_db/test/disabled/test-prepare.js +34 -0
- package/node_modules/ibm_db/test/disabled/test-prepareSync.js +29 -0
- package/node_modules/ibm_db/test/disabled/test-query-select-fetchAll.js +23 -0
- package/node_modules/ibm_db/test/disabled/test-query-select-fetchAllSync.js +23 -0
- package/node_modules/ibm_db/test/disabled/test-query-select-unicode.js +15 -0
- package/node_modules/ibm_db/test/disabled/test-querySync-select-unicode.js +20 -0
- package/node_modules/ibm_db/test/nodeEE-leak-huge-query.js +152 -0
- package/node_modules/ibm_db/test/nodeEE-leak-multiple-query-multiple-connections.js +149 -0
- package/node_modules/ibm_db/test/nodeEE-leak-multiple-query-pool-connections.js +155 -0
- package/node_modules/ibm_db/test/nodeEE-leak-multiple-query.js +134 -0
- package/node_modules/ibm_db/test/nodeEE-stress-async-waterfall-multiple-connections.js +175 -0
- package/node_modules/ibm_db/test/nodeEE-stress-async-waterfall.js +169 -0
- package/node_modules/ibm_db/test/nodeEE-stress-mixed-query-multiple-connections.js +160 -0
- package/node_modules/ibm_db/test/nodeEE-stress-mixed-query.js +149 -0
- package/node_modules/ibm_db/test/odbc-bench.c +123 -0
- package/node_modules/ibm_db/test/perfTest.js +53 -0
- package/node_modules/ibm_db/test/quick-example.sh +30 -0
- package/node_modules/ibm_db/test/quick-example.ts +80 -0
- package/node_modules/ibm_db/test/run-bench.js +96 -0
- package/node_modules/ibm_db/test/run-nodeEE.js +132 -0
- package/node_modules/ibm_db/test/run-tests.js +138 -0
- package/node_modules/ibm_db/test/sql-cli.js +28 -0
- package/node_modules/ibm_db/test/test-affected-rows.js +55 -0
- package/node_modules/ibm_db/test/test-all-data-types.js +109 -0
- package/node_modules/ibm_db/test/test-array-insert.js +178 -0
- package/node_modules/ibm_db/test/test-async-await.js +105 -0
- package/node_modules/ibm_db/test/test-attributes.js +34 -0
- package/node_modules/ibm_db/test/test-bad-connection-string.js +30 -0
- package/node_modules/ibm_db/test/test-bad-pool-connection-prepare-execute.js +57 -0
- package/node_modules/ibm_db/test/test-basic-test.js +138 -0
- package/node_modules/ibm_db/test/test-binary-array-insert.js +73 -0
- package/node_modules/ibm_db/test/test-binding-connection-timeOut.js +31 -0
- package/node_modules/ibm_db/test/test-binding-statement-executeSync.js +84 -0
- package/node_modules/ibm_db/test/test-binding-transaction-commit.js +79 -0
- package/node_modules/ibm_db/test/test-binding-transaction-commitSync.js +53 -0
- package/node_modules/ibm_db/test/test-blob-from-file.js +90 -0
- package/node_modules/ibm_db/test/test-blob-insert.js +144 -0
- package/node_modules/ibm_db/test/test-blob-stream-insert.js +299 -0
- package/node_modules/ibm_db/test/test-blob-to-file.js +370 -0
- package/node_modules/ibm_db/test/test-block-fetch.js +364 -0
- package/node_modules/ibm_db/test/test-blocking-issue210.js +123 -0
- package/node_modules/ibm_db/test/test-call-async.js +64 -0
- package/node_modules/ibm_db/test/test-call-stmt.js +53 -0
- package/node_modules/ibm_db/test/test-chinese-char.js +59 -0
- package/node_modules/ibm_db/test/test-closed.js +14 -0
- package/node_modules/ibm_db/test/test-connection-object.js +16 -0
- package/node_modules/ibm_db/test/test-date.js +32 -0
- package/node_modules/ibm_db/test/test-dbclob.js +93 -0
- package/node_modules/ibm_db/test/test-decimals.js +135 -0
- package/node_modules/ibm_db/test/test-describe-column.js +92 -0
- package/node_modules/ibm_db/test/test-describe-database.js +18 -0
- package/node_modules/ibm_db/test/test-describe-table.js +31 -0
- package/node_modules/ibm_db/test/test-domains-open.js +19 -0
- package/node_modules/ibm_db/test/test-executeFile.js +167 -0
- package/node_modules/ibm_db/test/test-executeFileSync.js +86 -0
- package/node_modules/ibm_db/test/test-fetch-apis.js +146 -0
- package/node_modules/ibm_db/test/test-fetchN.js +130 -0
- package/node_modules/ibm_db/test/test-getinfo.js +197 -0
- package/node_modules/ibm_db/test/test-global-open-close.js +11 -0
- package/node_modules/ibm_db/test/test-ibm-db-issue14.js +58 -0
- package/node_modules/ibm_db/test/test-ibm-db-issue17.js +54 -0
- package/node_modules/ibm_db/test/test-ibm-db-issue18.js +54 -0
- package/node_modules/ibm_db/test/test-instantiate-one-and-end.js +9 -0
- package/node_modules/ibm_db/test/test-issue-1059-fetchAll-undefined.js +67 -0
- package/node_modules/ibm_db/test/test-issue-54.js +39 -0
- package/node_modules/ibm_db/test/test-issue-get-column-value-2.js +44 -0
- package/node_modules/ibm_db/test/test-issue211.js +80 -0
- package/node_modules/ibm_db/test/test-issue253.js +39 -0
- package/node_modules/ibm_db/test/test-max-pool-size.js +96 -0
- package/node_modules/ibm_db/test/test-memory-leaks-new-objects.js +33 -0
- package/node_modules/ibm_db/test/test-multi-open-close.js +45 -0
- package/node_modules/ibm_db/test/test-multi-open-query-close.js +75 -0
- package/node_modules/ibm_db/test/test-multi-openSync-closeSync.js +52 -0
- package/node_modules/ibm_db/test/test-open-close.js +29 -0
- package/node_modules/ibm_db/test/test-open-connectTimeout.js +33 -0
- package/node_modules/ibm_db/test/test-openSync.js +31 -0
- package/node_modules/ibm_db/test/test-pool-close.js +120 -0
- package/node_modules/ibm_db/test/test-pool-connect.js +36 -0
- package/node_modules/ibm_db/test/test-pool-idle-connection.js +72 -0
- package/node_modules/ibm_db/test/test-pool-rollbackTransaction.js +35 -0
- package/node_modules/ibm_db/test/test-pool-stale-connections.js +111 -0
- package/node_modules/ibm_db/test/test-pool-uncommited.js +33 -0
- package/node_modules/ibm_db/test/test-prepareSync-bad-sql.js +34 -0
- package/node_modules/ibm_db/test/test-prepareSync-multiple-execution.js +93 -0
- package/node_modules/ibm_db/test/test-promise-all-data-types.js +42 -0
- package/node_modules/ibm_db/test/test-promise-open-close.js +33 -0
- package/node_modules/ibm_db/test/test-query-create-table-fetchSync.js +23 -0
- package/node_modules/ibm_db/test/test-query-create-table.js +12 -0
- package/node_modules/ibm_db/test/test-query-drop-table.js +13 -0
- package/node_modules/ibm_db/test/test-query-insert.js +38 -0
- package/node_modules/ibm_db/test/test-query-select-fetch.js +21 -0
- package/node_modules/ibm_db/test/test-query-select-fetchMode-array.js +17 -0
- package/node_modules/ibm_db/test/test-query-select.js +64 -0
- package/node_modules/ibm_db/test/test-queryResult.js +35 -0
- package/node_modules/ibm_db/test/test-queryStream.js +43 -0
- package/node_modules/ibm_db/test/test-querySync-select-with-exception.js +25 -0
- package/node_modules/ibm_db/test/test-querySync-select.js +28 -0
- package/node_modules/ibm_db/test/test-quick-example.js +25 -0
- package/node_modules/ibm_db/test/test-require-and-end.js +8 -0
- package/node_modules/ibm_db/test/test-row-array-insert.js +167 -0
- package/node_modules/ibm_db/test/test-sp-array.js +54 -0
- package/node_modules/ibm_db/test/test-sp-dbc-6000.js +88 -0
- package/node_modules/ibm_db/test/test-sp-memleak.js +136 -0
- package/node_modules/ibm_db/test/test-sp-resultset-execute.js +269 -0
- package/node_modules/ibm_db/test/test-sp-resultset.js +228 -0
- package/node_modules/ibm_db/test/test-statement-close.js +118 -0
- package/node_modules/ibm_db/test/test-transaction-commit-sync.js +54 -0
- package/node_modules/ibm_db/test/test-transaction-commit.js +79 -0
- package/node_modules/ibm_db/test/test-typescript.js +48 -0
- package/node_modules/ibm_db/test/test-xml-datatype.js +70 -0
- package/node_modules/ibm_db/test/testWebApp.js +56 -0
- package/node_modules/ibm_db/test/trace +51 -0
- package/node_modules/ibm_db/test/typescript-apis-test.js +978 -0
- package/node_modules/ibm_db/test/webapp.html +17 -0
- package/node_modules/ibm_db/test/webapp.js +79 -0
- package/node_modules/ibm_db/typescript/README.md +29 -0
- package/node_modules/ibm_db/typescript/dist/ConnStr.d.ts +8 -0
- package/node_modules/ibm_db/typescript/dist/DB2Error.d.ts +5 -0
- package/node_modules/ibm_db/typescript/dist/Database.d.ts +116 -0
- package/node_modules/ibm_db/typescript/dist/DescribeObject.d.ts +7 -0
- package/node_modules/ibm_db/typescript/dist/ODBC.d.ts +29 -0
- package/node_modules/ibm_db/typescript/dist/ODBCConnection.d.ts +39 -0
- package/node_modules/ibm_db/typescript/dist/ODBCResult.d.ts +53 -0
- package/node_modules/ibm_db/typescript/dist/ODBCStatement.d.ts +33 -0
- package/node_modules/ibm_db/typescript/dist/Options.d.ts +14 -0
- package/node_modules/ibm_db/typescript/dist/Pool.d.ts +30 -0
- package/node_modules/ibm_db/typescript/dist/PoolOptions.d.ts +7 -0
- package/node_modules/ibm_db/typescript/dist/attributes.d.ts +214 -0
- package/node_modules/ibm_db/typescript/dist/index.d.ts +24 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/is-callable/.editorconfig +31 -0
- package/node_modules/is-callable/.eslintrc +10 -0
- package/node_modules/is-callable/.github/FUNDING.yml +12 -0
- package/node_modules/is-callable/.nycrc +9 -0
- package/node_modules/is-callable/CHANGELOG.md +158 -0
- package/node_modules/is-callable/LICENSE +22 -0
- package/node_modules/is-callable/README.md +83 -0
- package/node_modules/is-callable/index.js +101 -0
- package/node_modules/is-callable/package.json +106 -0
- package/node_modules/is-callable/test/index.js +244 -0
- package/node_modules/is-typed-array/.editorconfig +20 -0
- package/node_modules/is-typed-array/.eslintrc +13 -0
- package/node_modules/is-typed-array/.github/FUNDING.yml +12 -0
- package/node_modules/is-typed-array/.nycrc +9 -0
- package/node_modules/is-typed-array/CHANGELOG.md +166 -0
- package/node_modules/is-typed-array/LICENSE +22 -0
- package/node_modules/is-typed-array/README.md +70 -0
- package/node_modules/is-typed-array/index.d.ts +9 -0
- package/node_modules/is-typed-array/index.js +8 -0
- package/node_modules/is-typed-array/package.json +129 -0
- package/node_modules/is-typed-array/test/index.js +111 -0
- package/node_modules/is-typed-array/tsconfig.json +6 -0
- package/node_modules/isarray/LICENSE +21 -0
- package/node_modules/isarray/README.md +38 -0
- package/node_modules/isarray/index.js +5 -0
- package/node_modules/isarray/package.json +48 -0
- package/node_modules/jsonfile/LICENSE +15 -0
- package/node_modules/jsonfile/README.md +230 -0
- package/node_modules/jsonfile/index.js +88 -0
- package/node_modules/jsonfile/package.json +40 -0
- package/node_modules/jsonfile/utils.js +18 -0
- package/node_modules/lodash/LICENSE +47 -0
- package/node_modules/lodash/README.md +39 -0
- package/node_modules/lodash/_DataView.js +7 -0
- package/node_modules/lodash/_Hash.js +32 -0
- package/node_modules/lodash/_LazyWrapper.js +28 -0
- package/node_modules/lodash/_ListCache.js +32 -0
- package/node_modules/lodash/_LodashWrapper.js +22 -0
- package/node_modules/lodash/_Map.js +7 -0
- package/node_modules/lodash/_MapCache.js +32 -0
- package/node_modules/lodash/_Promise.js +7 -0
- package/node_modules/lodash/_Set.js +7 -0
- package/node_modules/lodash/_SetCache.js +27 -0
- package/node_modules/lodash/_Stack.js +27 -0
- package/node_modules/lodash/_Symbol.js +6 -0
- package/node_modules/lodash/_Uint8Array.js +6 -0
- package/node_modules/lodash/_WeakMap.js +7 -0
- package/node_modules/lodash/_apply.js +21 -0
- package/node_modules/lodash/_arrayAggregator.js +22 -0
- package/node_modules/lodash/_arrayEach.js +22 -0
- package/node_modules/lodash/_arrayEachRight.js +21 -0
- package/node_modules/lodash/_arrayEvery.js +23 -0
- package/node_modules/lodash/_arrayFilter.js +25 -0
- package/node_modules/lodash/_arrayIncludes.js +17 -0
- package/node_modules/lodash/_arrayIncludesWith.js +22 -0
- package/node_modules/lodash/_arrayLikeKeys.js +49 -0
- package/node_modules/lodash/_arrayMap.js +21 -0
- package/node_modules/lodash/_arrayPush.js +20 -0
- package/node_modules/lodash/_arrayReduce.js +26 -0
- package/node_modules/lodash/_arrayReduceRight.js +24 -0
- package/node_modules/lodash/_arraySample.js +15 -0
- package/node_modules/lodash/_arraySampleSize.js +17 -0
- package/node_modules/lodash/_arrayShuffle.js +15 -0
- package/node_modules/lodash/_arraySome.js +23 -0
- package/node_modules/lodash/_asciiSize.js +12 -0
- package/node_modules/lodash/_asciiToArray.js +12 -0
- package/node_modules/lodash/_asciiWords.js +15 -0
- package/node_modules/lodash/_assignMergeValue.js +20 -0
- package/node_modules/lodash/_assignValue.js +28 -0
- package/node_modules/lodash/_assocIndexOf.js +21 -0
- package/node_modules/lodash/_baseAggregator.js +21 -0
- package/node_modules/lodash/_baseAssign.js +17 -0
- package/node_modules/lodash/_baseAssignIn.js +17 -0
- package/node_modules/lodash/_baseAssignValue.js +25 -0
- package/node_modules/lodash/_baseAt.js +23 -0
- package/node_modules/lodash/_baseClamp.js +22 -0
- package/node_modules/lodash/_baseClone.js +166 -0
- package/node_modules/lodash/_baseConforms.js +18 -0
- package/node_modules/lodash/_baseConformsTo.js +27 -0
- package/node_modules/lodash/_baseCreate.js +30 -0
- package/node_modules/lodash/_baseDelay.js +21 -0
- package/node_modules/lodash/_baseDifference.js +67 -0
- package/node_modules/lodash/_baseEach.js +14 -0
- package/node_modules/lodash/_baseEachRight.js +14 -0
- package/node_modules/lodash/_baseEvery.js +21 -0
- package/node_modules/lodash/_baseExtremum.js +32 -0
- package/node_modules/lodash/_baseFill.js +32 -0
- package/node_modules/lodash/_baseFilter.js +21 -0
- package/node_modules/lodash/_baseFindIndex.js +24 -0
- package/node_modules/lodash/_baseFindKey.js +23 -0
- package/node_modules/lodash/_baseFlatten.js +38 -0
- package/node_modules/lodash/_baseFor.js +16 -0
- package/node_modules/lodash/_baseForOwn.js +16 -0
- package/node_modules/lodash/_baseForOwnRight.js +16 -0
- package/node_modules/lodash/_baseForRight.js +15 -0
- package/node_modules/lodash/_baseFunctions.js +19 -0
- package/node_modules/lodash/_baseGet.js +24 -0
- package/node_modules/lodash/_baseGetAllKeys.js +20 -0
- package/node_modules/lodash/_baseGetTag.js +28 -0
- package/node_modules/lodash/_baseGt.js +14 -0
- package/node_modules/lodash/_baseHas.js +19 -0
- package/node_modules/lodash/_baseHasIn.js +13 -0
- package/node_modules/lodash/_baseInRange.js +18 -0
- package/node_modules/lodash/_baseIndexOf.js +20 -0
- package/node_modules/lodash/_baseIndexOfWith.js +23 -0
- package/node_modules/lodash/_baseIntersection.js +74 -0
- package/node_modules/lodash/_baseInverter.js +21 -0
- package/node_modules/lodash/_baseInvoke.js +24 -0
- package/node_modules/lodash/_baseIsArguments.js +18 -0
- package/node_modules/lodash/_baseIsArrayBuffer.js +17 -0
- package/node_modules/lodash/_baseIsDate.js +18 -0
- package/node_modules/lodash/_baseIsEqual.js +28 -0
- package/node_modules/lodash/_baseIsEqualDeep.js +83 -0
- package/node_modules/lodash/_baseIsMap.js +18 -0
- package/node_modules/lodash/_baseIsMatch.js +62 -0
- package/node_modules/lodash/_baseIsNaN.js +12 -0
- package/node_modules/lodash/_baseIsNative.js +47 -0
- package/node_modules/lodash/_baseIsRegExp.js +18 -0
- package/node_modules/lodash/_baseIsSet.js +18 -0
- package/node_modules/lodash/_baseIsTypedArray.js +60 -0
- package/node_modules/lodash/_baseIteratee.js +31 -0
- package/node_modules/lodash/_baseKeys.js +30 -0
- package/node_modules/lodash/_baseKeysIn.js +33 -0
- package/node_modules/lodash/_baseLodash.js +10 -0
- package/node_modules/lodash/_baseLt.js +14 -0
- package/node_modules/lodash/_baseMap.js +22 -0
- package/node_modules/lodash/_baseMatches.js +22 -0
- package/node_modules/lodash/_baseMatchesProperty.js +33 -0
- package/node_modules/lodash/_baseMean.js +20 -0
- package/node_modules/lodash/_baseMerge.js +42 -0
- package/node_modules/lodash/_baseMergeDeep.js +94 -0
- package/node_modules/lodash/_baseNth.js +20 -0
- package/node_modules/lodash/_baseOrderBy.js +49 -0
- package/node_modules/lodash/_basePick.js +19 -0
- package/node_modules/lodash/_basePickBy.js +30 -0
- package/node_modules/lodash/_baseProperty.js +14 -0
- package/node_modules/lodash/_basePropertyDeep.js +16 -0
- package/node_modules/lodash/_basePropertyOf.js +14 -0
- package/node_modules/lodash/_basePullAll.js +51 -0
- package/node_modules/lodash/_basePullAt.js +37 -0
- package/node_modules/lodash/_baseRandom.js +18 -0
- package/node_modules/lodash/_baseRange.js +28 -0
- package/node_modules/lodash/_baseReduce.js +23 -0
- package/node_modules/lodash/_baseRepeat.js +35 -0
- package/node_modules/lodash/_baseRest.js +17 -0
- package/node_modules/lodash/_baseSample.js +15 -0
- package/node_modules/lodash/_baseSampleSize.js +18 -0
- package/node_modules/lodash/_baseSet.js +51 -0
- package/node_modules/lodash/_baseSetData.js +17 -0
- package/node_modules/lodash/_baseSetToString.js +22 -0
- package/node_modules/lodash/_baseShuffle.js +15 -0
- package/node_modules/lodash/_baseSlice.js +31 -0
- package/node_modules/lodash/_baseSome.js +22 -0
- package/node_modules/lodash/_baseSortBy.js +21 -0
- package/node_modules/lodash/_baseSortedIndex.js +42 -0
- package/node_modules/lodash/_baseSortedIndexBy.js +67 -0
- package/node_modules/lodash/_baseSortedUniq.js +30 -0
- package/node_modules/lodash/_baseSum.js +24 -0
- package/node_modules/lodash/_baseTimes.js +20 -0
- package/node_modules/lodash/_baseToNumber.js +24 -0
- package/node_modules/lodash/_baseToPairs.js +18 -0
- package/node_modules/lodash/_baseToString.js +37 -0
- package/node_modules/lodash/_baseTrim.js +19 -0
- package/node_modules/lodash/_baseUnary.js +14 -0
- package/node_modules/lodash/_baseUniq.js +72 -0
- package/node_modules/lodash/_baseUnset.js +52 -0
- package/node_modules/lodash/_baseUpdate.js +18 -0
- package/node_modules/lodash/_baseValues.js +19 -0
- package/node_modules/lodash/_baseWhile.js +26 -0
- package/node_modules/lodash/_baseWrapperValue.js +25 -0
- package/node_modules/lodash/_baseXor.js +36 -0
- package/node_modules/lodash/_baseZipObject.js +23 -0
- package/node_modules/lodash/_cacheHas.js +13 -0
- package/node_modules/lodash/_castArrayLikeObject.js +14 -0
- package/node_modules/lodash/_castFunction.js +14 -0
- package/node_modules/lodash/_castPath.js +21 -0
- package/node_modules/lodash/_castRest.js +14 -0
- package/node_modules/lodash/_castSlice.js +18 -0
- package/node_modules/lodash/_charsEndIndex.js +19 -0
- package/node_modules/lodash/_charsStartIndex.js +20 -0
- package/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/node_modules/lodash/_cloneBuffer.js +35 -0
- package/node_modules/lodash/_cloneDataView.js +16 -0
- package/node_modules/lodash/_cloneRegExp.js +17 -0
- package/node_modules/lodash/_cloneSymbol.js +18 -0
- package/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/node_modules/lodash/_compareAscending.js +41 -0
- package/node_modules/lodash/_compareMultiple.js +44 -0
- package/node_modules/lodash/_composeArgs.js +39 -0
- package/node_modules/lodash/_composeArgsRight.js +41 -0
- package/node_modules/lodash/_copyArray.js +20 -0
- package/node_modules/lodash/_copyObject.js +40 -0
- package/node_modules/lodash/_copySymbols.js +16 -0
- package/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/node_modules/lodash/_coreJsData.js +6 -0
- package/node_modules/lodash/_countHolders.js +21 -0
- package/node_modules/lodash/_createAggregator.js +23 -0
- package/node_modules/lodash/_createAssigner.js +37 -0
- package/node_modules/lodash/_createBaseEach.js +32 -0
- package/node_modules/lodash/_createBaseFor.js +25 -0
- package/node_modules/lodash/_createBind.js +28 -0
- package/node_modules/lodash/_createCaseFirst.js +33 -0
- package/node_modules/lodash/_createCompounder.js +24 -0
- package/node_modules/lodash/_createCtor.js +37 -0
- package/node_modules/lodash/_createCurry.js +46 -0
- package/node_modules/lodash/_createFind.js +25 -0
- package/node_modules/lodash/_createFlow.js +78 -0
- package/node_modules/lodash/_createHybrid.js +92 -0
- package/node_modules/lodash/_createInverter.js +17 -0
- package/node_modules/lodash/_createMathOperation.js +38 -0
- package/node_modules/lodash/_createOver.js +27 -0
- package/node_modules/lodash/_createPadding.js +33 -0
- package/node_modules/lodash/_createPartial.js +43 -0
- package/node_modules/lodash/_createRange.js +30 -0
- package/node_modules/lodash/_createRecurry.js +56 -0
- package/node_modules/lodash/_createRelationalOperation.js +20 -0
- package/node_modules/lodash/_createRound.js +35 -0
- package/node_modules/lodash/_createSet.js +19 -0
- package/node_modules/lodash/_createToPairs.js +30 -0
- package/node_modules/lodash/_createWrap.js +106 -0
- package/node_modules/lodash/_customDefaultsAssignIn.js +29 -0
- package/node_modules/lodash/_customDefaultsMerge.js +28 -0
- package/node_modules/lodash/_customOmitClone.js +16 -0
- package/node_modules/lodash/_deburrLetter.js +71 -0
- package/node_modules/lodash/_defineProperty.js +11 -0
- package/node_modules/lodash/_equalArrays.js +84 -0
- package/node_modules/lodash/_equalByTag.js +112 -0
- package/node_modules/lodash/_equalObjects.js +90 -0
- package/node_modules/lodash/_escapeHtmlChar.js +21 -0
- package/node_modules/lodash/_escapeStringChar.js +22 -0
- package/node_modules/lodash/_flatRest.js +16 -0
- package/node_modules/lodash/_freeGlobal.js +4 -0
- package/node_modules/lodash/_getAllKeys.js +16 -0
- package/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/node_modules/lodash/_getData.js +15 -0
- package/node_modules/lodash/_getFuncName.js +31 -0
- package/node_modules/lodash/_getHolder.js +13 -0
- package/node_modules/lodash/_getMapData.js +18 -0
- package/node_modules/lodash/_getMatchData.js +24 -0
- package/node_modules/lodash/_getNative.js +17 -0
- package/node_modules/lodash/_getPrototype.js +6 -0
- package/node_modules/lodash/_getRawTag.js +46 -0
- package/node_modules/lodash/_getSymbols.js +30 -0
- package/node_modules/lodash/_getSymbolsIn.js +25 -0
- package/node_modules/lodash/_getTag.js +58 -0
- package/node_modules/lodash/_getValue.js +13 -0
- package/node_modules/lodash/_getView.js +33 -0
- package/node_modules/lodash/_getWrapDetails.js +17 -0
- package/node_modules/lodash/_hasPath.js +39 -0
- package/node_modules/lodash/_hasUnicode.js +26 -0
- package/node_modules/lodash/_hasUnicodeWord.js +15 -0
- package/node_modules/lodash/_hashClear.js +15 -0
- package/node_modules/lodash/_hashDelete.js +17 -0
- package/node_modules/lodash/_hashGet.js +30 -0
- package/node_modules/lodash/_hashHas.js +23 -0
- package/node_modules/lodash/_hashSet.js +23 -0
- package/node_modules/lodash/_initCloneArray.js +26 -0
- package/node_modules/lodash/_initCloneByTag.js +77 -0
- package/node_modules/lodash/_initCloneObject.js +18 -0
- package/node_modules/lodash/_insertWrapDetails.js +23 -0
- package/node_modules/lodash/_isFlattenable.js +20 -0
- package/node_modules/lodash/_isIndex.js +25 -0
- package/node_modules/lodash/_isIterateeCall.js +30 -0
- package/node_modules/lodash/_isKey.js +29 -0
- package/node_modules/lodash/_isKeyable.js +15 -0
- package/node_modules/lodash/_isLaziable.js +28 -0
- package/node_modules/lodash/_isMaskable.js +14 -0
- package/node_modules/lodash/_isMasked.js +20 -0
- package/node_modules/lodash/_isPrototype.js +18 -0
- package/node_modules/lodash/_isStrictComparable.js +15 -0
- package/node_modules/lodash/_iteratorToArray.js +18 -0
- package/node_modules/lodash/_lazyClone.js +23 -0
- package/node_modules/lodash/_lazyReverse.js +23 -0
- package/node_modules/lodash/_lazyValue.js +69 -0
- package/node_modules/lodash/_listCacheClear.js +13 -0
- package/node_modules/lodash/_listCacheDelete.js +35 -0
- package/node_modules/lodash/_listCacheGet.js +19 -0
- package/node_modules/lodash/_listCacheHas.js +16 -0
- package/node_modules/lodash/_listCacheSet.js +26 -0
- package/node_modules/lodash/_mapCacheClear.js +21 -0
- package/node_modules/lodash/_mapCacheDelete.js +18 -0
- package/node_modules/lodash/_mapCacheGet.js +16 -0
- package/node_modules/lodash/_mapCacheHas.js +16 -0
- package/node_modules/lodash/_mapCacheSet.js +22 -0
- package/node_modules/lodash/_mapToArray.js +18 -0
- package/node_modules/lodash/_matchesStrictComparable.js +20 -0
- package/node_modules/lodash/_memoizeCapped.js +26 -0
- package/node_modules/lodash/_mergeData.js +90 -0
- package/node_modules/lodash/_metaMap.js +6 -0
- package/node_modules/lodash/_nativeCreate.js +6 -0
- package/node_modules/lodash/_nativeKeys.js +6 -0
- package/node_modules/lodash/_nativeKeysIn.js +20 -0
- package/node_modules/lodash/_nodeUtil.js +30 -0
- package/node_modules/lodash/_objectToString.js +22 -0
- package/node_modules/lodash/_overArg.js +15 -0
- package/node_modules/lodash/_overRest.js +36 -0
- package/node_modules/lodash/_parent.js +16 -0
- package/node_modules/lodash/_reEscape.js +4 -0
- package/node_modules/lodash/_reEvaluate.js +4 -0
- package/node_modules/lodash/_reInterpolate.js +4 -0
- package/node_modules/lodash/_realNames.js +4 -0
- package/node_modules/lodash/_reorder.js +29 -0
- package/node_modules/lodash/_replaceHolders.js +29 -0
- package/node_modules/lodash/_root.js +9 -0
- package/node_modules/lodash/_safeGet.js +21 -0
- package/node_modules/lodash/_setCacheAdd.js +19 -0
- package/node_modules/lodash/_setCacheHas.js +14 -0
- package/node_modules/lodash/_setData.js +20 -0
- package/node_modules/lodash/_setToArray.js +18 -0
- package/node_modules/lodash/_setToPairs.js +18 -0
- package/node_modules/lodash/_setToString.js +14 -0
- package/node_modules/lodash/_setWrapToString.js +21 -0
- package/node_modules/lodash/_shortOut.js +37 -0
- package/node_modules/lodash/_shuffleSelf.js +28 -0
- package/node_modules/lodash/_stackClear.js +15 -0
- package/node_modules/lodash/_stackDelete.js +18 -0
- package/node_modules/lodash/_stackGet.js +14 -0
- package/node_modules/lodash/_stackHas.js +14 -0
- package/node_modules/lodash/_stackSet.js +34 -0
- package/node_modules/lodash/_strictIndexOf.js +23 -0
- package/node_modules/lodash/_strictLastIndexOf.js +21 -0
- package/node_modules/lodash/_stringSize.js +18 -0
- package/node_modules/lodash/_stringToArray.js +18 -0
- package/node_modules/lodash/_stringToPath.js +27 -0
- package/node_modules/lodash/_toKey.js +21 -0
- package/node_modules/lodash/_toSource.js +26 -0
- package/node_modules/lodash/_trimmedEndIndex.js +19 -0
- package/node_modules/lodash/_unescapeHtmlChar.js +21 -0
- package/node_modules/lodash/_unicodeSize.js +44 -0
- package/node_modules/lodash/_unicodeToArray.js +40 -0
- package/node_modules/lodash/_unicodeWords.js +69 -0
- package/node_modules/lodash/_updateWrapDetails.js +46 -0
- package/node_modules/lodash/_wrapperClone.js +23 -0
- package/node_modules/lodash/add.js +22 -0
- package/node_modules/lodash/after.js +42 -0
- package/node_modules/lodash/array.js +67 -0
- package/node_modules/lodash/ary.js +29 -0
- package/node_modules/lodash/assign.js +58 -0
- package/node_modules/lodash/assignIn.js +40 -0
- package/node_modules/lodash/assignInWith.js +38 -0
- package/node_modules/lodash/assignWith.js +37 -0
- package/node_modules/lodash/at.js +23 -0
- package/node_modules/lodash/attempt.js +35 -0
- package/node_modules/lodash/before.js +40 -0
- package/node_modules/lodash/bind.js +57 -0
- package/node_modules/lodash/bindAll.js +41 -0
- package/node_modules/lodash/bindKey.js +68 -0
- package/node_modules/lodash/camelCase.js +29 -0
- package/node_modules/lodash/capitalize.js +23 -0
- package/node_modules/lodash/castArray.js +44 -0
- package/node_modules/lodash/ceil.js +26 -0
- package/node_modules/lodash/chain.js +38 -0
- package/node_modules/lodash/chunk.js +50 -0
- package/node_modules/lodash/clamp.js +39 -0
- package/node_modules/lodash/clone.js +36 -0
- package/node_modules/lodash/cloneDeep.js +29 -0
- package/node_modules/lodash/cloneDeepWith.js +40 -0
- package/node_modules/lodash/cloneWith.js +42 -0
- package/node_modules/lodash/collection.js +30 -0
- package/node_modules/lodash/commit.js +33 -0
- package/node_modules/lodash/compact.js +31 -0
- package/node_modules/lodash/concat.js +43 -0
- package/node_modules/lodash/cond.js +60 -0
- package/node_modules/lodash/conforms.js +35 -0
- package/node_modules/lodash/conformsTo.js +32 -0
- package/node_modules/lodash/constant.js +26 -0
- package/node_modules/lodash/core.js +3877 -0
- package/node_modules/lodash/core.min.js +30 -0
- package/node_modules/lodash/countBy.js +40 -0
- package/node_modules/lodash/create.js +43 -0
- package/node_modules/lodash/curry.js +57 -0
- package/node_modules/lodash/curryRight.js +54 -0
- package/node_modules/lodash/date.js +3 -0
- package/node_modules/lodash/debounce.js +191 -0
- package/node_modules/lodash/deburr.js +45 -0
- package/node_modules/lodash/defaultTo.js +25 -0
- package/node_modules/lodash/defaults.js +64 -0
- package/node_modules/lodash/defaultsDeep.js +30 -0
- package/node_modules/lodash/defer.js +26 -0
- package/node_modules/lodash/delay.js +28 -0
- package/node_modules/lodash/difference.js +33 -0
- package/node_modules/lodash/differenceBy.js +44 -0
- package/node_modules/lodash/differenceWith.js +40 -0
- package/node_modules/lodash/divide.js +22 -0
- package/node_modules/lodash/drop.js +38 -0
- package/node_modules/lodash/dropRight.js +39 -0
- package/node_modules/lodash/dropRightWhile.js +45 -0
- package/node_modules/lodash/dropWhile.js +45 -0
- package/node_modules/lodash/each.js +1 -0
- package/node_modules/lodash/eachRight.js +1 -0
- package/node_modules/lodash/endsWith.js +43 -0
- package/node_modules/lodash/entries.js +1 -0
- package/node_modules/lodash/entriesIn.js +1 -0
- package/node_modules/lodash/eq.js +37 -0
- package/node_modules/lodash/escape.js +43 -0
- package/node_modules/lodash/escapeRegExp.js +32 -0
- package/node_modules/lodash/every.js +56 -0
- package/node_modules/lodash/extend.js +1 -0
- package/node_modules/lodash/extendWith.js +1 -0
- package/node_modules/lodash/fill.js +45 -0
- package/node_modules/lodash/filter.js +52 -0
- package/node_modules/lodash/find.js +42 -0
- package/node_modules/lodash/findIndex.js +55 -0
- package/node_modules/lodash/findKey.js +44 -0
- package/node_modules/lodash/findLast.js +25 -0
- package/node_modules/lodash/findLastIndex.js +59 -0
- package/node_modules/lodash/findLastKey.js +44 -0
- package/node_modules/lodash/first.js +1 -0
- package/node_modules/lodash/flatMap.js +29 -0
- package/node_modules/lodash/flatMapDeep.js +31 -0
- package/node_modules/lodash/flatMapDepth.js +31 -0
- package/node_modules/lodash/flatten.js +22 -0
- package/node_modules/lodash/flattenDeep.js +25 -0
- package/node_modules/lodash/flattenDepth.js +33 -0
- package/node_modules/lodash/flip.js +28 -0
- package/node_modules/lodash/floor.js +26 -0
- package/node_modules/lodash/flow.js +27 -0
- package/node_modules/lodash/flowRight.js +26 -0
- package/node_modules/lodash/forEach.js +41 -0
- package/node_modules/lodash/forEachRight.js +31 -0
- package/node_modules/lodash/forIn.js +39 -0
- package/node_modules/lodash/forInRight.js +37 -0
- package/node_modules/lodash/forOwn.js +36 -0
- package/node_modules/lodash/forOwnRight.js +34 -0
- package/node_modules/lodash/fp/F.js +1 -0
- package/node_modules/lodash/fp/T.js +1 -0
- package/node_modules/lodash/fp/__.js +1 -0
- package/node_modules/lodash/fp/_baseConvert.js +569 -0
- package/node_modules/lodash/fp/_convertBrowser.js +18 -0
- package/node_modules/lodash/fp/_falseOptions.js +7 -0
- package/node_modules/lodash/fp/_mapping.js +358 -0
- package/node_modules/lodash/fp/_util.js +16 -0
- package/node_modules/lodash/fp/add.js +5 -0
- package/node_modules/lodash/fp/after.js +5 -0
- package/node_modules/lodash/fp/all.js +1 -0
- package/node_modules/lodash/fp/allPass.js +1 -0
- package/node_modules/lodash/fp/always.js +1 -0
- package/node_modules/lodash/fp/any.js +1 -0
- package/node_modules/lodash/fp/anyPass.js +1 -0
- package/node_modules/lodash/fp/apply.js +1 -0
- package/node_modules/lodash/fp/array.js +2 -0
- package/node_modules/lodash/fp/ary.js +5 -0
- package/node_modules/lodash/fp/assign.js +5 -0
- package/node_modules/lodash/fp/assignAll.js +5 -0
- package/node_modules/lodash/fp/assignAllWith.js +5 -0
- package/node_modules/lodash/fp/assignIn.js +5 -0
- package/node_modules/lodash/fp/assignInAll.js +5 -0
- package/node_modules/lodash/fp/assignInAllWith.js +5 -0
- package/node_modules/lodash/fp/assignInWith.js +5 -0
- package/node_modules/lodash/fp/assignWith.js +5 -0
- package/node_modules/lodash/fp/assoc.js +1 -0
- package/node_modules/lodash/fp/assocPath.js +1 -0
- package/node_modules/lodash/fp/at.js +5 -0
- package/node_modules/lodash/fp/attempt.js +5 -0
- package/node_modules/lodash/fp/before.js +5 -0
- package/node_modules/lodash/fp/bind.js +5 -0
- package/node_modules/lodash/fp/bindAll.js +5 -0
- package/node_modules/lodash/fp/bindKey.js +5 -0
- package/node_modules/lodash/fp/camelCase.js +5 -0
- package/node_modules/lodash/fp/capitalize.js +5 -0
- package/node_modules/lodash/fp/castArray.js +5 -0
- package/node_modules/lodash/fp/ceil.js +5 -0
- package/node_modules/lodash/fp/chain.js +5 -0
- package/node_modules/lodash/fp/chunk.js +5 -0
- package/node_modules/lodash/fp/clamp.js +5 -0
- package/node_modules/lodash/fp/clone.js +5 -0
- package/node_modules/lodash/fp/cloneDeep.js +5 -0
- package/node_modules/lodash/fp/cloneDeepWith.js +5 -0
- package/node_modules/lodash/fp/cloneWith.js +5 -0
- package/node_modules/lodash/fp/collection.js +2 -0
- package/node_modules/lodash/fp/commit.js +5 -0
- package/node_modules/lodash/fp/compact.js +5 -0
- package/node_modules/lodash/fp/complement.js +1 -0
- package/node_modules/lodash/fp/compose.js +1 -0
- package/node_modules/lodash/fp/concat.js +5 -0
- package/node_modules/lodash/fp/cond.js +5 -0
- package/node_modules/lodash/fp/conforms.js +1 -0
- package/node_modules/lodash/fp/conformsTo.js +5 -0
- package/node_modules/lodash/fp/constant.js +5 -0
- package/node_modules/lodash/fp/contains.js +1 -0
- package/node_modules/lodash/fp/convert.js +18 -0
- package/node_modules/lodash/fp/countBy.js +5 -0
- package/node_modules/lodash/fp/create.js +5 -0
- package/node_modules/lodash/fp/curry.js +5 -0
- package/node_modules/lodash/fp/curryN.js +5 -0
- package/node_modules/lodash/fp/curryRight.js +5 -0
- package/node_modules/lodash/fp/curryRightN.js +5 -0
- package/node_modules/lodash/fp/date.js +2 -0
- package/node_modules/lodash/fp/debounce.js +5 -0
- package/node_modules/lodash/fp/deburr.js +5 -0
- package/node_modules/lodash/fp/defaultTo.js +5 -0
- package/node_modules/lodash/fp/defaults.js +5 -0
- package/node_modules/lodash/fp/defaultsAll.js +5 -0
- package/node_modules/lodash/fp/defaultsDeep.js +5 -0
- package/node_modules/lodash/fp/defaultsDeepAll.js +5 -0
- package/node_modules/lodash/fp/defer.js +5 -0
- package/node_modules/lodash/fp/delay.js +5 -0
- package/node_modules/lodash/fp/difference.js +5 -0
- package/node_modules/lodash/fp/differenceBy.js +5 -0
- package/node_modules/lodash/fp/differenceWith.js +5 -0
- package/node_modules/lodash/fp/dissoc.js +1 -0
- package/node_modules/lodash/fp/dissocPath.js +1 -0
- package/node_modules/lodash/fp/divide.js +5 -0
- package/node_modules/lodash/fp/drop.js +5 -0
- package/node_modules/lodash/fp/dropLast.js +1 -0
- package/node_modules/lodash/fp/dropLastWhile.js +1 -0
- package/node_modules/lodash/fp/dropRight.js +5 -0
- package/node_modules/lodash/fp/dropRightWhile.js +5 -0
- package/node_modules/lodash/fp/dropWhile.js +5 -0
- package/node_modules/lodash/fp/each.js +1 -0
- package/node_modules/lodash/fp/eachRight.js +1 -0
- package/node_modules/lodash/fp/endsWith.js +5 -0
- package/node_modules/lodash/fp/entries.js +1 -0
- package/node_modules/lodash/fp/entriesIn.js +1 -0
- package/node_modules/lodash/fp/eq.js +5 -0
- package/node_modules/lodash/fp/equals.js +1 -0
- package/node_modules/lodash/fp/escape.js +5 -0
- package/node_modules/lodash/fp/escapeRegExp.js +5 -0
- package/node_modules/lodash/fp/every.js +5 -0
- package/node_modules/lodash/fp/extend.js +1 -0
- package/node_modules/lodash/fp/extendAll.js +1 -0
- package/node_modules/lodash/fp/extendAllWith.js +1 -0
- package/node_modules/lodash/fp/extendWith.js +1 -0
- package/node_modules/lodash/fp/fill.js +5 -0
- package/node_modules/lodash/fp/filter.js +5 -0
- package/node_modules/lodash/fp/find.js +5 -0
- package/node_modules/lodash/fp/findFrom.js +5 -0
- package/node_modules/lodash/fp/findIndex.js +5 -0
- package/node_modules/lodash/fp/findIndexFrom.js +5 -0
- package/node_modules/lodash/fp/findKey.js +5 -0
- package/node_modules/lodash/fp/findLast.js +5 -0
- package/node_modules/lodash/fp/findLastFrom.js +5 -0
- package/node_modules/lodash/fp/findLastIndex.js +5 -0
- package/node_modules/lodash/fp/findLastIndexFrom.js +5 -0
- package/node_modules/lodash/fp/findLastKey.js +5 -0
- package/node_modules/lodash/fp/first.js +1 -0
- package/node_modules/lodash/fp/flatMap.js +5 -0
- package/node_modules/lodash/fp/flatMapDeep.js +5 -0
- package/node_modules/lodash/fp/flatMapDepth.js +5 -0
- package/node_modules/lodash/fp/flatten.js +5 -0
- package/node_modules/lodash/fp/flattenDeep.js +5 -0
- package/node_modules/lodash/fp/flattenDepth.js +5 -0
- package/node_modules/lodash/fp/flip.js +5 -0
- package/node_modules/lodash/fp/floor.js +5 -0
- package/node_modules/lodash/fp/flow.js +5 -0
- package/node_modules/lodash/fp/flowRight.js +5 -0
- package/node_modules/lodash/fp/forEach.js +5 -0
- package/node_modules/lodash/fp/forEachRight.js +5 -0
- package/node_modules/lodash/fp/forIn.js +5 -0
- package/node_modules/lodash/fp/forInRight.js +5 -0
- package/node_modules/lodash/fp/forOwn.js +5 -0
- package/node_modules/lodash/fp/forOwnRight.js +5 -0
- package/node_modules/lodash/fp/fromPairs.js +5 -0
- package/node_modules/lodash/fp/function.js +2 -0
- package/node_modules/lodash/fp/functions.js +5 -0
- package/node_modules/lodash/fp/functionsIn.js +5 -0
- package/node_modules/lodash/fp/get.js +5 -0
- package/node_modules/lodash/fp/getOr.js +5 -0
- package/node_modules/lodash/fp/groupBy.js +5 -0
- package/node_modules/lodash/fp/gt.js +5 -0
- package/node_modules/lodash/fp/gte.js +5 -0
- package/node_modules/lodash/fp/has.js +5 -0
- package/node_modules/lodash/fp/hasIn.js +5 -0
- package/node_modules/lodash/fp/head.js +5 -0
- package/node_modules/lodash/fp/identical.js +1 -0
- package/node_modules/lodash/fp/identity.js +5 -0
- package/node_modules/lodash/fp/inRange.js +5 -0
- package/node_modules/lodash/fp/includes.js +5 -0
- package/node_modules/lodash/fp/includesFrom.js +5 -0
- package/node_modules/lodash/fp/indexBy.js +1 -0
- package/node_modules/lodash/fp/indexOf.js +5 -0
- package/node_modules/lodash/fp/indexOfFrom.js +5 -0
- package/node_modules/lodash/fp/init.js +1 -0
- package/node_modules/lodash/fp/initial.js +5 -0
- package/node_modules/lodash/fp/intersection.js +5 -0
- package/node_modules/lodash/fp/intersectionBy.js +5 -0
- package/node_modules/lodash/fp/intersectionWith.js +5 -0
- package/node_modules/lodash/fp/invert.js +5 -0
- package/node_modules/lodash/fp/invertBy.js +5 -0
- package/node_modules/lodash/fp/invertObj.js +1 -0
- package/node_modules/lodash/fp/invoke.js +5 -0
- package/node_modules/lodash/fp/invokeArgs.js +5 -0
- package/node_modules/lodash/fp/invokeArgsMap.js +5 -0
- package/node_modules/lodash/fp/invokeMap.js +5 -0
- package/node_modules/lodash/fp/isArguments.js +5 -0
- package/node_modules/lodash/fp/isArray.js +5 -0
- package/node_modules/lodash/fp/isArrayBuffer.js +5 -0
- package/node_modules/lodash/fp/isArrayLike.js +5 -0
- package/node_modules/lodash/fp/isArrayLikeObject.js +5 -0
- package/node_modules/lodash/fp/isBoolean.js +5 -0
- package/node_modules/lodash/fp/isBuffer.js +5 -0
- package/node_modules/lodash/fp/isDate.js +5 -0
- package/node_modules/lodash/fp/isElement.js +5 -0
- package/node_modules/lodash/fp/isEmpty.js +5 -0
- package/node_modules/lodash/fp/isEqual.js +5 -0
- package/node_modules/lodash/fp/isEqualWith.js +5 -0
- package/node_modules/lodash/fp/isError.js +5 -0
- package/node_modules/lodash/fp/isFinite.js +5 -0
- package/node_modules/lodash/fp/isFunction.js +5 -0
- package/node_modules/lodash/fp/isInteger.js +5 -0
- package/node_modules/lodash/fp/isLength.js +5 -0
- package/node_modules/lodash/fp/isMap.js +5 -0
- package/node_modules/lodash/fp/isMatch.js +5 -0
- package/node_modules/lodash/fp/isMatchWith.js +5 -0
- package/node_modules/lodash/fp/isNaN.js +5 -0
- package/node_modules/lodash/fp/isNative.js +5 -0
- package/node_modules/lodash/fp/isNil.js +5 -0
- package/node_modules/lodash/fp/isNull.js +5 -0
- package/node_modules/lodash/fp/isNumber.js +5 -0
- package/node_modules/lodash/fp/isObject.js +5 -0
- package/node_modules/lodash/fp/isObjectLike.js +5 -0
- package/node_modules/lodash/fp/isPlainObject.js +5 -0
- package/node_modules/lodash/fp/isRegExp.js +5 -0
- package/node_modules/lodash/fp/isSafeInteger.js +5 -0
- package/node_modules/lodash/fp/isSet.js +5 -0
- package/node_modules/lodash/fp/isString.js +5 -0
- package/node_modules/lodash/fp/isSymbol.js +5 -0
- package/node_modules/lodash/fp/isTypedArray.js +5 -0
- package/node_modules/lodash/fp/isUndefined.js +5 -0
- package/node_modules/lodash/fp/isWeakMap.js +5 -0
- package/node_modules/lodash/fp/isWeakSet.js +5 -0
- package/node_modules/lodash/fp/iteratee.js +5 -0
- package/node_modules/lodash/fp/join.js +5 -0
- package/node_modules/lodash/fp/juxt.js +1 -0
- package/node_modules/lodash/fp/kebabCase.js +5 -0
- package/node_modules/lodash/fp/keyBy.js +5 -0
- package/node_modules/lodash/fp/keys.js +5 -0
- package/node_modules/lodash/fp/keysIn.js +5 -0
- package/node_modules/lodash/fp/lang.js +2 -0
- package/node_modules/lodash/fp/last.js +5 -0
- package/node_modules/lodash/fp/lastIndexOf.js +5 -0
- package/node_modules/lodash/fp/lastIndexOfFrom.js +5 -0
- package/node_modules/lodash/fp/lowerCase.js +5 -0
- package/node_modules/lodash/fp/lowerFirst.js +5 -0
- package/node_modules/lodash/fp/lt.js +5 -0
- package/node_modules/lodash/fp/lte.js +5 -0
- package/node_modules/lodash/fp/map.js +5 -0
- package/node_modules/lodash/fp/mapKeys.js +5 -0
- package/node_modules/lodash/fp/mapValues.js +5 -0
- package/node_modules/lodash/fp/matches.js +1 -0
- package/node_modules/lodash/fp/matchesProperty.js +5 -0
- package/node_modules/lodash/fp/math.js +2 -0
- package/node_modules/lodash/fp/max.js +5 -0
- package/node_modules/lodash/fp/maxBy.js +5 -0
- package/node_modules/lodash/fp/mean.js +5 -0
- package/node_modules/lodash/fp/meanBy.js +5 -0
- package/node_modules/lodash/fp/memoize.js +5 -0
- package/node_modules/lodash/fp/merge.js +5 -0
- package/node_modules/lodash/fp/mergeAll.js +5 -0
- package/node_modules/lodash/fp/mergeAllWith.js +5 -0
- package/node_modules/lodash/fp/mergeWith.js +5 -0
- package/node_modules/lodash/fp/method.js +5 -0
- package/node_modules/lodash/fp/methodOf.js +5 -0
- package/node_modules/lodash/fp/min.js +5 -0
- package/node_modules/lodash/fp/minBy.js +5 -0
- package/node_modules/lodash/fp/mixin.js +5 -0
- package/node_modules/lodash/fp/multiply.js +5 -0
- package/node_modules/lodash/fp/nAry.js +1 -0
- package/node_modules/lodash/fp/negate.js +5 -0
- package/node_modules/lodash/fp/next.js +5 -0
- package/node_modules/lodash/fp/noop.js +5 -0
- package/node_modules/lodash/fp/now.js +5 -0
- package/node_modules/lodash/fp/nth.js +5 -0
- package/node_modules/lodash/fp/nthArg.js +5 -0
- package/node_modules/lodash/fp/number.js +2 -0
- package/node_modules/lodash/fp/object.js +2 -0
- package/node_modules/lodash/fp/omit.js +5 -0
- package/node_modules/lodash/fp/omitAll.js +1 -0
- package/node_modules/lodash/fp/omitBy.js +5 -0
- package/node_modules/lodash/fp/once.js +5 -0
- package/node_modules/lodash/fp/orderBy.js +5 -0
- package/node_modules/lodash/fp/over.js +5 -0
- package/node_modules/lodash/fp/overArgs.js +5 -0
- package/node_modules/lodash/fp/overEvery.js +5 -0
- package/node_modules/lodash/fp/overSome.js +5 -0
- package/node_modules/lodash/fp/pad.js +5 -0
- package/node_modules/lodash/fp/padChars.js +5 -0
- package/node_modules/lodash/fp/padCharsEnd.js +5 -0
- package/node_modules/lodash/fp/padCharsStart.js +5 -0
- package/node_modules/lodash/fp/padEnd.js +5 -0
- package/node_modules/lodash/fp/padStart.js +5 -0
- package/node_modules/lodash/fp/parseInt.js +5 -0
- package/node_modules/lodash/fp/partial.js +5 -0
- package/node_modules/lodash/fp/partialRight.js +5 -0
- package/node_modules/lodash/fp/partition.js +5 -0
- package/node_modules/lodash/fp/path.js +1 -0
- package/node_modules/lodash/fp/pathEq.js +1 -0
- package/node_modules/lodash/fp/pathOr.js +1 -0
- package/node_modules/lodash/fp/paths.js +1 -0
- package/node_modules/lodash/fp/pick.js +5 -0
- package/node_modules/lodash/fp/pickAll.js +1 -0
- package/node_modules/lodash/fp/pickBy.js +5 -0
- package/node_modules/lodash/fp/pipe.js +1 -0
- package/node_modules/lodash/fp/placeholder.js +6 -0
- package/node_modules/lodash/fp/plant.js +5 -0
- package/node_modules/lodash/fp/pluck.js +1 -0
- package/node_modules/lodash/fp/prop.js +1 -0
- package/node_modules/lodash/fp/propEq.js +1 -0
- package/node_modules/lodash/fp/propOr.js +1 -0
- package/node_modules/lodash/fp/property.js +1 -0
- package/node_modules/lodash/fp/propertyOf.js +5 -0
- package/node_modules/lodash/fp/props.js +1 -0
- package/node_modules/lodash/fp/pull.js +5 -0
- package/node_modules/lodash/fp/pullAll.js +5 -0
- package/node_modules/lodash/fp/pullAllBy.js +5 -0
- package/node_modules/lodash/fp/pullAllWith.js +5 -0
- package/node_modules/lodash/fp/pullAt.js +5 -0
- package/node_modules/lodash/fp/random.js +5 -0
- package/node_modules/lodash/fp/range.js +5 -0
- package/node_modules/lodash/fp/rangeRight.js +5 -0
- package/node_modules/lodash/fp/rangeStep.js +5 -0
- package/node_modules/lodash/fp/rangeStepRight.js +5 -0
- package/node_modules/lodash/fp/rearg.js +5 -0
- package/node_modules/lodash/fp/reduce.js +5 -0
- package/node_modules/lodash/fp/reduceRight.js +5 -0
- package/node_modules/lodash/fp/reject.js +5 -0
- package/node_modules/lodash/fp/remove.js +5 -0
- package/node_modules/lodash/fp/repeat.js +5 -0
- package/node_modules/lodash/fp/replace.js +5 -0
- package/node_modules/lodash/fp/rest.js +5 -0
- package/node_modules/lodash/fp/restFrom.js +5 -0
- package/node_modules/lodash/fp/result.js +5 -0
- package/node_modules/lodash/fp/reverse.js +5 -0
- package/node_modules/lodash/fp/round.js +5 -0
- package/node_modules/lodash/fp/sample.js +5 -0
- package/node_modules/lodash/fp/sampleSize.js +5 -0
- package/node_modules/lodash/fp/seq.js +2 -0
- package/node_modules/lodash/fp/set.js +5 -0
- package/node_modules/lodash/fp/setWith.js +5 -0
- package/node_modules/lodash/fp/shuffle.js +5 -0
- package/node_modules/lodash/fp/size.js +5 -0
- package/node_modules/lodash/fp/slice.js +5 -0
- package/node_modules/lodash/fp/snakeCase.js +5 -0
- package/node_modules/lodash/fp/some.js +5 -0
- package/node_modules/lodash/fp/sortBy.js +5 -0
- package/node_modules/lodash/fp/sortedIndex.js +5 -0
- package/node_modules/lodash/fp/sortedIndexBy.js +5 -0
- package/node_modules/lodash/fp/sortedIndexOf.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndex.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndexBy.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndexOf.js +5 -0
- package/node_modules/lodash/fp/sortedUniq.js +5 -0
- package/node_modules/lodash/fp/sortedUniqBy.js +5 -0
- package/node_modules/lodash/fp/split.js +5 -0
- package/node_modules/lodash/fp/spread.js +5 -0
- package/node_modules/lodash/fp/spreadFrom.js +5 -0
- package/node_modules/lodash/fp/startCase.js +5 -0
- package/node_modules/lodash/fp/startsWith.js +5 -0
- package/node_modules/lodash/fp/string.js +2 -0
- package/node_modules/lodash/fp/stubArray.js +5 -0
- package/node_modules/lodash/fp/stubFalse.js +5 -0
- package/node_modules/lodash/fp/stubObject.js +5 -0
- package/node_modules/lodash/fp/stubString.js +5 -0
- package/node_modules/lodash/fp/stubTrue.js +5 -0
- package/node_modules/lodash/fp/subtract.js +5 -0
- package/node_modules/lodash/fp/sum.js +5 -0
- package/node_modules/lodash/fp/sumBy.js +5 -0
- package/node_modules/lodash/fp/symmetricDifference.js +1 -0
- package/node_modules/lodash/fp/symmetricDifferenceBy.js +1 -0
- package/node_modules/lodash/fp/symmetricDifferenceWith.js +1 -0
- package/node_modules/lodash/fp/tail.js +5 -0
- package/node_modules/lodash/fp/take.js +5 -0
- package/node_modules/lodash/fp/takeLast.js +1 -0
- package/node_modules/lodash/fp/takeLastWhile.js +1 -0
- package/node_modules/lodash/fp/takeRight.js +5 -0
- package/node_modules/lodash/fp/takeRightWhile.js +5 -0
- package/node_modules/lodash/fp/takeWhile.js +5 -0
- package/node_modules/lodash/fp/tap.js +5 -0
- package/node_modules/lodash/fp/template.js +5 -0
- package/node_modules/lodash/fp/templateSettings.js +5 -0
- package/node_modules/lodash/fp/throttle.js +5 -0
- package/node_modules/lodash/fp/thru.js +5 -0
- package/node_modules/lodash/fp/times.js +5 -0
- package/node_modules/lodash/fp/toArray.js +5 -0
- package/node_modules/lodash/fp/toFinite.js +5 -0
- package/node_modules/lodash/fp/toInteger.js +5 -0
- package/node_modules/lodash/fp/toIterator.js +5 -0
- package/node_modules/lodash/fp/toJSON.js +5 -0
- package/node_modules/lodash/fp/toLength.js +5 -0
- package/node_modules/lodash/fp/toLower.js +5 -0
- package/node_modules/lodash/fp/toNumber.js +5 -0
- package/node_modules/lodash/fp/toPairs.js +5 -0
- package/node_modules/lodash/fp/toPairsIn.js +5 -0
- package/node_modules/lodash/fp/toPath.js +5 -0
- package/node_modules/lodash/fp/toPlainObject.js +5 -0
- package/node_modules/lodash/fp/toSafeInteger.js +5 -0
- package/node_modules/lodash/fp/toString.js +5 -0
- package/node_modules/lodash/fp/toUpper.js +5 -0
- package/node_modules/lodash/fp/transform.js +5 -0
- package/node_modules/lodash/fp/trim.js +5 -0
- package/node_modules/lodash/fp/trimChars.js +5 -0
- package/node_modules/lodash/fp/trimCharsEnd.js +5 -0
- package/node_modules/lodash/fp/trimCharsStart.js +5 -0
- package/node_modules/lodash/fp/trimEnd.js +5 -0
- package/node_modules/lodash/fp/trimStart.js +5 -0
- package/node_modules/lodash/fp/truncate.js +5 -0
- package/node_modules/lodash/fp/unapply.js +1 -0
- package/node_modules/lodash/fp/unary.js +5 -0
- package/node_modules/lodash/fp/unescape.js +5 -0
- package/node_modules/lodash/fp/union.js +5 -0
- package/node_modules/lodash/fp/unionBy.js +5 -0
- package/node_modules/lodash/fp/unionWith.js +5 -0
- package/node_modules/lodash/fp/uniq.js +5 -0
- package/node_modules/lodash/fp/uniqBy.js +5 -0
- package/node_modules/lodash/fp/uniqWith.js +5 -0
- package/node_modules/lodash/fp/uniqueId.js +5 -0
- package/node_modules/lodash/fp/unnest.js +1 -0
- package/node_modules/lodash/fp/unset.js +5 -0
- package/node_modules/lodash/fp/unzip.js +5 -0
- package/node_modules/lodash/fp/unzipWith.js +5 -0
- package/node_modules/lodash/fp/update.js +5 -0
- package/node_modules/lodash/fp/updateWith.js +5 -0
- package/node_modules/lodash/fp/upperCase.js +5 -0
- package/node_modules/lodash/fp/upperFirst.js +5 -0
- package/node_modules/lodash/fp/useWith.js +1 -0
- package/node_modules/lodash/fp/util.js +2 -0
- package/node_modules/lodash/fp/value.js +5 -0
- package/node_modules/lodash/fp/valueOf.js +5 -0
- package/node_modules/lodash/fp/values.js +5 -0
- package/node_modules/lodash/fp/valuesIn.js +5 -0
- package/node_modules/lodash/fp/where.js +1 -0
- package/node_modules/lodash/fp/whereEq.js +1 -0
- package/node_modules/lodash/fp/without.js +5 -0
- package/node_modules/lodash/fp/words.js +5 -0
- package/node_modules/lodash/fp/wrap.js +5 -0
- package/node_modules/lodash/fp/wrapperAt.js +5 -0
- package/node_modules/lodash/fp/wrapperChain.js +5 -0
- package/node_modules/lodash/fp/wrapperLodash.js +5 -0
- package/node_modules/lodash/fp/wrapperReverse.js +5 -0
- package/node_modules/lodash/fp/wrapperValue.js +5 -0
- package/node_modules/lodash/fp/xor.js +5 -0
- package/node_modules/lodash/fp/xorBy.js +5 -0
- package/node_modules/lodash/fp/xorWith.js +5 -0
- package/node_modules/lodash/fp/zip.js +5 -0
- package/node_modules/lodash/fp/zipAll.js +5 -0
- package/node_modules/lodash/fp/zipObj.js +1 -0
- package/node_modules/lodash/fp/zipObject.js +5 -0
- package/node_modules/lodash/fp/zipObjectDeep.js +5 -0
- package/node_modules/lodash/fp/zipWith.js +5 -0
- package/node_modules/lodash/fp.js +2 -0
- package/node_modules/lodash/fromPairs.js +30 -0
- package/node_modules/lodash/function.js +25 -0
- package/node_modules/lodash/functions.js +31 -0
- package/node_modules/lodash/functionsIn.js +31 -0
- package/node_modules/lodash/get.js +33 -0
- package/node_modules/lodash/groupBy.js +41 -0
- package/node_modules/lodash/gt.js +29 -0
- package/node_modules/lodash/gte.js +30 -0
- package/node_modules/lodash/has.js +35 -0
- package/node_modules/lodash/hasIn.js +34 -0
- package/node_modules/lodash/head.js +23 -0
- package/node_modules/lodash/identity.js +21 -0
- package/node_modules/lodash/inRange.js +55 -0
- package/node_modules/lodash/includes.js +53 -0
- package/node_modules/lodash/index.js +1 -0
- package/node_modules/lodash/indexOf.js +42 -0
- package/node_modules/lodash/initial.js +22 -0
- package/node_modules/lodash/intersection.js +30 -0
- package/node_modules/lodash/intersectionBy.js +45 -0
- package/node_modules/lodash/intersectionWith.js +41 -0
- package/node_modules/lodash/invert.js +42 -0
- package/node_modules/lodash/invertBy.js +56 -0
- package/node_modules/lodash/invoke.js +24 -0
- package/node_modules/lodash/invokeMap.js +41 -0
- package/node_modules/lodash/isArguments.js +36 -0
- package/node_modules/lodash/isArray.js +26 -0
- package/node_modules/lodash/isArrayBuffer.js +27 -0
- package/node_modules/lodash/isArrayLike.js +33 -0
- package/node_modules/lodash/isArrayLikeObject.js +33 -0
- package/node_modules/lodash/isBoolean.js +29 -0
- package/node_modules/lodash/isBuffer.js +38 -0
- package/node_modules/lodash/isDate.js +27 -0
- package/node_modules/lodash/isElement.js +25 -0
- package/node_modules/lodash/isEmpty.js +77 -0
- package/node_modules/lodash/isEqual.js +35 -0
- package/node_modules/lodash/isEqualWith.js +41 -0
- package/node_modules/lodash/isError.js +36 -0
- package/node_modules/lodash/isFinite.js +36 -0
- package/node_modules/lodash/isFunction.js +37 -0
- package/node_modules/lodash/isInteger.js +33 -0
- package/node_modules/lodash/isLength.js +35 -0
- package/node_modules/lodash/isMap.js +27 -0
- package/node_modules/lodash/isMatch.js +36 -0
- package/node_modules/lodash/isMatchWith.js +41 -0
- package/node_modules/lodash/isNaN.js +38 -0
- package/node_modules/lodash/isNative.js +40 -0
- package/node_modules/lodash/isNil.js +25 -0
- package/node_modules/lodash/isNull.js +22 -0
- package/node_modules/lodash/isNumber.js +38 -0
- package/node_modules/lodash/isObject.js +31 -0
- package/node_modules/lodash/isObjectLike.js +29 -0
- package/node_modules/lodash/isPlainObject.js +62 -0
- package/node_modules/lodash/isRegExp.js +27 -0
- package/node_modules/lodash/isSafeInteger.js +37 -0
- package/node_modules/lodash/isSet.js +27 -0
- package/node_modules/lodash/isString.js +30 -0
- package/node_modules/lodash/isSymbol.js +29 -0
- package/node_modules/lodash/isTypedArray.js +27 -0
- package/node_modules/lodash/isUndefined.js +22 -0
- package/node_modules/lodash/isWeakMap.js +28 -0
- package/node_modules/lodash/isWeakSet.js +28 -0
- package/node_modules/lodash/iteratee.js +53 -0
- package/node_modules/lodash/join.js +26 -0
- package/node_modules/lodash/kebabCase.js +28 -0
- package/node_modules/lodash/keyBy.js +36 -0
- package/node_modules/lodash/keys.js +37 -0
- package/node_modules/lodash/keysIn.js +32 -0
- package/node_modules/lodash/lang.js +58 -0
- package/node_modules/lodash/last.js +20 -0
- package/node_modules/lodash/lastIndexOf.js +46 -0
- package/node_modules/lodash/lodash.js +17259 -0
- package/node_modules/lodash/lodash.min.js +136 -0
- package/node_modules/lodash/lowerCase.js +27 -0
- package/node_modules/lodash/lowerFirst.js +22 -0
- package/node_modules/lodash/lt.js +29 -0
- package/node_modules/lodash/lte.js +30 -0
- package/node_modules/lodash/map.js +53 -0
- package/node_modules/lodash/mapKeys.js +36 -0
- package/node_modules/lodash/mapValues.js +43 -0
- package/node_modules/lodash/matches.js +46 -0
- package/node_modules/lodash/matchesProperty.js +44 -0
- package/node_modules/lodash/math.js +17 -0
- package/node_modules/lodash/max.js +29 -0
- package/node_modules/lodash/maxBy.js +34 -0
- package/node_modules/lodash/mean.js +22 -0
- package/node_modules/lodash/meanBy.js +31 -0
- package/node_modules/lodash/memoize.js +73 -0
- package/node_modules/lodash/merge.js +39 -0
- package/node_modules/lodash/mergeWith.js +39 -0
- package/node_modules/lodash/method.js +34 -0
- package/node_modules/lodash/methodOf.js +33 -0
- package/node_modules/lodash/min.js +29 -0
- package/node_modules/lodash/minBy.js +34 -0
- package/node_modules/lodash/mixin.js +74 -0
- package/node_modules/lodash/multiply.js +22 -0
- package/node_modules/lodash/negate.js +40 -0
- package/node_modules/lodash/next.js +35 -0
- package/node_modules/lodash/noop.js +17 -0
- package/node_modules/lodash/now.js +23 -0
- package/node_modules/lodash/nth.js +29 -0
- package/node_modules/lodash/nthArg.js +32 -0
- package/node_modules/lodash/number.js +5 -0
- package/node_modules/lodash/object.js +49 -0
- package/node_modules/lodash/omit.js +57 -0
- package/node_modules/lodash/omitBy.js +29 -0
- package/node_modules/lodash/once.js +25 -0
- package/node_modules/lodash/orderBy.js +47 -0
- package/node_modules/lodash/over.js +24 -0
- package/node_modules/lodash/overArgs.js +61 -0
- package/node_modules/lodash/overEvery.js +34 -0
- package/node_modules/lodash/overSome.js +37 -0
- package/node_modules/lodash/package.json +19 -0
- package/node_modules/lodash/pad.js +49 -0
- package/node_modules/lodash/padEnd.js +39 -0
- package/node_modules/lodash/padStart.js +39 -0
- package/node_modules/lodash/parseInt.js +43 -0
- package/node_modules/lodash/partial.js +50 -0
- package/node_modules/lodash/partialRight.js +49 -0
- package/node_modules/lodash/partition.js +43 -0
- package/node_modules/lodash/pick.js +25 -0
- package/node_modules/lodash/pickBy.js +37 -0
- package/node_modules/lodash/plant.js +48 -0
- package/node_modules/lodash/property.js +32 -0
- package/node_modules/lodash/propertyOf.js +30 -0
- package/node_modules/lodash/pull.js +29 -0
- package/node_modules/lodash/pullAll.js +29 -0
- package/node_modules/lodash/pullAllBy.js +33 -0
- package/node_modules/lodash/pullAllWith.js +32 -0
- package/node_modules/lodash/pullAt.js +43 -0
- package/node_modules/lodash/random.js +91 -0
- package/node_modules/lodash/range.js +46 -0
- package/node_modules/lodash/rangeRight.js +41 -0
- package/node_modules/lodash/rearg.js +33 -0
- package/node_modules/lodash/reduce.js +51 -0
- package/node_modules/lodash/reduceRight.js +36 -0
- package/node_modules/lodash/reject.js +46 -0
- package/node_modules/lodash/remove.js +53 -0
- package/node_modules/lodash/repeat.js +37 -0
- package/node_modules/lodash/replace.js +29 -0
- package/node_modules/lodash/rest.js +40 -0
- package/node_modules/lodash/result.js +56 -0
- package/node_modules/lodash/reverse.js +34 -0
- package/node_modules/lodash/round.js +26 -0
- package/node_modules/lodash/sample.js +24 -0
- package/node_modules/lodash/sampleSize.js +37 -0
- package/node_modules/lodash/seq.js +16 -0
- package/node_modules/lodash/set.js +35 -0
- package/node_modules/lodash/setWith.js +32 -0
- package/node_modules/lodash/shuffle.js +25 -0
- package/node_modules/lodash/size.js +46 -0
- package/node_modules/lodash/slice.js +37 -0
- package/node_modules/lodash/snakeCase.js +28 -0
- package/node_modules/lodash/some.js +51 -0
- package/node_modules/lodash/sortBy.js +48 -0
- package/node_modules/lodash/sortedIndex.js +24 -0
- package/node_modules/lodash/sortedIndexBy.js +33 -0
- package/node_modules/lodash/sortedIndexOf.js +31 -0
- package/node_modules/lodash/sortedLastIndex.js +25 -0
- package/node_modules/lodash/sortedLastIndexBy.js +33 -0
- package/node_modules/lodash/sortedLastIndexOf.js +31 -0
- package/node_modules/lodash/sortedUniq.js +24 -0
- package/node_modules/lodash/sortedUniqBy.js +26 -0
- package/node_modules/lodash/split.js +52 -0
- package/node_modules/lodash/spread.js +63 -0
- package/node_modules/lodash/startCase.js +29 -0
- package/node_modules/lodash/startsWith.js +39 -0
- package/node_modules/lodash/string.js +33 -0
- package/node_modules/lodash/stubArray.js +23 -0
- package/node_modules/lodash/stubFalse.js +18 -0
- package/node_modules/lodash/stubObject.js +23 -0
- package/node_modules/lodash/stubString.js +18 -0
- package/node_modules/lodash/stubTrue.js +18 -0
- package/node_modules/lodash/subtract.js +22 -0
- package/node_modules/lodash/sum.js +24 -0
- package/node_modules/lodash/sumBy.js +33 -0
- package/node_modules/lodash/tail.js +22 -0
- package/node_modules/lodash/take.js +37 -0
- package/node_modules/lodash/takeRight.js +39 -0
- package/node_modules/lodash/takeRightWhile.js +45 -0
- package/node_modules/lodash/takeWhile.js +45 -0
- package/node_modules/lodash/tap.js +29 -0
- package/node_modules/lodash/template.js +284 -0
- package/node_modules/lodash/templateSettings.js +71 -0
- package/node_modules/lodash/throttle.js +69 -0
- package/node_modules/lodash/thru.js +28 -0
- package/node_modules/lodash/times.js +51 -0
- package/node_modules/lodash/toArray.js +58 -0
- package/node_modules/lodash/toFinite.js +42 -0
- package/node_modules/lodash/toInteger.js +36 -0
- package/node_modules/lodash/toIterator.js +23 -0
- package/node_modules/lodash/toJSON.js +1 -0
- package/node_modules/lodash/toLength.js +38 -0
- package/node_modules/lodash/toLower.js +28 -0
- package/node_modules/lodash/toNumber.js +64 -0
- package/node_modules/lodash/toPairs.js +30 -0
- package/node_modules/lodash/toPairsIn.js +30 -0
- package/node_modules/lodash/toPath.js +33 -0
- package/node_modules/lodash/toPlainObject.js +32 -0
- package/node_modules/lodash/toSafeInteger.js +37 -0
- package/node_modules/lodash/toString.js +28 -0
- package/node_modules/lodash/toUpper.js +28 -0
- package/node_modules/lodash/transform.js +65 -0
- package/node_modules/lodash/trim.js +47 -0
- package/node_modules/lodash/trimEnd.js +41 -0
- package/node_modules/lodash/trimStart.js +43 -0
- package/node_modules/lodash/truncate.js +111 -0
- package/node_modules/lodash/unary.js +22 -0
- package/node_modules/lodash/unescape.js +34 -0
- package/node_modules/lodash/union.js +26 -0
- package/node_modules/lodash/unionBy.js +39 -0
- package/node_modules/lodash/unionWith.js +34 -0
- package/node_modules/lodash/uniq.js +25 -0
- package/node_modules/lodash/uniqBy.js +31 -0
- package/node_modules/lodash/uniqWith.js +28 -0
- package/node_modules/lodash/uniqueId.js +28 -0
- package/node_modules/lodash/unset.js +34 -0
- package/node_modules/lodash/unzip.js +45 -0
- package/node_modules/lodash/unzipWith.js +39 -0
- package/node_modules/lodash/update.js +35 -0
- package/node_modules/lodash/updateWith.js +33 -0
- package/node_modules/lodash/upperCase.js +27 -0
- package/node_modules/lodash/upperFirst.js +22 -0
- package/node_modules/lodash/util.js +34 -0
- package/node_modules/lodash/value.js +1 -0
- package/node_modules/lodash/valueOf.js +1 -0
- package/node_modules/lodash/values.js +34 -0
- package/node_modules/lodash/valuesIn.js +32 -0
- package/node_modules/lodash/without.js +31 -0
- package/node_modules/lodash/words.js +35 -0
- package/node_modules/lodash/wrap.js +30 -0
- package/node_modules/lodash/wrapperAt.js +48 -0
- package/node_modules/lodash/wrapperChain.js +34 -0
- package/node_modules/lodash/wrapperLodash.js +147 -0
- package/node_modules/lodash/wrapperReverse.js +44 -0
- package/node_modules/lodash/wrapperValue.js +21 -0
- package/node_modules/lodash/xor.js +28 -0
- package/node_modules/lodash/xorBy.js +39 -0
- package/node_modules/lodash/xorWith.js +34 -0
- package/node_modules/lodash/zip.js +22 -0
- package/node_modules/lodash/zipObject.js +24 -0
- package/node_modules/lodash/zipObjectDeep.js +23 -0
- package/node_modules/lodash/zipWith.js +32 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/mime-db/README.md +100 -0
- package/node_modules/mime-db/db.json +8519 -0
- package/node_modules/mime-db/index.js +12 -0
- package/node_modules/mime-db/package.json +60 -0
- package/node_modules/mime-types/HISTORY.md +397 -0
- package/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/mime-types/README.md +113 -0
- package/node_modules/mime-types/index.js +188 -0
- package/node_modules/mime-types/package.json +44 -0
- package/node_modules/minimist/.eslintrc +29 -0
- package/node_modules/minimist/.github/FUNDING.yml +12 -0
- package/node_modules/minimist/.nycrc +14 -0
- package/node_modules/minimist/CHANGELOG.md +298 -0
- package/node_modules/minimist/LICENSE +18 -0
- package/node_modules/minimist/README.md +121 -0
- package/node_modules/minimist/example/parse.js +4 -0
- package/node_modules/minimist/index.js +263 -0
- package/node_modules/minimist/package.json +75 -0
- package/node_modules/minimist/test/all_bool.js +34 -0
- package/node_modules/minimist/test/bool.js +177 -0
- package/node_modules/minimist/test/dash.js +43 -0
- package/node_modules/minimist/test/default_bool.js +37 -0
- package/node_modules/minimist/test/dotted.js +24 -0
- package/node_modules/minimist/test/kv_short.js +32 -0
- package/node_modules/minimist/test/long.js +33 -0
- package/node_modules/minimist/test/num.js +38 -0
- package/node_modules/minimist/test/parse.js +209 -0
- package/node_modules/minimist/test/parse_modified.js +11 -0
- package/node_modules/minimist/test/proto.js +64 -0
- package/node_modules/minimist/test/short.js +69 -0
- package/node_modules/minimist/test/stop_early.js +17 -0
- package/node_modules/minimist/test/unknown.js +104 -0
- package/node_modules/minimist/test/whitespace.js +10 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/node-addon-api/LICENSE.md +9 -0
- package/node_modules/node-addon-api/README.md +319 -0
- package/node_modules/node-addon-api/common.gypi +20 -0
- package/node_modules/node-addon-api/except.gypi +25 -0
- package/node_modules/node-addon-api/index.js +12 -0
- package/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
- package/node_modules/node-addon-api/napi-inl.h +6607 -0
- package/node_modules/node-addon-api/napi.h +3201 -0
- package/node_modules/node-addon-api/node_addon_api.gyp +32 -0
- package/node_modules/node-addon-api/node_api.gyp +9 -0
- package/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +21 -0
- package/node_modules/node-addon-api/package.json +480 -0
- package/node_modules/node-addon-api/tools/README.md +73 -0
- package/node_modules/node-addon-api/tools/check-napi.js +99 -0
- package/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/node_modules/node-addon-api/tools/conversion.js +301 -0
- package/node_modules/node-addon-api/tools/eslint-format.js +79 -0
- package/node_modules/once/LICENSE +15 -0
- package/node_modules/once/README.md +79 -0
- package/node_modules/once/once.js +42 -0
- package/node_modules/once/package.json +33 -0
- package/node_modules/possible-typed-array-names/.eslintrc +5 -0
- package/node_modules/possible-typed-array-names/.github/FUNDING.yml +12 -0
- package/node_modules/possible-typed-array-names/CHANGELOG.md +29 -0
- package/node_modules/possible-typed-array-names/LICENSE +21 -0
- package/node_modules/possible-typed-array-names/README.md +50 -0
- package/node_modules/possible-typed-array-names/index.d.ts +16 -0
- package/node_modules/possible-typed-array-names/index.js +17 -0
- package/node_modules/possible-typed-array-names/package.json +84 -0
- package/node_modules/possible-typed-array-names/test/index.js +19 -0
- package/node_modules/possible-typed-array-names/tsconfig.json +9 -0
- package/node_modules/process-nextick-args/index.js +45 -0
- package/node_modules/process-nextick-args/license.md +19 -0
- package/node_modules/process-nextick-args/package.json +25 -0
- package/node_modules/process-nextick-args/readme.md +18 -0
- package/node_modules/proxy-from-env/LICENSE +20 -0
- package/node_modules/proxy-from-env/README.md +163 -0
- package/node_modules/proxy-from-env/index.cjs +105 -0
- package/node_modules/proxy-from-env/index.js +103 -0
- package/node_modules/proxy-from-env/package.json +43 -0
- package/node_modules/pump/.travis.yml +5 -0
- package/node_modules/pump/LICENSE +21 -0
- package/node_modules/pump/README.md +56 -0
- package/node_modules/pump/index.js +80 -0
- package/node_modules/pump/package.json +24 -0
- package/node_modules/pump/test-browser.js +58 -0
- package/node_modules/pump/test.js +46 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/safe-buffer/package.json +51 -0
- package/node_modules/set-function-length/.eslintrc +27 -0
- package/node_modules/set-function-length/.github/FUNDING.yml +12 -0
- package/node_modules/set-function-length/.nycrc +13 -0
- package/node_modules/set-function-length/CHANGELOG.md +70 -0
- package/node_modules/set-function-length/LICENSE +21 -0
- package/node_modules/set-function-length/README.md +56 -0
- package/node_modules/set-function-length/env.d.ts +9 -0
- package/node_modules/set-function-length/env.js +25 -0
- package/node_modules/set-function-length/index.d.ts +7 -0
- package/node_modules/set-function-length/index.js +42 -0
- package/node_modules/set-function-length/package.json +102 -0
- package/node_modules/set-function-length/tsconfig.json +9 -0
- package/node_modules/tar-fs/.travis.yml +3 -0
- package/node_modules/tar-fs/LICENSE +21 -0
- package/node_modules/tar-fs/README.md +163 -0
- package/node_modules/tar-fs/index.js +356 -0
- package/node_modules/tar-fs/node_modules/chownr/LICENSE +15 -0
- package/node_modules/tar-fs/node_modules/chownr/README.md +3 -0
- package/node_modules/tar-fs/node_modules/chownr/chownr.js +167 -0
- package/node_modules/tar-fs/node_modules/chownr/package.json +29 -0
- package/node_modules/tar-fs/node_modules/mkdirp/LICENSE +21 -0
- package/node_modules/tar-fs/node_modules/mkdirp/bin/cmd.js +33 -0
- package/node_modules/tar-fs/node_modules/mkdirp/bin/usage.txt +12 -0
- package/node_modules/tar-fs/node_modules/mkdirp/index.js +102 -0
- package/node_modules/tar-fs/node_modules/mkdirp/package.json +33 -0
- package/node_modules/tar-fs/node_modules/mkdirp/readme.markdown +100 -0
- package/node_modules/tar-fs/package.json +41 -0
- package/node_modules/tar-fs/test/fixtures/a/hello.txt +1 -0
- package/node_modules/tar-fs/test/fixtures/b/a/test.txt +1 -0
- package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/node_modules/tar-fs/test/index.js +346 -0
- package/node_modules/tar-stream/LICENSE +21 -0
- package/node_modules/tar-stream/README.md +168 -0
- package/node_modules/tar-stream/extract.js +258 -0
- package/node_modules/tar-stream/headers.js +283 -0
- package/node_modules/tar-stream/index.js +2 -0
- package/node_modules/tar-stream/node_modules/bl/.jshintrc +59 -0
- package/node_modules/tar-stream/node_modules/bl/.travis.yml +13 -0
- package/node_modules/tar-stream/node_modules/bl/LICENSE.md +13 -0
- package/node_modules/tar-stream/node_modules/bl/README.md +208 -0
- package/node_modules/tar-stream/node_modules/bl/bl.js +290 -0
- package/node_modules/tar-stream/node_modules/bl/package.json +35 -0
- package/node_modules/tar-stream/node_modules/bl/test/test.js +718 -0
- package/node_modules/tar-stream/node_modules/isarray/.npmignore +1 -0
- package/node_modules/tar-stream/node_modules/isarray/.travis.yml +4 -0
- package/node_modules/tar-stream/node_modules/isarray/Makefile +6 -0
- package/node_modules/tar-stream/node_modules/isarray/README.md +60 -0
- package/node_modules/tar-stream/node_modules/isarray/component.json +19 -0
- package/node_modules/tar-stream/node_modules/isarray/index.js +5 -0
- package/node_modules/tar-stream/node_modules/isarray/package.json +45 -0
- package/node_modules/tar-stream/node_modules/isarray/test.js +20 -0
- package/node_modules/tar-stream/node_modules/readable-stream/.travis.yml +34 -0
- package/node_modules/tar-stream/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/tar-stream/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/tar-stream/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/tar-stream/node_modules/readable-stream/README.md +58 -0
- package/node_modules/tar-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
- package/node_modules/tar-stream/node_modules/readable-stream/duplex-browser.js +1 -0
- package/node_modules/tar-stream/node_modules/readable-stream/duplex.js +1 -0
- package/node_modules/tar-stream/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
- package/node_modules/tar-stream/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
- package/node_modules/tar-stream/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
- package/node_modules/tar-stream/node_modules/readable-stream/lib/_stream_transform.js +214 -0
- package/node_modules/tar-stream/node_modules/readable-stream/lib/_stream_writable.js +685 -0
- package/node_modules/tar-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
- package/node_modules/tar-stream/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
- package/node_modules/tar-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/tar-stream/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/tar-stream/node_modules/readable-stream/package.json +52 -0
- package/node_modules/tar-stream/node_modules/readable-stream/passthrough.js +1 -0
- package/node_modules/tar-stream/node_modules/readable-stream/readable-browser.js +7 -0
- package/node_modules/tar-stream/node_modules/readable-stream/readable.js +19 -0
- package/node_modules/tar-stream/node_modules/readable-stream/transform.js +1 -0
- package/node_modules/tar-stream/node_modules/readable-stream/writable-browser.js +1 -0
- package/node_modules/tar-stream/node_modules/readable-stream/writable.js +8 -0
- package/node_modules/tar-stream/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/tar-stream/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/tar-stream/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/tar-stream/node_modules/safe-buffer/index.js +62 -0
- package/node_modules/tar-stream/node_modules/safe-buffer/package.json +37 -0
- package/node_modules/tar-stream/node_modules/string_decoder/.travis.yml +50 -0
- package/node_modules/tar-stream/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/tar-stream/node_modules/string_decoder/README.md +47 -0
- package/node_modules/tar-stream/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/tar-stream/node_modules/string_decoder/package.json +31 -0
- package/node_modules/tar-stream/pack.js +255 -0
- package/node_modules/tar-stream/package.json +60 -0
- package/node_modules/targz/.npmignore +2 -0
- package/node_modules/targz/LICENSE +22 -0
- package/node_modules/targz/README.md +103 -0
- package/node_modules/targz/index.js +1 -0
- package/node_modules/targz/lib/targz.js +78 -0
- package/node_modules/targz/package.json +28 -0
- package/node_modules/to-buffer/.github/FUNDING.yml +12 -0
- package/node_modules/to-buffer/CHANGELOG.md +81 -0
- package/node_modules/to-buffer/LICENSE +21 -0
- package/node_modules/to-buffer/README.md +44 -0
- package/node_modules/to-buffer/index.js +109 -0
- package/node_modules/to-buffer/package.json +62 -0
- package/node_modules/typed-array-buffer/.eslintrc +13 -0
- package/node_modules/typed-array-buffer/.github/FUNDING.yml +12 -0
- package/node_modules/typed-array-buffer/.nycrc +13 -0
- package/node_modules/typed-array-buffer/CHANGELOG.md +50 -0
- package/node_modules/typed-array-buffer/LICENSE +21 -0
- package/node_modules/typed-array-buffer/README.md +42 -0
- package/node_modules/typed-array-buffer/index.d.ts +9 -0
- package/node_modules/typed-array-buffer/index.js +19 -0
- package/node_modules/typed-array-buffer/package.json +82 -0
- package/node_modules/typed-array-buffer/test/index.js +23 -0
- package/node_modules/typed-array-buffer/tsconfig.json +9 -0
- package/node_modules/universalify/LICENSE +20 -0
- package/node_modules/universalify/README.md +76 -0
- package/node_modules/universalify/index.js +24 -0
- package/node_modules/universalify/package.json +34 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/node_modules/which-typed-array/.editorconfig +20 -0
- package/node_modules/which-typed-array/.github/FUNDING.yml +12 -0
- package/node_modules/which-typed-array/.nycrc +13 -0
- package/node_modules/which-typed-array/CHANGELOG.md +287 -0
- package/node_modules/which-typed-array/LICENSE +22 -0
- package/node_modules/which-typed-array/README.md +70 -0
- package/node_modules/which-typed-array/eslint.config.mjs +12 -0
- package/node_modules/which-typed-array/index.d.ts +35 -0
- package/node_modules/which-typed-array/index.js +135 -0
- package/node_modules/which-typed-array/package.json +130 -0
- package/node_modules/which-typed-array/test/index.js +105 -0
- package/node_modules/which-typed-array/tsconfig.json +9 -0
- package/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/wrappy/README.md +36 -0
- package/node_modules/wrappy/package.json +29 -0
- package/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/xtend/.jshintrc +30 -0
- package/node_modules/xtend/LICENSE +20 -0
- package/node_modules/xtend/README.md +32 -0
- package/node_modules/xtend/immutable.js +19 -0
- package/node_modules/xtend/mutable.js +17 -0
- package/node_modules/xtend/package.json +55 -0
- package/node_modules/xtend/test.js +103 -0
- package/package.json +28 -18
- package/npm-shrinkwrap.json +0 -608
|
@@ -0,0 +1,3487 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2013, Dan VerWeire <dverweire@gmail.com>
|
|
3
|
+
Copyright (c) 2010, Lee Smith <notwink@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
'use strict';
|
|
19
|
+
|
|
20
|
+
// Setting SQLLIB bin path to the path env before load for windows
|
|
21
|
+
var os = require('os'),
|
|
22
|
+
path = require('path');
|
|
23
|
+
var platform = os.platform();
|
|
24
|
+
|
|
25
|
+
// Set PATH and LIB env vars for clidriver.
|
|
26
|
+
var clidriver = path.resolve(__dirname, '../installer/clidriver');
|
|
27
|
+
if (process.env.IBM_DB_HOME) {
|
|
28
|
+
clidriver = process.env.IBM_DB_HOME;
|
|
29
|
+
}
|
|
30
|
+
if(platform == 'win32')
|
|
31
|
+
{
|
|
32
|
+
process.env.PATH = path.resolve(clidriver, 'bin') + ';' +
|
|
33
|
+
path.resolve(clidriver, 'bin/amd64.VC12.CRT') + ';' +
|
|
34
|
+
path.resolve(clidriver, 'bin/icc64') + ';' +
|
|
35
|
+
path.resolve(clidriver, 'lib') + ';' + process.env.PATH;
|
|
36
|
+
process.env.LIB = path.resolve(clidriver, 'bin') + ';' +
|
|
37
|
+
path.resolve(clidriver, 'bin/icc64') + ';' +
|
|
38
|
+
path.resolve(clidriver, 'lib') + ';' + process.env.LIB;
|
|
39
|
+
}
|
|
40
|
+
else if(platform == 'linux') {
|
|
41
|
+
process.env.PATH = path.resolve(clidriver, 'bin') + ':' +
|
|
42
|
+
path.resolve(clidriver, 'lib') + ':' + process.env.PATH;
|
|
43
|
+
process.env.LD_LIBRARY_PATH = path.resolve(clidriver, 'lib') + ':' +
|
|
44
|
+
path.resolve(clidriver, 'lib/icc') + ':' + process.env.LD_LIBRARY_PATH;
|
|
45
|
+
}
|
|
46
|
+
else if(platform == 'darwin') {
|
|
47
|
+
process.env.PATH = path.resolve(clidriver, 'bin') + ':' +
|
|
48
|
+
path.resolve(clidriver, 'lib') + ':' + process.env.PATH;
|
|
49
|
+
process.env.DYLD_LIBRARY_PATH = path.resolve(clidriver, 'lib') + ':' +
|
|
50
|
+
path.resolve(clidriver, 'lib/icc') + ':' + process.env.DYLD_LIBRARY_PATH;
|
|
51
|
+
}
|
|
52
|
+
else if(platform == 'aix') {
|
|
53
|
+
process.env.PATH = path.resolve(clidriver, 'bin') + ':' +
|
|
54
|
+
path.resolve(clidriver, 'lib') + ':' + process.env.PATH;
|
|
55
|
+
process.env.LIBPATH = path.resolve(clidriver, 'lib') + ':' +
|
|
56
|
+
path.resolve(clidriver, 'lib/icc') + ':' + process.env.LIBPATH;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var odbc = require("bindings")("odbc_bindings")
|
|
60
|
+
, SimpleQueue = require("./simple-queue")
|
|
61
|
+
, macro = require("./climacros")
|
|
62
|
+
, util = require("util")
|
|
63
|
+
, Readable = require('stream').Readable;
|
|
64
|
+
|
|
65
|
+
function createDeferred() {
|
|
66
|
+
var resolvePromise;
|
|
67
|
+
var rejectPromise;
|
|
68
|
+
var promise = new Promise(function (resolve, reject) {
|
|
69
|
+
resolvePromise = resolve;
|
|
70
|
+
rejectPromise = reject;
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
promise: promise,
|
|
75
|
+
resolve: resolvePromise,
|
|
76
|
+
reject: rejectPromise
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
// Call of odbc.ODBC() loads odbc library and allocate environment handle.
|
|
82
|
+
// All calls of new Database() should use this same odbc unless passed as
|
|
83
|
+
// options.odbc. ENV will keep value of this odbc after first call of Database.
|
|
84
|
+
var ENV;
|
|
85
|
+
module.exports = function (options)
|
|
86
|
+
{
|
|
87
|
+
return new Database(options);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
module.exports.Database = Database;
|
|
91
|
+
module.exports.ODBC = odbc.ODBC;
|
|
92
|
+
module.exports.ODBCConnection = odbc.ODBCConnection;
|
|
93
|
+
module.exports.ODBCStatement = odbc.ODBCStatement;
|
|
94
|
+
module.exports.ODBCResult = odbc.ODBCResult;
|
|
95
|
+
|
|
96
|
+
exports.debug = false;
|
|
97
|
+
var logParams = false;
|
|
98
|
+
var ibmdbStartTime = new Date();
|
|
99
|
+
var getElapsedTime = function(){
|
|
100
|
+
var tstamp = (new Date() - ibmdbStartTime)/1000.0;
|
|
101
|
+
//process.stdout.write(tstamp + " :: ");
|
|
102
|
+
return (tstamp + " :: ");
|
|
103
|
+
};
|
|
104
|
+
module.exports.getElapsedTime = getElapsedTime;
|
|
105
|
+
|
|
106
|
+
module.exports.debug = function(x) {
|
|
107
|
+
if(x) {
|
|
108
|
+
exports.debug = true;
|
|
109
|
+
console.log("node-ibm_db logs enabled.");
|
|
110
|
+
if(x == 2) {
|
|
111
|
+
logParams = true;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
exports.debug = false;
|
|
116
|
+
console.log("node-ibm_db logs disabled.");
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
var connError = {
|
|
121
|
+
message: "Connection not open.",
|
|
122
|
+
sqlstate: "08001",
|
|
123
|
+
sqlcode: -30081
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
module.exports.open = function (connStr, options, cb)
|
|
127
|
+
{
|
|
128
|
+
var db, deferred;
|
|
129
|
+
|
|
130
|
+
var DBFactory = function(options) {
|
|
131
|
+
return new Database(options);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
if (!cb && typeof options !== 'function')
|
|
135
|
+
{
|
|
136
|
+
if(!options)
|
|
137
|
+
{
|
|
138
|
+
options = null;
|
|
139
|
+
}
|
|
140
|
+
db = DBFactory(options);
|
|
141
|
+
deferred = createDeferred();
|
|
142
|
+
db.open(connStr, function(err) {
|
|
143
|
+
if (err)
|
|
144
|
+
{
|
|
145
|
+
deferred.reject(err);
|
|
146
|
+
}
|
|
147
|
+
else
|
|
148
|
+
{
|
|
149
|
+
deferred.resolve(db);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
return deferred.promise;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
else if (typeof options === 'function')
|
|
156
|
+
{
|
|
157
|
+
cb = options;
|
|
158
|
+
options = null;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
db = DBFactory(options);
|
|
162
|
+
|
|
163
|
+
db.open(connStr, function (err) {
|
|
164
|
+
cb && cb(err, db);
|
|
165
|
+
});
|
|
166
|
+
}; // ibmdb.open
|
|
167
|
+
|
|
168
|
+
module.exports.openSync = function (connStr, options)
|
|
169
|
+
{
|
|
170
|
+
var db = new Database(options);
|
|
171
|
+
db.openSync(connStr);
|
|
172
|
+
return db;
|
|
173
|
+
}; // ibmdb.openSync
|
|
174
|
+
|
|
175
|
+
/*
|
|
176
|
+
* Create Database.
|
|
177
|
+
* (createDbSync)
|
|
178
|
+
* args: dbName, codeSet, mode.
|
|
179
|
+
* (codeSet, mode are optional and default values will be null)
|
|
180
|
+
*
|
|
181
|
+
* return: TRUE on success or FALSE on failure.
|
|
182
|
+
*/
|
|
183
|
+
module.exports.createDbSync = function (dbName, connStr, options)
|
|
184
|
+
{
|
|
185
|
+
// createDbSync API is not supported on z/OS:
|
|
186
|
+
// Databases are implemented/used in Db2 for z/OS differently than
|
|
187
|
+
// and Db2 for LUW. A database in z/OS is simply a logical collection
|
|
188
|
+
// of table/index spaces that you create using the "CREATE DATABASE"
|
|
189
|
+
// SQL statement, while a database in LUW is conceptually equivalent
|
|
190
|
+
// to a subsystem in z/OS. Connecting to a Db2 on z/OS subsystem
|
|
191
|
+
// entails a "database" is created already. As such, this API is
|
|
192
|
+
// not applicable.
|
|
193
|
+
if (os.type() === "OS/390")
|
|
194
|
+
{
|
|
195
|
+
throw new Error("[node-ibm_db] createDbSync API is not supported on z/OS");
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
var result;
|
|
199
|
+
var db = new Database(options);
|
|
200
|
+
|
|
201
|
+
if (typeof(connStr) === "object")
|
|
202
|
+
{
|
|
203
|
+
var obj = connStr;
|
|
204
|
+
connStr = "";
|
|
205
|
+
|
|
206
|
+
Object.keys(obj).forEach(function (key) {
|
|
207
|
+
connStr += key + "=" + obj[key] + ";";
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
var conStr = connStr + ";" + "ATTACH=true";
|
|
211
|
+
|
|
212
|
+
var connectionOpen = db.openSync(conStr);
|
|
213
|
+
|
|
214
|
+
if (connectionOpen)
|
|
215
|
+
{
|
|
216
|
+
db.connected = true;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (!db.connected)
|
|
220
|
+
{
|
|
221
|
+
throw ({ message : "Connection not open."});
|
|
222
|
+
}
|
|
223
|
+
else
|
|
224
|
+
{
|
|
225
|
+
if(dbName == null )
|
|
226
|
+
{
|
|
227
|
+
throw ({ message : "Database Name <db_Name> is required."});
|
|
228
|
+
}
|
|
229
|
+
else
|
|
230
|
+
{
|
|
231
|
+
// IF: argument "options" is not passed while calling.
|
|
232
|
+
// THEN: db.codeSet and db.mode will be "null" (default value).
|
|
233
|
+
result = db.conn.createDbSync(dbName, db.codeSet, db.mode);
|
|
234
|
+
return result;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}; // ibmdb.createDbSync
|
|
238
|
+
|
|
239
|
+
/*
|
|
240
|
+
* Drop Database.
|
|
241
|
+
* (dropDbSync)
|
|
242
|
+
* args: dbName
|
|
243
|
+
*
|
|
244
|
+
* return: TRUE on success or FALSE on failure.
|
|
245
|
+
*/
|
|
246
|
+
module.exports.dropDbSync = function (dbName, connStr, options)
|
|
247
|
+
{
|
|
248
|
+
// dropDbSync API is not supported on z/OS:
|
|
249
|
+
// Databases are implemented/used in Db2 for z/OS differently than
|
|
250
|
+
// and Db2 for LUW. A database in z/OS is simply a logical collection
|
|
251
|
+
// of table/index spaces that you create using the "CREATE DATABASE"
|
|
252
|
+
// SQL statement, while a database in LUW is conceptually equivalent
|
|
253
|
+
// to a subsystem in z/OS. Connecting to a Db2 on z/OS subsystem
|
|
254
|
+
// entails a "database" is created already. As such, this API is
|
|
255
|
+
// not applicable for Db2 on z/OS servers.
|
|
256
|
+
if (os.type() === "OS/390")
|
|
257
|
+
{
|
|
258
|
+
throw new Error("[node-ibm_db] dropDbSync API is not supported on z/OS");
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
var result;
|
|
262
|
+
var db = new Database(options);
|
|
263
|
+
|
|
264
|
+
if (typeof(connStr) === "object")
|
|
265
|
+
{
|
|
266
|
+
var obj = connStr;
|
|
267
|
+
connStr = "";
|
|
268
|
+
|
|
269
|
+
Object.keys(obj).forEach(function (key) {
|
|
270
|
+
connStr += key + "=" + obj[key] + ";";
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
var conStr = connStr + ";" + "ATTACH=true";
|
|
274
|
+
|
|
275
|
+
var connectionOpen = db.openSync(conStr);
|
|
276
|
+
|
|
277
|
+
if (connectionOpen)
|
|
278
|
+
{
|
|
279
|
+
db.connected = true;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
if (!db.connected)
|
|
283
|
+
{
|
|
284
|
+
throw ({ message : "Connection not open."});
|
|
285
|
+
}
|
|
286
|
+
else
|
|
287
|
+
{
|
|
288
|
+
if(dbName == null )
|
|
289
|
+
{
|
|
290
|
+
throw ({ message : "Database Name <db_Name> is required."});
|
|
291
|
+
}
|
|
292
|
+
else
|
|
293
|
+
{
|
|
294
|
+
result = db.conn.dropDbSync(dbName);
|
|
295
|
+
return result;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}; // ibmdb.dropDbSync
|
|
299
|
+
|
|
300
|
+
module.exports.close = function(db)
|
|
301
|
+
{
|
|
302
|
+
if(db && typeof(db) === "object")
|
|
303
|
+
{
|
|
304
|
+
for(var key in db)
|
|
305
|
+
{
|
|
306
|
+
delete db[key];
|
|
307
|
+
}
|
|
308
|
+
db = undefined;
|
|
309
|
+
}
|
|
310
|
+
}; // ibmdb.close
|
|
311
|
+
|
|
312
|
+
function Database(options)
|
|
313
|
+
{
|
|
314
|
+
var self = this;
|
|
315
|
+
|
|
316
|
+
options = options || {};
|
|
317
|
+
|
|
318
|
+
self.odbc = (options.odbc) ? options.odbc : ((ENV) ? ENV : new odbc.ODBC());
|
|
319
|
+
if(!ENV) ENV = self.odbc;
|
|
320
|
+
self.queue = new SimpleQueue();
|
|
321
|
+
self.fetchMode = options.fetchMode || null;
|
|
322
|
+
self.connected = false;
|
|
323
|
+
self.connectTimeout = options.connectTimeout || null;
|
|
324
|
+
self.systemNaming = options.systemNaming;
|
|
325
|
+
self.codeSet = options.codeSet || null;
|
|
326
|
+
self.mode = options.mode || null;
|
|
327
|
+
self.pool = options.pool || null;
|
|
328
|
+
if( self.pool ) { // Its a pooled connection
|
|
329
|
+
if( !self.realClose ) {
|
|
330
|
+
self.realClose = self.close;
|
|
331
|
+
self.close = self.poolClose;
|
|
332
|
+
self.realCloseSync = self.closeSync;
|
|
333
|
+
self.closeSync = self.poolCloseSync;
|
|
334
|
+
}
|
|
335
|
+
self.connStr = options.connStr || null;
|
|
336
|
+
}
|
|
337
|
+
} // Database()
|
|
338
|
+
|
|
339
|
+
//Expose constants
|
|
340
|
+
Object.keys(odbc.ODBC).forEach(function (key) {
|
|
341
|
+
if (typeof odbc.ODBC[key] !== "function")
|
|
342
|
+
{
|
|
343
|
+
//On the database prototype
|
|
344
|
+
Database.prototype[key] = odbc.ODBC[key];
|
|
345
|
+
|
|
346
|
+
//On the exports
|
|
347
|
+
module.exports[key] = odbc.ODBC[key];
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
// Expose convertRowsToColumns for use with prepare/bind/execute pattern
|
|
352
|
+
module.exports.convertRowsToColumns = convertRowsToColumns;
|
|
353
|
+
|
|
354
|
+
Database.prototype.open = function (connStr, cb) {
|
|
355
|
+
var self = this, deferred;
|
|
356
|
+
|
|
357
|
+
if (typeof(connStr) === "object")
|
|
358
|
+
{
|
|
359
|
+
var obj = connStr;
|
|
360
|
+
connStr = "";
|
|
361
|
+
|
|
362
|
+
Object.keys(obj).forEach(function (key) {
|
|
363
|
+
connStr += key + "=" + obj[key] + ";";
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
if (!cb)
|
|
368
|
+
{
|
|
369
|
+
deferred = createDeferred();
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
self.odbc.createConnection(function (err, conn) {
|
|
373
|
+
if(!cb)
|
|
374
|
+
{
|
|
375
|
+
if (err) deferred.reject(err);
|
|
376
|
+
} else
|
|
377
|
+
{
|
|
378
|
+
if (err) return cb(err);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
self.conn = conn;
|
|
382
|
+
|
|
383
|
+
if (self.connectTimeout || self.connectTimeout === 0)
|
|
384
|
+
{
|
|
385
|
+
self.conn.connectTimeout = self.connectTimeout;
|
|
386
|
+
}
|
|
387
|
+
if (typeof(self.systemNaming) !== 'undefined')
|
|
388
|
+
{
|
|
389
|
+
self.conn.systemNaming = self.systemNaming;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
self.conn.open(connStr, function (err, result)
|
|
393
|
+
{
|
|
394
|
+
if(cb)
|
|
395
|
+
{
|
|
396
|
+
if (err) cb(err);
|
|
397
|
+
else {
|
|
398
|
+
self.connected = true;
|
|
399
|
+
cb(err, result);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
else
|
|
403
|
+
{
|
|
404
|
+
if(err) deferred.reject(err);
|
|
405
|
+
|
|
406
|
+
self.connected = true;
|
|
407
|
+
deferred.resolve(result);
|
|
408
|
+
}
|
|
409
|
+
}); //conn.open
|
|
410
|
+
}); // odbc.createConnection
|
|
411
|
+
|
|
412
|
+
return deferred ? deferred.promise : null;
|
|
413
|
+
}; // Database.open function
|
|
414
|
+
|
|
415
|
+
Database.prototype.openSync = function (connStr)
|
|
416
|
+
{
|
|
417
|
+
var self = this;
|
|
418
|
+
|
|
419
|
+
self.conn = self.odbc.createConnectionSync();
|
|
420
|
+
|
|
421
|
+
if (self.connectTimeout || self.connectTimeout === 0)
|
|
422
|
+
{
|
|
423
|
+
self.conn.connectTimeout = self.connectTimeout;
|
|
424
|
+
}
|
|
425
|
+
if (typeof(self.systemNaming) !== 'undefined')
|
|
426
|
+
{
|
|
427
|
+
self.conn.systemNaming = self.systemNaming;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if (typeof(connStr) === "object")
|
|
431
|
+
{
|
|
432
|
+
var obj = connStr;
|
|
433
|
+
connStr = "";
|
|
434
|
+
|
|
435
|
+
Object.keys(obj).forEach(function (key) {
|
|
436
|
+
connStr += key + "=" + obj[key] + ";";
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
var result = self.conn.openSync(connStr);
|
|
441
|
+
|
|
442
|
+
if (result)
|
|
443
|
+
{
|
|
444
|
+
self.connected = true;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return result;
|
|
448
|
+
}; // Database.openSync
|
|
449
|
+
|
|
450
|
+
Database.prototype.close = function (cb)
|
|
451
|
+
{
|
|
452
|
+
var self = this, deferred;
|
|
453
|
+
if(!cb)
|
|
454
|
+
{
|
|
455
|
+
deferred = createDeferred();
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
self.queue.push(function (next) {
|
|
459
|
+
if(self.conn)
|
|
460
|
+
{
|
|
461
|
+
self.conn.close(function (err) {
|
|
462
|
+
self.connected = false;
|
|
463
|
+
delete self.conn;
|
|
464
|
+
|
|
465
|
+
if (err) {
|
|
466
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
467
|
+
} else {
|
|
468
|
+
deferred ? deferred.resolve(true) : cb(null);
|
|
469
|
+
}
|
|
470
|
+
return next();
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
else
|
|
474
|
+
{
|
|
475
|
+
self.connected = false;
|
|
476
|
+
deferred ? deferred.resolve(true) : cb(null);
|
|
477
|
+
return next();
|
|
478
|
+
}
|
|
479
|
+
}); // self.queue.push
|
|
480
|
+
|
|
481
|
+
return deferred ? deferred.promise : false;
|
|
482
|
+
}; // Database.close
|
|
483
|
+
|
|
484
|
+
Database.prototype.closeSync = function ()
|
|
485
|
+
{
|
|
486
|
+
var self = this;
|
|
487
|
+
|
|
488
|
+
var result;
|
|
489
|
+
if(self.conn) result = self.conn.closeSync();
|
|
490
|
+
|
|
491
|
+
self.connected = false;
|
|
492
|
+
delete self.conn;
|
|
493
|
+
|
|
494
|
+
return result;
|
|
495
|
+
}; // closeSync
|
|
496
|
+
|
|
497
|
+
Database.prototype.checkConnectionError = function (err)
|
|
498
|
+
{
|
|
499
|
+
// For pooled connection, if we get SQL30081N, then close
|
|
500
|
+
// the connection now only and then proceed.
|
|
501
|
+
|
|
502
|
+
var self = this;
|
|
503
|
+
if(self.realClose){
|
|
504
|
+
if((err && err['message'] && err['message'].search("SQL30081N") != -1))
|
|
505
|
+
{
|
|
506
|
+
// Close all connections in availablePool as all are invalid now
|
|
507
|
+
// It will be removed from available pool on next pool.open for connected=false
|
|
508
|
+
self.closeSync(); //Move connection from usedPool to availablePool
|
|
509
|
+
var availablePool = self.pool.availablePool[self.connStr];
|
|
510
|
+
if (availablePool && availablePool.length) {
|
|
511
|
+
for (var i = 0, len = availablePool.length; i < len; i++) {
|
|
512
|
+
availablePool[i].realCloseSync();
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
self.realCloseSync();
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
Database.prototype.query = function (query, params, cb)
|
|
521
|
+
{
|
|
522
|
+
var self = this, deferred, sql, resultset = [], multipleResultSet = false;
|
|
523
|
+
var sqlca = {sqlstate:"0", sqlcode: 0};
|
|
524
|
+
|
|
525
|
+
exports.debug && console.log(getElapsedTime(), "odbc.js:query() => Entry");
|
|
526
|
+
//support for promises
|
|
527
|
+
if (!cb && typeof params !== 'function')
|
|
528
|
+
{
|
|
529
|
+
deferred = createDeferred();
|
|
530
|
+
!params ? params = null : '';
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
if (typeof(params) === 'function')
|
|
534
|
+
{
|
|
535
|
+
cb = params;
|
|
536
|
+
params = null;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
self.queue.push(function (next) {
|
|
540
|
+
function cbQuery (initialErr, result, outparams)
|
|
541
|
+
{
|
|
542
|
+
if(outparams) {
|
|
543
|
+
resultset = outparams;
|
|
544
|
+
multipleResultSet = true;
|
|
545
|
+
}
|
|
546
|
+
if (result && typeof(result) === 'object') {
|
|
547
|
+
fetchMore();
|
|
548
|
+
} else {
|
|
549
|
+
if (initialErr) {
|
|
550
|
+
if (initialErr.sqlstate) {
|
|
551
|
+
sqlca.sqlstate = initialErr.sqlstate;
|
|
552
|
+
}
|
|
553
|
+
if (initialErr.sqlcode) {
|
|
554
|
+
sqlca.sqlcode = initialErr.sqlcode;
|
|
555
|
+
}
|
|
556
|
+
self.checkConnectionError(initialErr);
|
|
557
|
+
if(deferred) {
|
|
558
|
+
let error = {};
|
|
559
|
+
if(typeof initialErr === 'object') {
|
|
560
|
+
error = initialErr;
|
|
561
|
+
} else {
|
|
562
|
+
error["message"] = initialErr;
|
|
563
|
+
}
|
|
564
|
+
error["resultset"] = resultset;
|
|
565
|
+
error.sqlcode = sqlca.sqlcode;
|
|
566
|
+
error.sqlstate = sqlca.sqlstate;
|
|
567
|
+
deferred.reject(error);
|
|
568
|
+
} else {
|
|
569
|
+
cb(initialErr, resultset, sqlca);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
if (result) { result.closeSync(); }
|
|
573
|
+
initialErr = null;
|
|
574
|
+
return next();
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
function fetchMore()
|
|
578
|
+
{
|
|
579
|
+
if (self.fetchMode)
|
|
580
|
+
{
|
|
581
|
+
result.fetchMode = self.fetchMode;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
result._fetchAll(function (err, data, colcount) {
|
|
585
|
+
var moreResults = false, moreResultsError = null;
|
|
586
|
+
|
|
587
|
+
// If there is any error, return it now only.
|
|
588
|
+
if( err || initialErr )
|
|
589
|
+
{
|
|
590
|
+
self.checkConnectionError(err || initialErr);
|
|
591
|
+
if(multipleResultSet) resultset.push(data);
|
|
592
|
+
else resultset = data;
|
|
593
|
+
err = initialErr || err;
|
|
594
|
+
sqlca.sqlstate = err.sqlstate || sqlca.sqlstate;
|
|
595
|
+
sqlca.sqlcode = err.sqlcode || sqlca.sqlcode;
|
|
596
|
+
console.log(err, sqlca);
|
|
597
|
+
if(deferred) {
|
|
598
|
+
err["resultset"] = resultset;
|
|
599
|
+
err.sqlcode = sqlca.sqlcode;
|
|
600
|
+
err.sqlstate = sqlca.sqlstate;
|
|
601
|
+
deferred.reject(err);
|
|
602
|
+
} else {
|
|
603
|
+
cb(err, resultset, sqlca);
|
|
604
|
+
}
|
|
605
|
+
if (result) { result.closeSync(); }
|
|
606
|
+
initialErr = null;
|
|
607
|
+
err = null;
|
|
608
|
+
return next();
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
// Get the result data
|
|
612
|
+
try
|
|
613
|
+
{
|
|
614
|
+
moreResults = result.moreResultsSync();
|
|
615
|
+
}
|
|
616
|
+
catch (e)
|
|
617
|
+
{
|
|
618
|
+
moreResultsError = e;
|
|
619
|
+
moreResults = false;
|
|
620
|
+
sqlca.sqlstate = e.sqlstate || sqlca.sqlstate;
|
|
621
|
+
sqlca.sqlcode = e.sqlcode || sqlca.sqlcode;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
//close the result before calling back
|
|
625
|
+
//if there are not more result sets
|
|
626
|
+
if (moreResults)
|
|
627
|
+
{
|
|
628
|
+
resultset.push(data);
|
|
629
|
+
multipleResultSet = true;
|
|
630
|
+
fetchMore();
|
|
631
|
+
}
|
|
632
|
+
else
|
|
633
|
+
{
|
|
634
|
+
result.closeSync();
|
|
635
|
+
if( colcount ) {
|
|
636
|
+
if(multipleResultSet) resultset.push(data);
|
|
637
|
+
else resultset = data;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
exports.debug && console.log(getElapsedTime(), "odbc.js:query() => Done.");
|
|
641
|
+
// send exception error and/or data to callback function.
|
|
642
|
+
// only once with all the results.
|
|
643
|
+
if( !sqlca.sqlcode && colcount && !resultset.length ) {
|
|
644
|
+
sqlca.sqlcode = 100;
|
|
645
|
+
}
|
|
646
|
+
if(deferred) {
|
|
647
|
+
if(moreResultsError) {
|
|
648
|
+
moreResultsError["resultset"] = resultset;
|
|
649
|
+
moreResultsError.sqlcode = sqlca.sqlcode;
|
|
650
|
+
moreResultsError.sqlstate = sqlca.sqlstate;
|
|
651
|
+
deferred.reject(moreResultsError);
|
|
652
|
+
} else {
|
|
653
|
+
deferred.resolve(resultset);
|
|
654
|
+
}
|
|
655
|
+
} else {
|
|
656
|
+
cb(moreResultsError, resultset, sqlca);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
moreResultsError = null;
|
|
661
|
+
return next();
|
|
662
|
+
});
|
|
663
|
+
} // function fetchMore
|
|
664
|
+
} //function cbQuery
|
|
665
|
+
|
|
666
|
+
if (!self.connected)
|
|
667
|
+
{
|
|
668
|
+
sqlca = {sqlstate: "08001", sqlcode : -30081};
|
|
669
|
+
deferred ? deferred.reject(connError) : cb(connError, [], sqlca);
|
|
670
|
+
return next();
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
if(typeof query === "object")
|
|
674
|
+
{
|
|
675
|
+
var rowsErr = processRowsOption(query);
|
|
676
|
+
if(rowsErr) {
|
|
677
|
+
deferred ? deferred.reject(rowsErr) : cb(rowsErr);
|
|
678
|
+
return next();
|
|
679
|
+
}
|
|
680
|
+
sql = query.sql;
|
|
681
|
+
if(query.params) params = query.params;
|
|
682
|
+
}
|
|
683
|
+
else
|
|
684
|
+
{
|
|
685
|
+
sql = query;
|
|
686
|
+
}
|
|
687
|
+
exports.debug && console.log(getElapsedTime(), "odbc.js:query() => ", sql);
|
|
688
|
+
|
|
689
|
+
try {
|
|
690
|
+
if (params && params.length > 0)
|
|
691
|
+
{
|
|
692
|
+
// Resolve any Readable stream Data before proceeding
|
|
693
|
+
resolveStreamParams(params, function(streamErr) {
|
|
694
|
+
if (streamErr) {
|
|
695
|
+
deferred ? deferred.reject(streamErr) : cb(streamErr);
|
|
696
|
+
return next();
|
|
697
|
+
}
|
|
698
|
+
if(Array.isArray(params))
|
|
699
|
+
{
|
|
700
|
+
var err = parseParams(params);
|
|
701
|
+
if(err) deferred ? deferred.reject(err) : cb(err);
|
|
702
|
+
}
|
|
703
|
+
if(exports.debug && logParams) {
|
|
704
|
+
console.log("%s odbc.js:query() params = ", getElapsedTime(), params);
|
|
705
|
+
}
|
|
706
|
+
if(typeof query === 'object')
|
|
707
|
+
{
|
|
708
|
+
query.params = params;
|
|
709
|
+
self.conn.query(query, cbQuery);
|
|
710
|
+
}
|
|
711
|
+
else
|
|
712
|
+
self.conn.query(query, params, cbQuery);
|
|
713
|
+
}); // resolveStreamParams
|
|
714
|
+
}
|
|
715
|
+
else
|
|
716
|
+
{
|
|
717
|
+
self.conn.query(query, cbQuery);
|
|
718
|
+
}
|
|
719
|
+
} catch (err)
|
|
720
|
+
{
|
|
721
|
+
self.checkConnectionError(err);
|
|
722
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
723
|
+
return next();
|
|
724
|
+
}
|
|
725
|
+
}); //self.queue.push
|
|
726
|
+
return deferred ? deferred.promise : false;
|
|
727
|
+
}; // Database.query
|
|
728
|
+
|
|
729
|
+
Database.prototype.queryResult = function (query, params, cb)
|
|
730
|
+
{
|
|
731
|
+
var self = this, deferred, sql;
|
|
732
|
+
|
|
733
|
+
//support for promises
|
|
734
|
+
if (!cb && typeof params !== 'function')
|
|
735
|
+
{
|
|
736
|
+
deferred = createDeferred();
|
|
737
|
+
!params ? params = null : '';
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
if (typeof(params) === 'function')
|
|
741
|
+
{
|
|
742
|
+
cb = params;
|
|
743
|
+
params = null;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
if(typeof query === "object")
|
|
747
|
+
{
|
|
748
|
+
var rowsErr = processRowsOption(query);
|
|
749
|
+
if(rowsErr) {
|
|
750
|
+
deferred ? deferred.reject(rowsErr) : ( cb && cb(rowsErr) );
|
|
751
|
+
return deferred ? deferred.promise : false;
|
|
752
|
+
}
|
|
753
|
+
sql = query.sql;
|
|
754
|
+
if(query.params) params = query.params;
|
|
755
|
+
}
|
|
756
|
+
else
|
|
757
|
+
{
|
|
758
|
+
sql = query;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
exports.debug && console.log(getElapsedTime(), "odbc.js:queryResult() => ", sql);
|
|
762
|
+
self.queue.push(function (next) {
|
|
763
|
+
//ODBCConnection.query() is the fastest-path querying mechanism.
|
|
764
|
+
if (!self.connected)
|
|
765
|
+
{
|
|
766
|
+
deferred ? deferred.reject(connError) : cb(connError);
|
|
767
|
+
return next();
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
if (params && params.length > 0)
|
|
771
|
+
{
|
|
772
|
+
if(Array.isArray(params))
|
|
773
|
+
{
|
|
774
|
+
var err = parseParams(params);
|
|
775
|
+
if(err) deferred ? deferred.reject(err) : ( cb && cb(err) );
|
|
776
|
+
}
|
|
777
|
+
if(typeof query === 'object')
|
|
778
|
+
{
|
|
779
|
+
query.params = params;
|
|
780
|
+
self.conn.query(query, cbQuery);
|
|
781
|
+
}
|
|
782
|
+
else
|
|
783
|
+
self.conn.query(sql, params, cbQuery);
|
|
784
|
+
}
|
|
785
|
+
else
|
|
786
|
+
{
|
|
787
|
+
self.conn.query(sql, cbQuery);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
function cbQuery (err, result, outparams)
|
|
791
|
+
{
|
|
792
|
+
if (err)
|
|
793
|
+
{
|
|
794
|
+
self.checkConnectionError(err);
|
|
795
|
+
deferred ? deferred.reject(err) : ( cb && cb(err, null, outparams) );
|
|
796
|
+
return next();
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
if (result && typeof(result) === 'object') {
|
|
800
|
+
if (self.fetchMode)
|
|
801
|
+
{
|
|
802
|
+
result.fetchMode = self.fetchMode;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
else if( result ) // noResults = true is passed by application.
|
|
806
|
+
{
|
|
807
|
+
outparams = result;
|
|
808
|
+
result = null;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
!cb ? deferred.resolve([result, outparams]) : cb(err, result, outparams);
|
|
812
|
+
|
|
813
|
+
return next();
|
|
814
|
+
} // function cbQuery
|
|
815
|
+
}); //self.queue.push
|
|
816
|
+
return deferred ? deferred.promise : false;
|
|
817
|
+
}; // Database.queryResult
|
|
818
|
+
|
|
819
|
+
Database.prototype.queryResultSync = function (query, params)
|
|
820
|
+
{
|
|
821
|
+
var self = this, sql, outparams;
|
|
822
|
+
var result; // Must get closed by caller for success case.
|
|
823
|
+
|
|
824
|
+
if (!self.connected)
|
|
825
|
+
{
|
|
826
|
+
throw ({ message : "Connection not open."});
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
if(typeof query === "object")
|
|
830
|
+
{
|
|
831
|
+
var rowsErr = processRowsOption(query);
|
|
832
|
+
if(rowsErr) return rowsErr;
|
|
833
|
+
sql = query.sql;
|
|
834
|
+
if(query.params) params = query.params;
|
|
835
|
+
}
|
|
836
|
+
else
|
|
837
|
+
{
|
|
838
|
+
sql = query;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
exports.debug && console.log(getElapsedTime(), "odbc.js:queryResultSync() => ", sql);
|
|
842
|
+
try {
|
|
843
|
+
if (params)
|
|
844
|
+
{
|
|
845
|
+
if(Array.isArray(params))
|
|
846
|
+
{
|
|
847
|
+
var err = parseParams(params);
|
|
848
|
+
if(err) return err;
|
|
849
|
+
}
|
|
850
|
+
if(typeof query === 'object')
|
|
851
|
+
{
|
|
852
|
+
query.params = params;
|
|
853
|
+
result = self.conn.querySync(query);
|
|
854
|
+
}
|
|
855
|
+
else
|
|
856
|
+
{
|
|
857
|
+
result = self.conn.querySync(sql, params);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
else
|
|
861
|
+
{
|
|
862
|
+
result = self.conn.querySync(sql); // Always returns [stmt, outparms]
|
|
863
|
+
}
|
|
864
|
+
} catch (e)
|
|
865
|
+
{
|
|
866
|
+
self.checkConnectionError(e);
|
|
867
|
+
throw e;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
if(Array.isArray(result)) // Its a CALL stmt with OUT params.
|
|
871
|
+
{
|
|
872
|
+
if(result[1]) {
|
|
873
|
+
outparams = result[1]; // INOUT and OUTPUT param values for SP.
|
|
874
|
+
}
|
|
875
|
+
result = result[0];
|
|
876
|
+
}
|
|
877
|
+
if (result && typeof(result) === 'object' && self.fetchMode)
|
|
878
|
+
{
|
|
879
|
+
result.fetchMode = self.fetchMode;
|
|
880
|
+
}
|
|
881
|
+
if( outparams ) return [result, outparams];
|
|
882
|
+
else return result;
|
|
883
|
+
}; // Database.queryResultSync
|
|
884
|
+
|
|
885
|
+
Database.prototype.querySync = function (query, params)
|
|
886
|
+
{
|
|
887
|
+
var self = this, result, sql, outparams = null;
|
|
888
|
+
|
|
889
|
+
if (!self.connected)
|
|
890
|
+
{
|
|
891
|
+
throw ({ message : "Connection not open."});
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
if(typeof query === "object")
|
|
895
|
+
{
|
|
896
|
+
var rowsErr = processRowsOption(query);
|
|
897
|
+
if(rowsErr) return rowsErr;
|
|
898
|
+
sql = query.sql;
|
|
899
|
+
if(query.params) params = query.params;
|
|
900
|
+
}
|
|
901
|
+
else
|
|
902
|
+
{
|
|
903
|
+
sql = query;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
exports.debug && console.log(getElapsedTime(), "odbc.js:querySync() => ", sql);
|
|
907
|
+
try {
|
|
908
|
+
if (params)
|
|
909
|
+
{
|
|
910
|
+
if(Array.isArray(params))
|
|
911
|
+
{
|
|
912
|
+
var err = parseParams(params);
|
|
913
|
+
if(err) return err;
|
|
914
|
+
if(logParams) {
|
|
915
|
+
console.log("%s odbc.js:querySync() params = ", getElapsedTime(), params);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
if(typeof query === 'object')
|
|
919
|
+
{
|
|
920
|
+
query.params = params;
|
|
921
|
+
result = self.conn.querySync(query);
|
|
922
|
+
}
|
|
923
|
+
else
|
|
924
|
+
{
|
|
925
|
+
result = self.conn.querySync(sql, params);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
else
|
|
929
|
+
{
|
|
930
|
+
result = self.conn.querySync(query);
|
|
931
|
+
}
|
|
932
|
+
} catch (e)
|
|
933
|
+
{
|
|
934
|
+
self.checkConnectionError(e);
|
|
935
|
+
return e;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
if(Array.isArray(result))
|
|
939
|
+
{
|
|
940
|
+
if(result[1]) {
|
|
941
|
+
outparams = result[1]; // INOUT and OUT param values for SP.
|
|
942
|
+
}
|
|
943
|
+
result = result[0];
|
|
944
|
+
}
|
|
945
|
+
if(!result) return outparams; // For noResults.
|
|
946
|
+
|
|
947
|
+
// Processing for resultset.
|
|
948
|
+
var data, resultset = [], moreResults = true, moreResultsError = null;
|
|
949
|
+
var nullresult = true;
|
|
950
|
+
|
|
951
|
+
if(outparams) {
|
|
952
|
+
resultset = outparams;
|
|
953
|
+
nullresult = false;
|
|
954
|
+
}
|
|
955
|
+
if (self.fetchMode)
|
|
956
|
+
{
|
|
957
|
+
result.fetchMode = self.fetchMode;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
while(moreResults)
|
|
961
|
+
{
|
|
962
|
+
data = result.fetchAllSync();
|
|
963
|
+
if(!data.length) {
|
|
964
|
+
moreResults = false;
|
|
965
|
+
break;
|
|
966
|
+
}
|
|
967
|
+
try
|
|
968
|
+
{
|
|
969
|
+
moreResults = result.moreResultsSync();
|
|
970
|
+
}
|
|
971
|
+
catch (e)
|
|
972
|
+
{
|
|
973
|
+
moreResultsError = e;
|
|
974
|
+
moreResults = false;
|
|
975
|
+
break;
|
|
976
|
+
}
|
|
977
|
+
if(data.length) {
|
|
978
|
+
if(nullresult && !moreResults) resultset = data;
|
|
979
|
+
else resultset.push(data);
|
|
980
|
+
nullresult = false;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
result.closeSync();
|
|
984
|
+
|
|
985
|
+
if(moreResultsError) {
|
|
986
|
+
self.checkConnectionError(moreResultsError);
|
|
987
|
+
return moreResultsError;
|
|
988
|
+
}
|
|
989
|
+
if(nullresult) return [];
|
|
990
|
+
|
|
991
|
+
return resultset;
|
|
992
|
+
}; // Database.querySync
|
|
993
|
+
|
|
994
|
+
Database.prototype.executeFile = function (inputfile, delimiter, outputfile, cb) {
|
|
995
|
+
var fs = require('fs-extra');
|
|
996
|
+
var self = this, deferred, sql;
|
|
997
|
+
|
|
998
|
+
if (typeof (delimiter) === 'function') {
|
|
999
|
+
cb = delimiter;
|
|
1000
|
+
delimiter = ';'
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
if (typeof (outputfile) === 'function') {
|
|
1004
|
+
cb = outputfile;
|
|
1005
|
+
outputfile = undefined;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
//support for promises
|
|
1009
|
+
if (!cb) {
|
|
1010
|
+
deferred = createDeferred();
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
if (typeof inputfile !== "string") {
|
|
1014
|
+
sql = inputfile.sql;
|
|
1015
|
+
if (inputfile.delimiter) delimiter = inputfile.delimiter;
|
|
1016
|
+
if (inputfile.outputfile) outputfile = inputfile.outputfile;
|
|
1017
|
+
}
|
|
1018
|
+
else {
|
|
1019
|
+
sql = inputfile;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
if (!self.connected) {
|
|
1023
|
+
deferred ? deferred.reject(connError) : cb(connError);
|
|
1024
|
+
}
|
|
1025
|
+
fs.readFile(sql, function (err, sql) {
|
|
1026
|
+
if (err) {
|
|
1027
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
1028
|
+
}
|
|
1029
|
+
else {
|
|
1030
|
+
var query = sql.toString();
|
|
1031
|
+
var myarray = query.split(delimiter);
|
|
1032
|
+
var res = "";
|
|
1033
|
+
if (outputfile !== undefined) {
|
|
1034
|
+
if (fs.existsSync(outputfile)) {
|
|
1035
|
+
fs.unlinkSync(outputfile)
|
|
1036
|
+
}
|
|
1037
|
+
else {
|
|
1038
|
+
fs.ensureFileSync(outputfile)
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
for (var i = 0; i < myarray.length; i++) {
|
|
1042
|
+
query = (myarray[i]).trim();
|
|
1043
|
+
var result = [];
|
|
1044
|
+
if(query) {
|
|
1045
|
+
result = self.querySync(query);
|
|
1046
|
+
if (!Array.isArray(result)) {
|
|
1047
|
+
if (outputfile === undefined) {
|
|
1048
|
+
deferred ? deferred.reject(result) : cb(result);
|
|
1049
|
+
}
|
|
1050
|
+
else {
|
|
1051
|
+
fs.appendFileSync(outputfile, result);
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
if (result.length > 0) {
|
|
1055
|
+
result = JSON.stringify(result);
|
|
1056
|
+
if (outputfile === undefined) {
|
|
1057
|
+
res += result + delimiter;
|
|
1058
|
+
}
|
|
1059
|
+
else {
|
|
1060
|
+
fs.appendFileSync(outputfile, result + delimiter);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
deferred ? deferred.resolve(res) : cb(err, res);
|
|
1066
|
+
}
|
|
1067
|
+
});
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1070
|
+
Database.prototype.executeFileSync = function (inputfile, delimiter, outputfile)
|
|
1071
|
+
{
|
|
1072
|
+
var fs = require('fs-extra');
|
|
1073
|
+
var self = this, sql = null;
|
|
1074
|
+
if (!self.connected)
|
|
1075
|
+
{
|
|
1076
|
+
throw ({ message: "Connection not open." });
|
|
1077
|
+
}
|
|
1078
|
+
if (typeof inputfile !== "string")
|
|
1079
|
+
{
|
|
1080
|
+
sql = inputfile.sql;
|
|
1081
|
+
if (inputfile.delimiter) delimiter = inputfile.delimiter;
|
|
1082
|
+
if (inputfile.outputfile) outputfile = inputfile.outputfile;
|
|
1083
|
+
}
|
|
1084
|
+
else
|
|
1085
|
+
{
|
|
1086
|
+
sql = inputfile;
|
|
1087
|
+
}
|
|
1088
|
+
if (!fs.existsSync(sql))
|
|
1089
|
+
{
|
|
1090
|
+
return Error("[node-ibm_db] Input file " + sql + " does not exists");
|
|
1091
|
+
}
|
|
1092
|
+
if (outputfile !== undefined)
|
|
1093
|
+
{
|
|
1094
|
+
if (fs.existsSync(outputfile))
|
|
1095
|
+
{
|
|
1096
|
+
fs.unlinkSync(outputfile)
|
|
1097
|
+
}
|
|
1098
|
+
else
|
|
1099
|
+
{
|
|
1100
|
+
fs.ensureFileSync(outputfile)
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
if (delimiter === undefined)
|
|
1104
|
+
{
|
|
1105
|
+
delimiter = ';'
|
|
1106
|
+
}
|
|
1107
|
+
var query = fs.readFileSync(sql, 'utf8')
|
|
1108
|
+
var myarray = query.split(delimiter);
|
|
1109
|
+
var res = "";
|
|
1110
|
+
for (var i = 0; i < myarray.length; i++)
|
|
1111
|
+
{
|
|
1112
|
+
var result = self.querySync(myarray[i]);
|
|
1113
|
+
if (!Array.isArray(result))
|
|
1114
|
+
{
|
|
1115
|
+
return result;
|
|
1116
|
+
}
|
|
1117
|
+
if (result.length > 0)
|
|
1118
|
+
{
|
|
1119
|
+
result = JSON.stringify(result)
|
|
1120
|
+
if (outputfile === undefined)
|
|
1121
|
+
{
|
|
1122
|
+
res += result + delimiter
|
|
1123
|
+
}
|
|
1124
|
+
else
|
|
1125
|
+
{
|
|
1126
|
+
fs.appendFileSync(outputfile, result + delimiter)
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
return res;
|
|
1131
|
+
};
|
|
1132
|
+
|
|
1133
|
+
Database.prototype.queryStream = function queryStream(sql, params)
|
|
1134
|
+
{
|
|
1135
|
+
var self = this;
|
|
1136
|
+
var stream = new Readable({ objectMode: true });
|
|
1137
|
+
var results;
|
|
1138
|
+
stream._read = function()
|
|
1139
|
+
{
|
|
1140
|
+
// after the first internal call to _read, the 'results' should be set
|
|
1141
|
+
// and the stream can continue fetching the results
|
|
1142
|
+
if (results) return self.fetchStreamingResults(results, stream);
|
|
1143
|
+
|
|
1144
|
+
// in the first call to _read the stream starts to emit data once we've
|
|
1145
|
+
// queried for results
|
|
1146
|
+
return self.queryResult(sql, params, function (err, result)
|
|
1147
|
+
{
|
|
1148
|
+
if (err)
|
|
1149
|
+
{
|
|
1150
|
+
return process.nextTick(function () { stream.emit('error', err); });
|
|
1151
|
+
}
|
|
1152
|
+
results = result;
|
|
1153
|
+
return self.fetchStreamingResults(results, stream);
|
|
1154
|
+
});
|
|
1155
|
+
};
|
|
1156
|
+
return stream;
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1159
|
+
Database.prototype.fetchStreamingResults = function(results, stream)
|
|
1160
|
+
{
|
|
1161
|
+
var self = this;
|
|
1162
|
+
return results.fetch(function (err, data)
|
|
1163
|
+
{
|
|
1164
|
+
if (err)
|
|
1165
|
+
{
|
|
1166
|
+
return process.nextTick(function () { stream.emit('error', err); });
|
|
1167
|
+
}
|
|
1168
|
+
// when no more data returns, return push null to indicate the end of stream
|
|
1169
|
+
if (!data)
|
|
1170
|
+
{
|
|
1171
|
+
results.closeSync(); // Close stmt handle.
|
|
1172
|
+
stream.push(null);
|
|
1173
|
+
}
|
|
1174
|
+
else {
|
|
1175
|
+
stream.push(data);
|
|
1176
|
+
}
|
|
1177
|
+
});
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1180
|
+
Database.prototype.beginTransaction = function (cb)
|
|
1181
|
+
{
|
|
1182
|
+
var self = this
|
|
1183
|
+
, deferred = null
|
|
1184
|
+
, onBeginTransaction;
|
|
1185
|
+
if(!cb)
|
|
1186
|
+
{
|
|
1187
|
+
deferred = createDeferred();
|
|
1188
|
+
}
|
|
1189
|
+
onBeginTransaction = function(err)
|
|
1190
|
+
{
|
|
1191
|
+
if(err)
|
|
1192
|
+
{
|
|
1193
|
+
self.checkConnectionError(err);
|
|
1194
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
1195
|
+
}
|
|
1196
|
+
else
|
|
1197
|
+
{
|
|
1198
|
+
deferred ? deferred.resolve(true) : cb(null);
|
|
1199
|
+
}
|
|
1200
|
+
};
|
|
1201
|
+
|
|
1202
|
+
self.conn.beginTransaction(onBeginTransaction);
|
|
1203
|
+
self.conn.inTransaction = true;
|
|
1204
|
+
|
|
1205
|
+
return deferred ? deferred.promise : self;
|
|
1206
|
+
};
|
|
1207
|
+
|
|
1208
|
+
Database.prototype.endTransaction = function (rollback, cb)
|
|
1209
|
+
{
|
|
1210
|
+
var self = this, deferred = null;
|
|
1211
|
+
|
|
1212
|
+
if(!cb)
|
|
1213
|
+
{
|
|
1214
|
+
deferred = createDeferred();
|
|
1215
|
+
}
|
|
1216
|
+
var onEndTransaction = function(err)
|
|
1217
|
+
{
|
|
1218
|
+
if(err)
|
|
1219
|
+
{
|
|
1220
|
+
self.checkConnectionError(err);
|
|
1221
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
1222
|
+
}
|
|
1223
|
+
else
|
|
1224
|
+
{
|
|
1225
|
+
deferred ? deferred.resolve(true) : cb(null);
|
|
1226
|
+
}
|
|
1227
|
+
};
|
|
1228
|
+
self.conn.endTransaction(rollback, onEndTransaction);
|
|
1229
|
+
self.conn.inTransaction = false;
|
|
1230
|
+
|
|
1231
|
+
return deferred ? deferred.promise : self;
|
|
1232
|
+
};
|
|
1233
|
+
|
|
1234
|
+
Database.prototype.commitTransaction = function (cb)
|
|
1235
|
+
{
|
|
1236
|
+
var self = this;
|
|
1237
|
+
//don't rollback
|
|
1238
|
+
return self.endTransaction(false, cb);
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
Database.prototype.rollbackTransaction = function (cb)
|
|
1242
|
+
{
|
|
1243
|
+
var self = this;
|
|
1244
|
+
return self.endTransaction(true, cb); //rollback
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
Database.prototype.beginTransactionSync = function ()
|
|
1248
|
+
{
|
|
1249
|
+
var self = this;
|
|
1250
|
+
|
|
1251
|
+
try {
|
|
1252
|
+
self.conn.beginTransactionSync();
|
|
1253
|
+
} catch (e) {
|
|
1254
|
+
self.checkConnectionError(e);
|
|
1255
|
+
throw e;
|
|
1256
|
+
}
|
|
1257
|
+
self.conn.inTransaction = true;
|
|
1258
|
+
|
|
1259
|
+
return self;
|
|
1260
|
+
};
|
|
1261
|
+
|
|
1262
|
+
Database.prototype.endTransactionSync = function (rollback)
|
|
1263
|
+
{
|
|
1264
|
+
var self = this;
|
|
1265
|
+
|
|
1266
|
+
self.conn.inTransaction = false;
|
|
1267
|
+
try {
|
|
1268
|
+
self.conn.endTransactionSync(rollback);
|
|
1269
|
+
} catch (e) {
|
|
1270
|
+
self.checkConnectionError(e);
|
|
1271
|
+
throw e;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
return self;
|
|
1275
|
+
};
|
|
1276
|
+
|
|
1277
|
+
Database.prototype.commitTransactionSync = function ()
|
|
1278
|
+
{
|
|
1279
|
+
var self = this;
|
|
1280
|
+
return self.endTransactionSync(false); //don't rollback
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1283
|
+
Database.prototype.rollbackTransactionSync = function ()
|
|
1284
|
+
{
|
|
1285
|
+
var self = this;
|
|
1286
|
+
return self.endTransactionSync(true); //rollback
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
Database.prototype.columns = async function(catalog, schema, table, column, callback)
|
|
1290
|
+
{
|
|
1291
|
+
var self = this, deferred;
|
|
1292
|
+
var error = {
|
|
1293
|
+
error : "[node-ibm_db] Missing Arguments",
|
|
1294
|
+
message : "The object you passed must contain four arguments: " +
|
|
1295
|
+
"catalog, schema, table and column. " +
|
|
1296
|
+
"This is required for the columns method to work."
|
|
1297
|
+
};
|
|
1298
|
+
if (!self.queue) self.queue = [];
|
|
1299
|
+
|
|
1300
|
+
callback = callback || arguments[arguments.length - 1];
|
|
1301
|
+
if(typeof(callback) !== 'function') {
|
|
1302
|
+
callback = null;
|
|
1303
|
+
deferred = createDeferred();
|
|
1304
|
+
if( arguments.length != 4 ) {
|
|
1305
|
+
deferred.reject(error);
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
else if( arguments.length != 5 ) {
|
|
1309
|
+
callback(error, [], false);
|
|
1310
|
+
}
|
|
1311
|
+
self.queue.push(function (next)
|
|
1312
|
+
{
|
|
1313
|
+
self.conn.columns(catalog, schema, table, column, function (err, result)
|
|
1314
|
+
{
|
|
1315
|
+
if (err) {
|
|
1316
|
+
self.checkConnectionError(err);
|
|
1317
|
+
return deferred ? deferred.reject(err) : callback(err, [], false);
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
result._fetchAll(function (err, data)
|
|
1321
|
+
{
|
|
1322
|
+
result.closeSync();
|
|
1323
|
+
self.checkConnectionError(err);
|
|
1324
|
+
deferred ? deferred.resolve(data) : callback(err, data);
|
|
1325
|
+
return next();
|
|
1326
|
+
});
|
|
1327
|
+
});
|
|
1328
|
+
});
|
|
1329
|
+
if(deferred) return deferred.promise;
|
|
1330
|
+
};
|
|
1331
|
+
|
|
1332
|
+
Database.prototype.tables = function(catalog, schema, table, type, callback)
|
|
1333
|
+
{
|
|
1334
|
+
var self = this, deferred;
|
|
1335
|
+
var error = {
|
|
1336
|
+
error : "[node-ibm_db] Missing Arguments",
|
|
1337
|
+
message : "The object you passed must contain four arguments: " +
|
|
1338
|
+
"catalog, schema, table and type. " +
|
|
1339
|
+
"This is required for the tables method to work."
|
|
1340
|
+
};
|
|
1341
|
+
if (!self.queue) self.queue = [];
|
|
1342
|
+
|
|
1343
|
+
callback = callback || arguments[arguments.length - 1];
|
|
1344
|
+
if(typeof(callback) !== 'function') {
|
|
1345
|
+
callback = null;
|
|
1346
|
+
deferred = createDeferred();
|
|
1347
|
+
if( arguments.length != 4 ) {
|
|
1348
|
+
deferred.reject(error);
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
else if( arguments.length != 5 ) {
|
|
1352
|
+
callback(error, [], false);
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
self.queue.push(function (next)
|
|
1356
|
+
{
|
|
1357
|
+
self.conn.tables(catalog, schema, table, type, function (err, result)
|
|
1358
|
+
{
|
|
1359
|
+
if (err) {
|
|
1360
|
+
self.checkConnectionError(err);
|
|
1361
|
+
return deferred ? deferred.reject(err) : callback(err, [], false);
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
result._fetchAll(function (err, data)
|
|
1365
|
+
{
|
|
1366
|
+
result.closeSync();
|
|
1367
|
+
self.checkConnectionError(err);
|
|
1368
|
+
deferred ? deferred.resolve(data) : callback(err, data);
|
|
1369
|
+
return next();
|
|
1370
|
+
});
|
|
1371
|
+
});
|
|
1372
|
+
});
|
|
1373
|
+
if(deferred) return deferred.promise;
|
|
1374
|
+
};
|
|
1375
|
+
|
|
1376
|
+
Database.prototype.describe = async function(obj, callback)
|
|
1377
|
+
{
|
|
1378
|
+
var self = this, deferred;
|
|
1379
|
+
var error = {
|
|
1380
|
+
error : "[node-ibm_db] Missing Arguments",
|
|
1381
|
+
message : "You must pass an object as argument 0 if you want " +
|
|
1382
|
+
"anything productive to happen in the describe method."
|
|
1383
|
+
};
|
|
1384
|
+
|
|
1385
|
+
if (typeof(callback) !== "function") {
|
|
1386
|
+
callback = null;
|
|
1387
|
+
}
|
|
1388
|
+
if(!callback) {
|
|
1389
|
+
deferred = createDeferred();
|
|
1390
|
+
}
|
|
1391
|
+
if (typeof(obj) !== "object") {
|
|
1392
|
+
deferred ? deferred.reject(error) : callback && callback(error, []);
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
if (!obj.database) {
|
|
1396
|
+
error = {
|
|
1397
|
+
error : "[node-ibmdb] Missing Arguments",
|
|
1398
|
+
message : "The object you passed did not contain a database " +
|
|
1399
|
+
"property. This is required for the describe method to work."
|
|
1400
|
+
};
|
|
1401
|
+
deferred ? deferred.reject(error) : callback && callback(error, []);
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
//set some defaults if they weren't passed
|
|
1405
|
+
obj.schema = obj.schema || "%";
|
|
1406
|
+
obj.type = obj.type || "TABLE";
|
|
1407
|
+
|
|
1408
|
+
if (obj.table && obj.column)
|
|
1409
|
+
{
|
|
1410
|
+
//get the column details
|
|
1411
|
+
if(callback)
|
|
1412
|
+
self.columns(obj.database, obj.schema, obj.table, obj.column, callback);
|
|
1413
|
+
else
|
|
1414
|
+
return await self.columns(obj.database, obj.schema, obj.table, obj.column);
|
|
1415
|
+
}
|
|
1416
|
+
else if (obj.table)
|
|
1417
|
+
{
|
|
1418
|
+
//get the columns in the table
|
|
1419
|
+
if(callback)
|
|
1420
|
+
self.columns(obj.database, obj.schema, obj.table, "%", callback);
|
|
1421
|
+
else
|
|
1422
|
+
return await self.columns(obj.database, obj.schema, obj.table, "%")
|
|
1423
|
+
.catch((e)=> { deferred.reject(e); });
|
|
1424
|
+
}
|
|
1425
|
+
else
|
|
1426
|
+
{
|
|
1427
|
+
//get the tables in the database
|
|
1428
|
+
if(callback)
|
|
1429
|
+
self.tables(obj.database, obj.schema, null, obj.type, callback);
|
|
1430
|
+
else
|
|
1431
|
+
return await self.tables(obj.database, obj.schema, null, obj.type);
|
|
1432
|
+
}
|
|
1433
|
+
}; //Database.describe
|
|
1434
|
+
|
|
1435
|
+
Database.prototype.prepare = function (sql, cb)
|
|
1436
|
+
{
|
|
1437
|
+
var self = this, deferred;
|
|
1438
|
+
|
|
1439
|
+
if(!cb)
|
|
1440
|
+
{
|
|
1441
|
+
deferred = createDeferred();
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
self.conn.createStatement(function (err, stmt)
|
|
1445
|
+
{
|
|
1446
|
+
if(err)
|
|
1447
|
+
{
|
|
1448
|
+
self.checkConnectionError(err);
|
|
1449
|
+
if(cb)
|
|
1450
|
+
{
|
|
1451
|
+
return cb(err);
|
|
1452
|
+
} else
|
|
1453
|
+
{
|
|
1454
|
+
deferred.reject(err);
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
stmt.queue = new SimpleQueue();
|
|
1459
|
+
stmt.db = self; // We need a reference to db to check for connection errors
|
|
1460
|
+
|
|
1461
|
+
stmt.prepare(sql, function (err)
|
|
1462
|
+
{
|
|
1463
|
+
if (err)
|
|
1464
|
+
{
|
|
1465
|
+
self.checkConnectionError(err);
|
|
1466
|
+
if(cb)
|
|
1467
|
+
{
|
|
1468
|
+
return cb(err);
|
|
1469
|
+
} else
|
|
1470
|
+
{
|
|
1471
|
+
deferred.reject(err)
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
deferred ? deferred.resolve(stmt) : cb(null, stmt);
|
|
1476
|
+
});
|
|
1477
|
+
});
|
|
1478
|
+
return deferred ? deferred.promise : null;
|
|
1479
|
+
};
|
|
1480
|
+
|
|
1481
|
+
Database.prototype.prepareSync = function (sql)
|
|
1482
|
+
{
|
|
1483
|
+
var self = this;
|
|
1484
|
+
var stmt = {};
|
|
1485
|
+
|
|
1486
|
+
try {
|
|
1487
|
+
stmt = self.conn.createStatementSync();
|
|
1488
|
+
} catch (e) {
|
|
1489
|
+
self.checkConnectionError(e);
|
|
1490
|
+
throw e;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
stmt.queue = new SimpleQueue();
|
|
1494
|
+
stmt.db = self; // We need a reference to db to check for connection errors
|
|
1495
|
+
|
|
1496
|
+
try {
|
|
1497
|
+
stmt.prepareSync(sql);
|
|
1498
|
+
} catch (e) {
|
|
1499
|
+
self.checkConnectionError(e);
|
|
1500
|
+
throw e;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
return stmt;
|
|
1504
|
+
};
|
|
1505
|
+
|
|
1506
|
+
Database.prototype.setIsolationLevel = function(isolationLevel)
|
|
1507
|
+
{
|
|
1508
|
+
var self = this;
|
|
1509
|
+
try {
|
|
1510
|
+
self.conn.setIsolationLevel(isolationLevel);
|
|
1511
|
+
} catch (e) {
|
|
1512
|
+
self.checkConnectionError(e);
|
|
1513
|
+
throw e;
|
|
1514
|
+
}
|
|
1515
|
+
return true;
|
|
1516
|
+
};
|
|
1517
|
+
|
|
1518
|
+
const MAXINFO_LEN = 256; // odbc.C CLI_MAXINFO_LEN
|
|
1519
|
+
Database.prototype.getInfoSync = function(infoType, infoLen)
|
|
1520
|
+
{
|
|
1521
|
+
// infoType - mandatory
|
|
1522
|
+
// infoLen - optional
|
|
1523
|
+
|
|
1524
|
+
var self = this;
|
|
1525
|
+
if (!self.connected)
|
|
1526
|
+
{
|
|
1527
|
+
throw ({ message : "Connection not open."});
|
|
1528
|
+
}
|
|
1529
|
+
if (Number.isInteger(infoType) === false) {
|
|
1530
|
+
return { message : "Invalid infoType requested."};
|
|
1531
|
+
}
|
|
1532
|
+
if (Number.isInteger(infoLen) === false) {
|
|
1533
|
+
infoLen = MAXINFO_LEN;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
try {
|
|
1537
|
+
return self.conn.getInfoSync(infoType, infoLen);
|
|
1538
|
+
} catch (e) {
|
|
1539
|
+
self.checkConnectionError(e);
|
|
1540
|
+
throw e;
|
|
1541
|
+
}
|
|
1542
|
+
} //getInfoSync
|
|
1543
|
+
|
|
1544
|
+
Database.prototype.getInfo = function (infoType, infoLen, cb)
|
|
1545
|
+
{
|
|
1546
|
+
// infoType - mandatory
|
|
1547
|
+
// infoLen - optional
|
|
1548
|
+
// cb - optional. If not cb, then return promise
|
|
1549
|
+
|
|
1550
|
+
var self = this, deferred;
|
|
1551
|
+
|
|
1552
|
+
//support for promises
|
|
1553
|
+
if (!cb && typeof infoLen !== 'function')
|
|
1554
|
+
{
|
|
1555
|
+
deferred = createDeferred();
|
|
1556
|
+
}
|
|
1557
|
+
// For (infoType, cb)
|
|
1558
|
+
if (typeof(infoLen) === 'function')
|
|
1559
|
+
{
|
|
1560
|
+
cb = infoLen;
|
|
1561
|
+
infoLen = MAXINFO_LEN;
|
|
1562
|
+
}
|
|
1563
|
+
if (Number.isInteger(infoLen) === false) {
|
|
1564
|
+
infoLen = MAXINFO_LEN;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
self.queue.push(function (next)
|
|
1568
|
+
{
|
|
1569
|
+
exports.debug && console.log(getElapsedTime(), "odbc.js: infoType => ", infoType);
|
|
1570
|
+
if (!self.connected) {
|
|
1571
|
+
deferred ? deferred.reject(connError) : cb(connError);
|
|
1572
|
+
return next();
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
if (Number.isInteger(infoType) === false) {
|
|
1576
|
+
var err = { message : "Invalid infoType used, " + infoType};
|
|
1577
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
1578
|
+
return next();
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
self.conn.getInfo(infoType, infoLen, function (err, value)
|
|
1582
|
+
{
|
|
1583
|
+
if (err)
|
|
1584
|
+
{
|
|
1585
|
+
self.checkConnectionError(err);
|
|
1586
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
1587
|
+
return next();
|
|
1588
|
+
}
|
|
1589
|
+
deferred ? deferred.resolve(value) : cb(null, value);
|
|
1590
|
+
return next();
|
|
1591
|
+
});
|
|
1592
|
+
});
|
|
1593
|
+
if(deferred) return deferred.promise;
|
|
1594
|
+
} //getInfo
|
|
1595
|
+
|
|
1596
|
+
Database.prototype.getTypeInfoSync = function(dataType)
|
|
1597
|
+
{
|
|
1598
|
+
// infoType - mandatory
|
|
1599
|
+
|
|
1600
|
+
var self = this;
|
|
1601
|
+
var stmt = 0;
|
|
1602
|
+
var data = [];
|
|
1603
|
+
if (!self.connected)
|
|
1604
|
+
{
|
|
1605
|
+
throw ({ message : "Connection not open."});
|
|
1606
|
+
}
|
|
1607
|
+
if (Number.isInteger(dataType) === false) {
|
|
1608
|
+
throw { message : "Invalid dataType used, " + dataType};
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
try {
|
|
1612
|
+
stmt = self.conn.getTypeInfoSync(dataType);
|
|
1613
|
+
data = stmt.fetchAllSync();
|
|
1614
|
+
stmt.closeSync();
|
|
1615
|
+
return data;
|
|
1616
|
+
} catch (e) {
|
|
1617
|
+
self.checkConnectionError(e);
|
|
1618
|
+
throw e;
|
|
1619
|
+
}
|
|
1620
|
+
} //getTypeInfoSync
|
|
1621
|
+
|
|
1622
|
+
Database.prototype.getTypeInfo = function (dataType, cb)
|
|
1623
|
+
{
|
|
1624
|
+
// dataType - mandatory
|
|
1625
|
+
// cb - optional. If not cb, then return promise
|
|
1626
|
+
|
|
1627
|
+
var self = this, deferred;
|
|
1628
|
+
|
|
1629
|
+
if (typeof dataType === 'function')
|
|
1630
|
+
{
|
|
1631
|
+
cb = dataType;
|
|
1632
|
+
}
|
|
1633
|
+
//support for promises
|
|
1634
|
+
if (!cb && typeof dataType !== 'function')
|
|
1635
|
+
{
|
|
1636
|
+
deferred = createDeferred();
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
self.queue.push(function (next)
|
|
1640
|
+
{
|
|
1641
|
+
exports.debug && console.log(getElapsedTime(), "odbc.js: dataType => ", dataType);
|
|
1642
|
+
if (!self.connected) {
|
|
1643
|
+
deferred ? deferred.reject(connError) : cb(connError);
|
|
1644
|
+
return next();
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
if (Number.isInteger(dataType) === false) {
|
|
1648
|
+
var err = { message : "Invalid dataType." };
|
|
1649
|
+
if (typeof dataType === 'function') {
|
|
1650
|
+
err = { message : "Missing dataType." };
|
|
1651
|
+
}
|
|
1652
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
1653
|
+
return next();
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
self.conn.getTypeInfo(dataType, function (err, result)
|
|
1657
|
+
{
|
|
1658
|
+
if (err) {
|
|
1659
|
+
self.checkConnectionError(err);
|
|
1660
|
+
deferred ? deferred.reject(err) : cb(err, false);
|
|
1661
|
+
return next();
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
result.fetchAll(function (err, data)
|
|
1665
|
+
{
|
|
1666
|
+
result.closeSync();
|
|
1667
|
+
if(err) {
|
|
1668
|
+
self.checkConnectionError(err);
|
|
1669
|
+
deferred ? deferred.reject(err) : cb(err, data);
|
|
1670
|
+
} else {
|
|
1671
|
+
deferred ? deferred.resolve(data) : cb(err, data);
|
|
1672
|
+
}
|
|
1673
|
+
return next();
|
|
1674
|
+
});
|
|
1675
|
+
});
|
|
1676
|
+
});
|
|
1677
|
+
if(deferred) return deferred.promise;
|
|
1678
|
+
} //getTypeInfo
|
|
1679
|
+
|
|
1680
|
+
Database.prototype.getFunctionsSync = function(functionId)
|
|
1681
|
+
{
|
|
1682
|
+
// functionId - mandatory
|
|
1683
|
+
|
|
1684
|
+
var self = this;
|
|
1685
|
+
var fExists = 0;
|
|
1686
|
+
if (!self.connected)
|
|
1687
|
+
{
|
|
1688
|
+
throw ({ message : "Connection not open."});
|
|
1689
|
+
}
|
|
1690
|
+
if (Number.isInteger(functionId) === false) {
|
|
1691
|
+
return { message : "Invalid functionId."};
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
try {
|
|
1695
|
+
fExists = self.conn.getFunctionsSync(functionId);
|
|
1696
|
+
} catch (e) {
|
|
1697
|
+
self.checkConnectionError(e);
|
|
1698
|
+
throw e;
|
|
1699
|
+
}
|
|
1700
|
+
if(fExists)
|
|
1701
|
+
{
|
|
1702
|
+
if(functionId) return true;
|
|
1703
|
+
else
|
|
1704
|
+
{
|
|
1705
|
+
var functionMap = {};
|
|
1706
|
+
var i = 0;
|
|
1707
|
+
for ( i = 1; i < 100; i++ )
|
|
1708
|
+
{
|
|
1709
|
+
if(fExists[i])
|
|
1710
|
+
{
|
|
1711
|
+
functionMap[macro.functionids[i]] = true;
|
|
1712
|
+
}
|
|
1713
|
+
else
|
|
1714
|
+
{
|
|
1715
|
+
functionMap[i] = false;
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
return functionMap;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
else return false;
|
|
1722
|
+
} //getFunctionsSync
|
|
1723
|
+
|
|
1724
|
+
Database.prototype.getFunctions = function (functionId, cb)
|
|
1725
|
+
{
|
|
1726
|
+
// functionId - mandatory
|
|
1727
|
+
// cb - optional. If not cb, then return promise
|
|
1728
|
+
|
|
1729
|
+
var self = this, deferred;
|
|
1730
|
+
|
|
1731
|
+
if (typeof(functionId) === 'function')
|
|
1732
|
+
{
|
|
1733
|
+
cb = functionId;
|
|
1734
|
+
functionId = null;
|
|
1735
|
+
}
|
|
1736
|
+
//support for promises
|
|
1737
|
+
if (!cb)
|
|
1738
|
+
{
|
|
1739
|
+
deferred = createDeferred();
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
self.queue.push(function (next)
|
|
1743
|
+
{
|
|
1744
|
+
exports.debug && console.log(getElapsedTime(), "odbc.js: functionId => ", functionId);
|
|
1745
|
+
if (!self.connected) {
|
|
1746
|
+
deferred ? deferred.reject(connError) : cb(connError);
|
|
1747
|
+
return next();
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
if (Number.isInteger(functionId) === false) {
|
|
1751
|
+
var err = { message : "Invalid functionId = " + functionId};
|
|
1752
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
1753
|
+
return next();
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
self.conn.getFunctions(functionId, function (err, value)
|
|
1757
|
+
{
|
|
1758
|
+
if (err)
|
|
1759
|
+
{
|
|
1760
|
+
self.checkConnectionError(err);
|
|
1761
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
1762
|
+
return next();
|
|
1763
|
+
}
|
|
1764
|
+
var result = false;
|
|
1765
|
+
if(value)
|
|
1766
|
+
{
|
|
1767
|
+
if(functionId) result = true;
|
|
1768
|
+
else
|
|
1769
|
+
{
|
|
1770
|
+
var functionMap = {};
|
|
1771
|
+
var i = 0;
|
|
1772
|
+
for ( i = 1; i < 100; i++ )
|
|
1773
|
+
{
|
|
1774
|
+
if(value[i])
|
|
1775
|
+
{
|
|
1776
|
+
functionMap[macro.functionids[i]] = true;
|
|
1777
|
+
}
|
|
1778
|
+
else
|
|
1779
|
+
{
|
|
1780
|
+
functionMap[i] = false;
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
result = functionMap;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
deferred ? deferred.resolve(result) : cb(null, result);
|
|
1787
|
+
return next();
|
|
1788
|
+
});
|
|
1789
|
+
});
|
|
1790
|
+
if(deferred) return deferred.promise;
|
|
1791
|
+
} //getFunctions
|
|
1792
|
+
|
|
1793
|
+
// Function to set connection level attributes
|
|
1794
|
+
Database.prototype.setAttr = function (attr, value, cb)
|
|
1795
|
+
{
|
|
1796
|
+
// attr, value - mandatory
|
|
1797
|
+
// cb - optional. If not cb, then return promise
|
|
1798
|
+
|
|
1799
|
+
var self = this, deferred;
|
|
1800
|
+
|
|
1801
|
+
//support for promises
|
|
1802
|
+
if (!cb)
|
|
1803
|
+
{
|
|
1804
|
+
deferred = createDeferred();
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
self.queue.push(function (next)
|
|
1808
|
+
{
|
|
1809
|
+
exports.debug && console.log(getElapsedTime(),
|
|
1810
|
+
"odbc.js:setAttr() Attribute = ", attr, ", Value = ", value);
|
|
1811
|
+
if (!self.connected) {
|
|
1812
|
+
deferred ? deferred.reject(connError) : cb(connError);
|
|
1813
|
+
return next();
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
if (Number.isInteger(attr) === false) {
|
|
1817
|
+
var connattr = macro.connAttributes[attr];
|
|
1818
|
+
if (Number.isInteger(connattr) === false) {
|
|
1819
|
+
var err = { message : "Invalid attr = " + attr};
|
|
1820
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
1821
|
+
return next();
|
|
1822
|
+
} else {
|
|
1823
|
+
attr = connattr;
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
self.conn.setAttr(attr, value, function (err)
|
|
1828
|
+
{
|
|
1829
|
+
if (err)
|
|
1830
|
+
{
|
|
1831
|
+
self.checkConnectionError(err);
|
|
1832
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
1833
|
+
return next();
|
|
1834
|
+
}
|
|
1835
|
+
deferred ? deferred.resolve(true) : cb(null, true);
|
|
1836
|
+
return next();
|
|
1837
|
+
});
|
|
1838
|
+
});
|
|
1839
|
+
if(deferred) return deferred.promise;
|
|
1840
|
+
} //setAttr
|
|
1841
|
+
|
|
1842
|
+
// Async Function to set connection level attributes
|
|
1843
|
+
Database.prototype.setAttrSync = function (attr, value)
|
|
1844
|
+
{
|
|
1845
|
+
// attr, value - mandatory
|
|
1846
|
+
var self = this;
|
|
1847
|
+
|
|
1848
|
+
exports.debug && console.log(getElapsedTime(),
|
|
1849
|
+
"odbc.js:setAttrSync() Attribute = ", attr, ", Value = ", value);
|
|
1850
|
+
|
|
1851
|
+
if (!self.connected) {
|
|
1852
|
+
return (connError);
|
|
1853
|
+
}
|
|
1854
|
+
if (Number.isInteger(attr) === false) {
|
|
1855
|
+
return { message : "Invalid Attribute."};
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
try {
|
|
1859
|
+
return self.conn.setAttrSync(attr, value);
|
|
1860
|
+
} catch (e) {
|
|
1861
|
+
self.checkConnectionError(e);
|
|
1862
|
+
return e;
|
|
1863
|
+
}
|
|
1864
|
+
}; // setAttrSync
|
|
1865
|
+
|
|
1866
|
+
//Proxy all of the ODBCStatement functions so that they are queued
|
|
1867
|
+
if( !odbc.ODBCStatement.prototype._execute ) { //issue #514
|
|
1868
|
+
odbc.ODBCStatement.prototype._execute = odbc.ODBCStatement.prototype.execute;
|
|
1869
|
+
odbc.ODBCStatement.prototype._executeSync = odbc.ODBCStatement.prototype.executeSync;
|
|
1870
|
+
odbc.ODBCStatement.prototype._executeDirect = odbc.ODBCStatement.prototype.executeDirect;
|
|
1871
|
+
odbc.ODBCStatement.prototype._executeDirectSync = odbc.ODBCStatement.prototype.executeDirectSync;
|
|
1872
|
+
odbc.ODBCStatement.prototype._executeNonQuery = odbc.ODBCStatement.prototype.executeNonQuery;
|
|
1873
|
+
odbc.ODBCStatement.prototype._executeNonQuerySync = odbc.ODBCStatement.prototype.executeNonQuerySync;
|
|
1874
|
+
odbc.ODBCStatement.prototype._prepare = odbc.ODBCStatement.prototype.prepare;
|
|
1875
|
+
odbc.ODBCStatement.prototype._bind = odbc.ODBCStatement.prototype.bind;
|
|
1876
|
+
odbc.ODBCStatement.prototype._bindSync = odbc.ODBCStatement.prototype.bindSync;
|
|
1877
|
+
odbc.ODBCStatement.prototype._setAttr = odbc.ODBCStatement.prototype.setAttr;
|
|
1878
|
+
odbc.ODBCStatement.prototype._setAttrSync = odbc.ODBCStatement.prototype.setAttrSync;
|
|
1879
|
+
odbc.ODBCStatement.prototype._close = odbc.ODBCStatement.prototype.close;
|
|
1880
|
+
|
|
1881
|
+
//Proxy all of the ODBCResult functions so that they are queued
|
|
1882
|
+
odbc.ODBCResult.prototype._fetch = odbc.ODBCResult.prototype.fetch;
|
|
1883
|
+
odbc.ODBCResult.prototype._fetchAll = odbc.ODBCResult.prototype.fetchAll;
|
|
1884
|
+
odbc.ODBCResult.prototype._fetchN = odbc.ODBCResult.prototype.fetchN;
|
|
1885
|
+
odbc.ODBCResult.prototype._getData = odbc.ODBCResult.prototype.getData;
|
|
1886
|
+
odbc.ODBCResult.prototype._close = odbc.ODBCResult.prototype.close;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
odbc.ODBCStatement.prototype.execute = function (params, cb)
|
|
1890
|
+
{
|
|
1891
|
+
var self = this, deferred;
|
|
1892
|
+
self.queue = self.queue || new SimpleQueue();
|
|
1893
|
+
|
|
1894
|
+
if (!cb) {
|
|
1895
|
+
if (typeof params === 'function') {
|
|
1896
|
+
cb = params;
|
|
1897
|
+
params = null;
|
|
1898
|
+
}
|
|
1899
|
+
else {
|
|
1900
|
+
deferred = createDeferred();
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
self.queue.push(function (next) {
|
|
1905
|
+
//If params were passed to this function, then bind them and
|
|
1906
|
+
//then execute.
|
|
1907
|
+
if (params)
|
|
1908
|
+
{
|
|
1909
|
+
// Resolve any Readable stream Data before proceeding
|
|
1910
|
+
resolveStreamParams(params, function(streamErr) {
|
|
1911
|
+
if (streamErr) {
|
|
1912
|
+
deferred ? deferred.reject(streamErr) : cb(streamErr);
|
|
1913
|
+
return next();
|
|
1914
|
+
}
|
|
1915
|
+
if(Array.isArray(params))
|
|
1916
|
+
{
|
|
1917
|
+
var err = parseParams(params);
|
|
1918
|
+
if(err)
|
|
1919
|
+
{
|
|
1920
|
+
if(deferred)
|
|
1921
|
+
{
|
|
1922
|
+
deferred.reject(err);
|
|
1923
|
+
} else
|
|
1924
|
+
{
|
|
1925
|
+
cb(err);
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
if(exports.debug) {
|
|
1930
|
+
if(logParams) {
|
|
1931
|
+
console.log("%s odbc.js:execute() bind params = ", getElapsedTime(), params);
|
|
1932
|
+
} else {
|
|
1933
|
+
console.log("%s odbc.js:execute()", getElapsedTime());
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
self._bind(params, function (err) {
|
|
1937
|
+
if (err) {
|
|
1938
|
+
self.db.checkConnectionError(err);
|
|
1939
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
1940
|
+
return next();
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
self._execute(function (err, result, outparams) {
|
|
1944
|
+
if (err) {
|
|
1945
|
+
self.db.checkConnectionError(err);
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
if(deferred) {
|
|
1949
|
+
if(err) {
|
|
1950
|
+
deferred.reject(err);
|
|
1951
|
+
} else {
|
|
1952
|
+
if(outparams) {
|
|
1953
|
+
deferred.resolve([result, outparams]);
|
|
1954
|
+
} else {
|
|
1955
|
+
deferred.resolve(result);
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
} else {
|
|
1959
|
+
cb(err, result, outparams);
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
return next();
|
|
1963
|
+
});
|
|
1964
|
+
});
|
|
1965
|
+
}); // resolveStreamParams
|
|
1966
|
+
}
|
|
1967
|
+
//Otherwise execute and pop the next bind call
|
|
1968
|
+
else
|
|
1969
|
+
{
|
|
1970
|
+
self._execute(function (err, result, outparams) {
|
|
1971
|
+
if (err) {
|
|
1972
|
+
self.db.checkConnectionError(err);
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
if(deferred) {
|
|
1976
|
+
if(err) {
|
|
1977
|
+
deferred.reject(err);
|
|
1978
|
+
} else {
|
|
1979
|
+
if(outparams) {
|
|
1980
|
+
deferred.resolve([result, outparams]);
|
|
1981
|
+
} else {
|
|
1982
|
+
deferred.resolve(result);
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
} else {
|
|
1986
|
+
cb(err, result, outparams);
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
//NOTE: We only execute the next queued bind call after
|
|
1990
|
+
// we have called execute() or executeNonQuery(). This ensures
|
|
1991
|
+
// that we don't call a bind() a bunch of times without ever
|
|
1992
|
+
// actually executing that bind. Not
|
|
1993
|
+
self.bindQueue && self.bindQueue.next();
|
|
1994
|
+
|
|
1995
|
+
return next();
|
|
1996
|
+
});
|
|
1997
|
+
}
|
|
1998
|
+
});
|
|
1999
|
+
return deferred ? deferred.promise : null;
|
|
2000
|
+
};
|
|
2001
|
+
|
|
2002
|
+
odbc.ODBCStatement.prototype.executeSync = function (params)
|
|
2003
|
+
{
|
|
2004
|
+
var self = this, err;
|
|
2005
|
+
|
|
2006
|
+
//If params are passed to this function, first bind them and
|
|
2007
|
+
//then execute.
|
|
2008
|
+
if (params)
|
|
2009
|
+
{
|
|
2010
|
+
err = self.bindSync(params);
|
|
2011
|
+
if(err !== true) console.log(err);
|
|
2012
|
+
}
|
|
2013
|
+
return self._executeSync();
|
|
2014
|
+
};
|
|
2015
|
+
|
|
2016
|
+
/*
|
|
2017
|
+
* convertRowsToColumns
|
|
2018
|
+
* Convert row-wise array data to column-wise ARRAY parameters.
|
|
2019
|
+
* rows: Array of arrays, where each inner array is one row of values.
|
|
2020
|
+
* columns (optional): Array of column descriptors with {DataType, CType, Length}.
|
|
2021
|
+
* Returns object with {params, ArraySize} on success, or {error} on failure.
|
|
2022
|
+
*/
|
|
2023
|
+
function convertRowsToColumns(rows, columns) {
|
|
2024
|
+
if (!Array.isArray(rows) || rows.length === 0) {
|
|
2025
|
+
return { error: "rows must be a non-empty array." };
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
var numRows = rows.length;
|
|
2029
|
+
var numCols = null;
|
|
2030
|
+
|
|
2031
|
+
for (var r = 0; r < numRows; r++) {
|
|
2032
|
+
if (!Array.isArray(rows[r])) {
|
|
2033
|
+
return { error: "Each element in rows must be an array. " +
|
|
2034
|
+
"Row " + r + " is not an array." };
|
|
2035
|
+
}
|
|
2036
|
+
if (numCols === null) {
|
|
2037
|
+
numCols = rows[r].length;
|
|
2038
|
+
} else if (rows[r].length !== numCols) {
|
|
2039
|
+
return { error: "All rows must have the same number of columns. " +
|
|
2040
|
+
"Row " + r + " has " + rows[r].length +
|
|
2041
|
+
" columns, expected " + numCols + "." };
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
if (numCols === 0) {
|
|
2046
|
+
return { error: "Rows must have at least one column." };
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
if (columns && (!Array.isArray(columns) || columns.length !== numCols)) {
|
|
2050
|
+
return { error: "columns array length (" +
|
|
2051
|
+
(Array.isArray(columns) ? columns.length : 0) +
|
|
2052
|
+
") must match the number of columns in rows (" +
|
|
2053
|
+
numCols + ")." };
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
var params = [];
|
|
2057
|
+
for (var c = 0; c < numCols; c++) {
|
|
2058
|
+
var colData = new Array(numRows);
|
|
2059
|
+
for (var r = 0; r < numRows; r++) {
|
|
2060
|
+
colData[r] = rows[r][c];
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
var param = { ParamType: "ARRAY", DataType: 1, Data: colData };
|
|
2064
|
+
if (columns && columns[c]) {
|
|
2065
|
+
if (columns[c].DataType !== undefined) param.DataType = columns[c].DataType;
|
|
2066
|
+
if (columns[c].CType !== undefined) param.CType = columns[c].CType;
|
|
2067
|
+
if (columns[c].SQLType !== undefined) param.SQLType = columns[c].SQLType;
|
|
2068
|
+
if (columns[c].Length !== undefined) param.Length = columns[c].Length;
|
|
2069
|
+
}
|
|
2070
|
+
params.push(param);
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
return { params: params, ArraySize: numRows };
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
/*
|
|
2077
|
+
* processRowsOption
|
|
2078
|
+
* If the query object has a 'rows' property, convert row-wise data to
|
|
2079
|
+
* column-wise ARRAY params and set ArraySize. Mutates the query object.
|
|
2080
|
+
* Returns an error string on failure, or undefined on success.
|
|
2081
|
+
*/
|
|
2082
|
+
function processRowsOption(query) {
|
|
2083
|
+
if (typeof query !== 'object' || !query.rows) return;
|
|
2084
|
+
|
|
2085
|
+
var result = convertRowsToColumns(query.rows, query.columns);
|
|
2086
|
+
if (result.error) return result.error;
|
|
2087
|
+
|
|
2088
|
+
query.params = result.params;
|
|
2089
|
+
if (!query.ArraySize) query.ArraySize = result.ArraySize;
|
|
2090
|
+
delete query.rows;
|
|
2091
|
+
delete query.columns;
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
function parseParams(params)
|
|
2095
|
+
{
|
|
2096
|
+
var err, prm, paramtype, ctype, sqltype, datatype, data, len;
|
|
2097
|
+
for (var i = 0; i < params.length; i++)
|
|
2098
|
+
{
|
|
2099
|
+
if(Object.prototype.toString.call(params[i]) == "[object Object]")
|
|
2100
|
+
{
|
|
2101
|
+
//{ParamType:"INPUT", DataType:"BLOB", Data:imgfile}
|
|
2102
|
+
//{"ParamType":"INPUT", CType:"BINARY", SQLType:"BLOB", Data:imgfile, Length:50}
|
|
2103
|
+
paramtype = 1; ctype = undefined; sqltype = undefined;
|
|
2104
|
+
datatype = undefined; data = undefined, len = 0;
|
|
2105
|
+
prm = params[i];
|
|
2106
|
+
if(prm.ParamType)
|
|
2107
|
+
{
|
|
2108
|
+
if(Number.isInteger(prm.ParamType))
|
|
2109
|
+
{
|
|
2110
|
+
if(prm.ParamType > 0 && prm.ParamType < 5)
|
|
2111
|
+
paramtype = prm.ParamType;
|
|
2112
|
+
}
|
|
2113
|
+
else if(prm.ParamType == "OUTPUT")
|
|
2114
|
+
paramtype = 4; // SQL_PARAM_OUTPUT
|
|
2115
|
+
else if(prm.ParamType == "INOUT")
|
|
2116
|
+
paramtype = 2; // SQL_PARAM_INPUT_OUTPUT
|
|
2117
|
+
else if(prm.ParamType == "FILE")
|
|
2118
|
+
paramtype = 3; // SQLBindFileToParam()
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
if(prm.CType)
|
|
2122
|
+
{
|
|
2123
|
+
if(Number.isInteger(prm.CType))
|
|
2124
|
+
{
|
|
2125
|
+
ctype = prm.CType;
|
|
2126
|
+
}
|
|
2127
|
+
else if(prm.CType == "CHAR")
|
|
2128
|
+
ctype = 1;
|
|
2129
|
+
else if(prm.CType == "BINARY")
|
|
2130
|
+
ctype = -2;
|
|
2131
|
+
else if(prm.CType == "DOUBLE" || prm.CType == "DECIMAL")
|
|
2132
|
+
ctype = 8; // SQL_C_DOUBLE=8, SQL_DECIMAL=3
|
|
2133
|
+
else if(prm.CType == "INTEGER")
|
|
2134
|
+
ctype = 4;
|
|
2135
|
+
else if(prm.CType == "BIGINT")
|
|
2136
|
+
ctype = -25;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
// Either SQLType or DataType must be entered.
|
|
2140
|
+
// If SQLType is used, DataType will be ignored.
|
|
2141
|
+
if(prm.SQLType || prm.DataType)
|
|
2142
|
+
{
|
|
2143
|
+
var type = prm.SQLType || prm.DataType;
|
|
2144
|
+
if(Number.isInteger(type))
|
|
2145
|
+
{
|
|
2146
|
+
sqltype = type;
|
|
2147
|
+
}
|
|
2148
|
+
else if(type == "DOUBLE")
|
|
2149
|
+
{
|
|
2150
|
+
sqltype = 8; // SQL_DOUBLE
|
|
2151
|
+
if(!ctype) ctype = sqltype;
|
|
2152
|
+
}
|
|
2153
|
+
else if(type == "DECIMAL")
|
|
2154
|
+
{
|
|
2155
|
+
sqltype = 3; // SQL_DECIMAL
|
|
2156
|
+
if(!ctype) ctype = 8; // sql_C_DOUBLE
|
|
2157
|
+
}
|
|
2158
|
+
else if(type == "BIGINT")
|
|
2159
|
+
{
|
|
2160
|
+
sqltype = -5; // SQL_BIGINT
|
|
2161
|
+
if(!ctype) ctype = -25; // sql_C_BIGINT
|
|
2162
|
+
}
|
|
2163
|
+
else if(type == "CHAR")
|
|
2164
|
+
{
|
|
2165
|
+
sqltype = 1; // SQL_CHAR
|
|
2166
|
+
if(!ctype) ctype = sqltype;
|
|
2167
|
+
}
|
|
2168
|
+
else if(type == "BINARY")
|
|
2169
|
+
{
|
|
2170
|
+
sqltype = -2;
|
|
2171
|
+
if(!ctype) ctype = sqltype;
|
|
2172
|
+
}
|
|
2173
|
+
else if(type == "BLOB")
|
|
2174
|
+
{
|
|
2175
|
+
sqltype = -98; // SQL_BLOB
|
|
2176
|
+
if(!ctype) ctype = -2;
|
|
2177
|
+
}
|
|
2178
|
+
else if(type == "CLOB")
|
|
2179
|
+
{
|
|
2180
|
+
sqltype = -99;
|
|
2181
|
+
if(!ctype) ctype = 1;
|
|
2182
|
+
}
|
|
2183
|
+
else if(type == "DBCLOB")
|
|
2184
|
+
{
|
|
2185
|
+
sqltype = -350;
|
|
2186
|
+
if(!ctype) ctype = sqltype;
|
|
2187
|
+
}
|
|
2188
|
+
else if(type == "XML")
|
|
2189
|
+
{
|
|
2190
|
+
sqltype = -370;
|
|
2191
|
+
if(!ctype) ctype = 1;
|
|
2192
|
+
}
|
|
2193
|
+
else if(type == "GRAPHIC")
|
|
2194
|
+
{
|
|
2195
|
+
sqltype = -95;
|
|
2196
|
+
if(!ctype) ctype = -99; //SQL_C_DBCHAR
|
|
2197
|
+
}
|
|
2198
|
+
else if(type == "VARGRAPHIC")
|
|
2199
|
+
{
|
|
2200
|
+
sqltype = -96;
|
|
2201
|
+
if(!ctype) ctype = -99; //SQL_C_DBCHAR
|
|
2202
|
+
}
|
|
2203
|
+
else if(type == "LONGGRAPHIC")
|
|
2204
|
+
{
|
|
2205
|
+
sqltype = -97;
|
|
2206
|
+
if(!ctype) ctype = -99; //SQL_C_DBCHAR
|
|
2207
|
+
}
|
|
2208
|
+
}
|
|
2209
|
+
if(prm.Length > 0 && Number.isInteger(prm.Length))
|
|
2210
|
+
{
|
|
2211
|
+
len = prm.Length;
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
if(prm.Data === undefined )
|
|
2215
|
+
{
|
|
2216
|
+
err = "odbc.js:parseParams =>Data is missing from " + JSON.stringify(prm);
|
|
2217
|
+
break;
|
|
2218
|
+
}
|
|
2219
|
+
if(Number.isInteger(prm.Data))
|
|
2220
|
+
{
|
|
2221
|
+
if(!ctype) ctype = -25; // SQL_C_SBIGINT
|
|
2222
|
+
if(!sqltype) sqltype = -5; // SQL_BIGINT
|
|
2223
|
+
|
|
2224
|
+
}
|
|
2225
|
+
else if( (paramtype == 4) && (prm.Data === "") )
|
|
2226
|
+
{
|
|
2227
|
+
prm.Data = "abc";
|
|
2228
|
+
}
|
|
2229
|
+
else if(Array.isArray(prm.Data) && prm.Data.length > 0 &&
|
|
2230
|
+
Buffer.isBuffer(prm.Data[0]))
|
|
2231
|
+
{
|
|
2232
|
+
// Array of Buffers: data-at-exec chunked LOB insert
|
|
2233
|
+
paramtype = 5; // DATA_AT_EXEC_PARAM
|
|
2234
|
+
if(!ctype) ctype = -2; // SQL_C_BINARY
|
|
2235
|
+
if(!sqltype) sqltype = -98; // SQL_BLOB
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
if(!ctype) ctype = 1;
|
|
2239
|
+
if(!sqltype) sqltype = 1;
|
|
2240
|
+
if(paramtype == 3) // For BindFileToParam()
|
|
2241
|
+
{
|
|
2242
|
+
ctype = 1;
|
|
2243
|
+
if(!((sqltype == -98) || (sqltype == -99) ||
|
|
2244
|
+
(sqltype == -350) || (sqltype == -370)))
|
|
2245
|
+
{
|
|
2246
|
+
err = "odbc.js:parseParams => DataType is missing form " + prm;
|
|
2247
|
+
break;
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
params[i] = [paramtype, ctype, sqltype, prm.Data, len];
|
|
2252
|
+
}
|
|
2253
|
+
//console.log(i + "th param = " + params[i]);
|
|
2254
|
+
}
|
|
2255
|
+
return err;
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
/*
|
|
2259
|
+
* resolveStreamParams
|
|
2260
|
+
* Check if any param has a Readable stream as Data.
|
|
2261
|
+
* If so, collect all chunks from the stream and replace Data with
|
|
2262
|
+
* an array of Buffers. Calls cb(err) when done.
|
|
2263
|
+
* If no streams found, calls cb(null) immediately.
|
|
2264
|
+
*/
|
|
2265
|
+
function resolveStreamParams(params, cb) {
|
|
2266
|
+
if (!Array.isArray(params)) return cb(null);
|
|
2267
|
+
|
|
2268
|
+
var pending = [];
|
|
2269
|
+
for (var i = 0; i < params.length; i++) {
|
|
2270
|
+
var p = params[i];
|
|
2271
|
+
if (p && typeof p === 'object' && !Array.isArray(p) &&
|
|
2272
|
+
!Buffer.isBuffer(p) && p.Data &&
|
|
2273
|
+
typeof p.Data === 'object' && p.Data !== null &&
|
|
2274
|
+
typeof p.Data.on === 'function' &&
|
|
2275
|
+
typeof p.Data.read === 'function')
|
|
2276
|
+
{
|
|
2277
|
+
pending.push({ index: i, stream: p.Data });
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
if (pending.length === 0) return cb(null);
|
|
2282
|
+
|
|
2283
|
+
var remaining = pending.length;
|
|
2284
|
+
var hasError = false;
|
|
2285
|
+
|
|
2286
|
+
for (var j = 0; j < pending.length; j++) {
|
|
2287
|
+
(function(item) {
|
|
2288
|
+
var chunks = [];
|
|
2289
|
+
item.stream.on('data', function(chunk) {
|
|
2290
|
+
if (!Buffer.isBuffer(chunk)) chunk = Buffer.from(chunk);
|
|
2291
|
+
chunks.push(chunk);
|
|
2292
|
+
});
|
|
2293
|
+
item.stream.on('end', function() {
|
|
2294
|
+
if (hasError) return;
|
|
2295
|
+
params[item.index].Data = chunks;
|
|
2296
|
+
remaining--;
|
|
2297
|
+
if (remaining === 0) cb(null);
|
|
2298
|
+
});
|
|
2299
|
+
item.stream.on('error', function(err) {
|
|
2300
|
+
if (!hasError) {
|
|
2301
|
+
hasError = true;
|
|
2302
|
+
cb(err);
|
|
2303
|
+
}
|
|
2304
|
+
});
|
|
2305
|
+
})(pending[j]);
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
if(Number.isInteger === undefined) // node.js < v0.12.0 do not support isInteger
|
|
2310
|
+
{
|
|
2311
|
+
Number.isInteger = function(x)
|
|
2312
|
+
{
|
|
2313
|
+
if((typeof x === 'number') && (x % 1 === 0)) return true;
|
|
2314
|
+
else return false;
|
|
2315
|
+
};
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
odbc.ODBCStatement.prototype.executeDirect = function (sql, cb)
|
|
2319
|
+
{
|
|
2320
|
+
var self = this, deferred;
|
|
2321
|
+
|
|
2322
|
+
if(!cb) {
|
|
2323
|
+
deferred = createDeferred();
|
|
2324
|
+
}
|
|
2325
|
+
self.queue = self.queue || new SimpleQueue();
|
|
2326
|
+
|
|
2327
|
+
self.queue.push(function (next) {
|
|
2328
|
+
self._executeDirect(sql, function (err, result) {
|
|
2329
|
+
if(err) {
|
|
2330
|
+
deferred ? deferred.reject(err) : cb(err, result);
|
|
2331
|
+
} else {
|
|
2332
|
+
deferred ? deferred.resolve(result) : cb(err, result);
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
return next();
|
|
2336
|
+
});
|
|
2337
|
+
});
|
|
2338
|
+
return deferred ? deferred.promise : null;
|
|
2339
|
+
};
|
|
2340
|
+
|
|
2341
|
+
odbc.ODBCStatement.prototype.executeNonQuery = function (params, cb)
|
|
2342
|
+
{
|
|
2343
|
+
var self = this, deferred;
|
|
2344
|
+
|
|
2345
|
+
if (!cb) {
|
|
2346
|
+
if (typeof params === 'function') {
|
|
2347
|
+
cb = params;
|
|
2348
|
+
params = null;
|
|
2349
|
+
}
|
|
2350
|
+
else {
|
|
2351
|
+
deferred = createDeferred();
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
self.queue = self.queue || new SimpleQueue();
|
|
2355
|
+
|
|
2356
|
+
self.queue.push(function (next) {
|
|
2357
|
+
//If params were passed to this function, then bind them and
|
|
2358
|
+
//then executeNonQuery.
|
|
2359
|
+
if (params)
|
|
2360
|
+
{
|
|
2361
|
+
// Resolve any Readable stream Data before proceeding
|
|
2362
|
+
resolveStreamParams(params, function(streamErr) {
|
|
2363
|
+
if (streamErr) {
|
|
2364
|
+
deferred ? deferred.reject(streamErr) : cb(streamErr);
|
|
2365
|
+
return next();
|
|
2366
|
+
}
|
|
2367
|
+
if(Array.isArray(params))
|
|
2368
|
+
{
|
|
2369
|
+
var err = parseParams(params);
|
|
2370
|
+
if(err) deferred ? deferred.reject(err) : cb(err);
|
|
2371
|
+
}
|
|
2372
|
+
if(exports.debug) {
|
|
2373
|
+
if(logParams) {
|
|
2374
|
+
console.log("%s odbc.js:executeNonQuery() bind params = ", getElapsedTime(), params);
|
|
2375
|
+
} else {
|
|
2376
|
+
console.log("%s odbc.js:executeNonQuery()", getElapsedTime());
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
self._bind(params, function (err) {
|
|
2380
|
+
if (err) {
|
|
2381
|
+
if(deferred)
|
|
2382
|
+
{
|
|
2383
|
+
deferred.reject(err);
|
|
2384
|
+
}
|
|
2385
|
+
else
|
|
2386
|
+
{
|
|
2387
|
+
cb && cb(err)
|
|
2388
|
+
}
|
|
2389
|
+
return next();
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
self._executeNonQuery(function (err, result) {
|
|
2393
|
+
if(deferred) {
|
|
2394
|
+
if(err) {
|
|
2395
|
+
deferred.reject(err);
|
|
2396
|
+
} else {
|
|
2397
|
+
deferred.resolve(result);
|
|
2398
|
+
}
|
|
2399
|
+
} else {
|
|
2400
|
+
cb && cb(err, result);
|
|
2401
|
+
}
|
|
2402
|
+
return next();
|
|
2403
|
+
});
|
|
2404
|
+
});
|
|
2405
|
+
}); // resolveStreamParams
|
|
2406
|
+
}
|
|
2407
|
+
//Otherwise executeNonQuery and pop the next bind call
|
|
2408
|
+
else {
|
|
2409
|
+
self._executeNonQuery(function (err, result) {
|
|
2410
|
+
if(deferred) {
|
|
2411
|
+
if(err) {
|
|
2412
|
+
deferred.reject(err);
|
|
2413
|
+
} else {
|
|
2414
|
+
deferred.resolve(result);
|
|
2415
|
+
}
|
|
2416
|
+
} else {
|
|
2417
|
+
cb && cb(err, result);
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
//NOTE: We only execute the next queued bind call after
|
|
2421
|
+
// we have called execute() or executeNonQuery(). This ensures
|
|
2422
|
+
// that we don't call a bind() a bunch of times without ever
|
|
2423
|
+
// actually executing that bind.
|
|
2424
|
+
self.bindQueue && self.bindQueue.next();
|
|
2425
|
+
|
|
2426
|
+
return next();
|
|
2427
|
+
});
|
|
2428
|
+
}
|
|
2429
|
+
});
|
|
2430
|
+
return deferred ? deferred.promise : null;
|
|
2431
|
+
};
|
|
2432
|
+
|
|
2433
|
+
odbc.ODBCStatement.prototype.executeNonQuerySync = function (params)
|
|
2434
|
+
{
|
|
2435
|
+
var self = this, err;
|
|
2436
|
+
|
|
2437
|
+
//If params are passed to this function, first bind them and
|
|
2438
|
+
//then execute.
|
|
2439
|
+
if (params)
|
|
2440
|
+
{
|
|
2441
|
+
err = self.bindSync(params);
|
|
2442
|
+
if(err !== true) console.log(err);
|
|
2443
|
+
}
|
|
2444
|
+
return self._executeNonQuerySync();
|
|
2445
|
+
};
|
|
2446
|
+
|
|
2447
|
+
odbc.ODBCStatement.prototype.prepare = function (sql, cb) {
|
|
2448
|
+
var self = this, deferred;
|
|
2449
|
+
|
|
2450
|
+
if(!cb) {
|
|
2451
|
+
deferred = createDeferred();
|
|
2452
|
+
}
|
|
2453
|
+
self.queue = self.queue || new SimpleQueue();
|
|
2454
|
+
|
|
2455
|
+
self.queue.push(function (next) {
|
|
2456
|
+
try {
|
|
2457
|
+
self._prepare(sql, function (err) {
|
|
2458
|
+
if(cb) {
|
|
2459
|
+
cb(err);
|
|
2460
|
+
} else {
|
|
2461
|
+
err ? deferred.reject(err) : deferred.resolve(true);
|
|
2462
|
+
}
|
|
2463
|
+
});
|
|
2464
|
+
} catch (ex) {
|
|
2465
|
+
cb ? cb(ex) : deferred.reject(ex);
|
|
2466
|
+
}
|
|
2467
|
+
return next();
|
|
2468
|
+
});
|
|
2469
|
+
return deferred ? deferred.promise : null;
|
|
2470
|
+
};
|
|
2471
|
+
|
|
2472
|
+
// Function to bind parameters before execute or executeSync
|
|
2473
|
+
odbc.ODBCStatement.prototype.bind = function (ary, cb) {
|
|
2474
|
+
var self = this, deferred;
|
|
2475
|
+
|
|
2476
|
+
if(!cb) {
|
|
2477
|
+
if (typeof ary === 'function') {
|
|
2478
|
+
cb = ary;
|
|
2479
|
+
ary = null;
|
|
2480
|
+
}
|
|
2481
|
+
else {
|
|
2482
|
+
deferred = createDeferred();
|
|
2483
|
+
}
|
|
2484
|
+
}
|
|
2485
|
+
self.bindQueue = self.bindQueue || new SimpleQueue();
|
|
2486
|
+
|
|
2487
|
+
self.bindQueue.push(function () {
|
|
2488
|
+
if(Array.isArray(ary))
|
|
2489
|
+
{
|
|
2490
|
+
var err = parseParams(ary);
|
|
2491
|
+
if(err) deferred ? deferred.reject(err) : cb(err);
|
|
2492
|
+
}
|
|
2493
|
+
if(exports.debug) {
|
|
2494
|
+
if(logParams) {
|
|
2495
|
+
console.log("%s odbc.js:bind() params = ", getElapsedTime(), ary);
|
|
2496
|
+
} else {
|
|
2497
|
+
console.log("%s odbc.js:bind()", getElapsedTime());
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
self._bind(ary, function (err) {
|
|
2501
|
+
if(cb) {
|
|
2502
|
+
cb(err);
|
|
2503
|
+
} else {
|
|
2504
|
+
err ? deferred.reject(err) : deferred.resolve(true);
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
//NOTE: we do not call next() here because
|
|
2508
|
+
//we want to pop the next bind call only
|
|
2509
|
+
//after the next execute call
|
|
2510
|
+
});
|
|
2511
|
+
});
|
|
2512
|
+
};
|
|
2513
|
+
|
|
2514
|
+
// Async Function to bind parameters before execute or executeSync
|
|
2515
|
+
odbc.ODBCStatement.prototype.bindSync = function (ary) {
|
|
2516
|
+
var self = this;
|
|
2517
|
+
if(Array.isArray(ary))
|
|
2518
|
+
{
|
|
2519
|
+
var err = parseParams(ary);
|
|
2520
|
+
if(err) return false;
|
|
2521
|
+
}
|
|
2522
|
+
if(exports.debug) {
|
|
2523
|
+
if(logParams) {
|
|
2524
|
+
console.log("%s odbc.js::bindSync() params = ", getElapsedTime(), ary);
|
|
2525
|
+
} else {
|
|
2526
|
+
console.log("%s odbc.js:bindSync()", getElapsedTime());
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
return self._bindSync(ary);
|
|
2530
|
+
};
|
|
2531
|
+
|
|
2532
|
+
// Function to set statement attributes before execute or executeSync
|
|
2533
|
+
odbc.ODBCStatement.prototype.setAttr = function (attr, value, cb) {
|
|
2534
|
+
var self = this, deferred;
|
|
2535
|
+
|
|
2536
|
+
if(!cb) {
|
|
2537
|
+
deferred = createDeferred();
|
|
2538
|
+
}
|
|
2539
|
+
self.setAttrQueue = self.setAttrQueue || new SimpleQueue();
|
|
2540
|
+
|
|
2541
|
+
self.setAttrQueue.push(function () {
|
|
2542
|
+
exports.debug && console.log("%s odbc.js:setAttr() Attribute = ", getElapsedTime(), attr, ", value = ", value);
|
|
2543
|
+
self._setAttr(attr, value, function (err) {
|
|
2544
|
+
if(cb) {
|
|
2545
|
+
cb(err);
|
|
2546
|
+
} else {
|
|
2547
|
+
err ? deferred.reject(err) : deferred.resolve(true);
|
|
2548
|
+
}
|
|
2549
|
+
});
|
|
2550
|
+
});
|
|
2551
|
+
return deferred ? deferred.promise : null;
|
|
2552
|
+
};
|
|
2553
|
+
|
|
2554
|
+
// Async Function to set statement attributes before execute or executeSync
|
|
2555
|
+
odbc.ODBCStatement.prototype.setAttrSync = function (attr, value) {
|
|
2556
|
+
var self = this;
|
|
2557
|
+
exports.debug && console.log("%s odbc.js:setAttrSync() Attribute = ", getElapsedTime(), attr, ", Value = ", value);
|
|
2558
|
+
return self._setAttrSync(attr, value);
|
|
2559
|
+
};
|
|
2560
|
+
|
|
2561
|
+
// Async funcion to close a statement object to free statement handle
|
|
2562
|
+
// If no callback function, then return Promise.
|
|
2563
|
+
odbc.ODBCStatement.prototype.close = function (closeOption, cb)
|
|
2564
|
+
{
|
|
2565
|
+
var self = this, deferred;
|
|
2566
|
+
self.queue = self.queue || new SimpleQueue();
|
|
2567
|
+
|
|
2568
|
+
if (!cb)
|
|
2569
|
+
{
|
|
2570
|
+
if (typeof closeOption === 'function') {
|
|
2571
|
+
cb = closeOption;
|
|
2572
|
+
closeOption = 1;
|
|
2573
|
+
} else {
|
|
2574
|
+
deferred = createDeferred();
|
|
2575
|
+
}
|
|
2576
|
+
if(!closeOption) closeOption = 1;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
self.queue.push(function (next) {
|
|
2580
|
+
self._close(closeOption, function (err) {
|
|
2581
|
+
if( err ) {
|
|
2582
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
2583
|
+
} else {
|
|
2584
|
+
deferred ? deferred.resolve(false) : cb(null);
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
return next();
|
|
2588
|
+
});
|
|
2589
|
+
});
|
|
2590
|
+
return deferred ? deferred.promise : false;
|
|
2591
|
+
};
|
|
2592
|
+
|
|
2593
|
+
// Async function to fetch single row of data post execute or executeSync call.
|
|
2594
|
+
// result.fetch(option, callback);
|
|
2595
|
+
// result.fetch({fetchMode:4|3|0}); default value of fetchMode is 4 - OBJECT
|
|
2596
|
+
// fetchMode:0 => will not return any data, we need to retrieve data using
|
|
2597
|
+
// getData() or getDataSync() APIs.
|
|
2598
|
+
// If callback function is not provided, it will return Promise.
|
|
2599
|
+
// Below is the Promisified implementation of fetch() function.
|
|
2600
|
+
odbc.ODBCResult.prototype.fetch = function (option, cb) {
|
|
2601
|
+
var self = this, deferred;
|
|
2602
|
+
self.queue = self.queue || new SimpleQueue();
|
|
2603
|
+
|
|
2604
|
+
if (!cb)
|
|
2605
|
+
{
|
|
2606
|
+
if(typeof option === 'function')
|
|
2607
|
+
{
|
|
2608
|
+
cb = option;
|
|
2609
|
+
option = undefined;
|
|
2610
|
+
}
|
|
2611
|
+
else
|
|
2612
|
+
{
|
|
2613
|
+
deferred = createDeferred();
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
if (typeof option === 'object')
|
|
2617
|
+
{
|
|
2618
|
+
if (option.fetchMode !=0 && option.fetchMode !=3 && option.fetchMode !=4)
|
|
2619
|
+
{
|
|
2620
|
+
var error = "Invalid fetchMode!";
|
|
2621
|
+
!cb ? deferred.reject(error) : cb(error);
|
|
2622
|
+
} else {
|
|
2623
|
+
self.fetchMode = option.fetchMode;
|
|
2624
|
+
}
|
|
2625
|
+
} else {
|
|
2626
|
+
option = undefined;
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
if (option)
|
|
2630
|
+
{
|
|
2631
|
+
self.queue.push(function (next) {
|
|
2632
|
+
self._fetch(option, function (err, data) {
|
|
2633
|
+
if( err ) {
|
|
2634
|
+
deferred ? deferred.reject(err) : cb(err, null);
|
|
2635
|
+
} else {
|
|
2636
|
+
deferred ? deferred.resolve(data) : cb(null, data);
|
|
2637
|
+
}
|
|
2638
|
+
return next();
|
|
2639
|
+
});
|
|
2640
|
+
});
|
|
2641
|
+
}
|
|
2642
|
+
else
|
|
2643
|
+
{
|
|
2644
|
+
self.queue.push(function (next) {
|
|
2645
|
+
self._fetch(function (err, data) {
|
|
2646
|
+
if( err ) {
|
|
2647
|
+
deferred ? deferred.reject(err) : cb(err, null);
|
|
2648
|
+
} else {
|
|
2649
|
+
deferred ? deferred.resolve(data) : cb(null, data);
|
|
2650
|
+
}
|
|
2651
|
+
return next();
|
|
2652
|
+
});
|
|
2653
|
+
});
|
|
2654
|
+
}
|
|
2655
|
+
return deferred ? deferred.promise : false;
|
|
2656
|
+
};
|
|
2657
|
+
|
|
2658
|
+
odbc.ODBCResult.prototype.fetchAll = function (option, cb)
|
|
2659
|
+
{
|
|
2660
|
+
var self = this, deferred;
|
|
2661
|
+
|
|
2662
|
+
if (!cb)
|
|
2663
|
+
{
|
|
2664
|
+
if(typeof option === 'function')
|
|
2665
|
+
{
|
|
2666
|
+
cb = option;
|
|
2667
|
+
option = undefined;
|
|
2668
|
+
}
|
|
2669
|
+
else
|
|
2670
|
+
{
|
|
2671
|
+
deferred = createDeferred();
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
if (typeof option === 'object')
|
|
2675
|
+
{
|
|
2676
|
+
if (option.fetchMode !=3 && option.fetchMode !=4)
|
|
2677
|
+
{
|
|
2678
|
+
var error = "Invalid fetchMode!";
|
|
2679
|
+
!cb ? deferred.reject(error) : cb(error);
|
|
2680
|
+
} else {
|
|
2681
|
+
self.fetchMode = option.fetchMode;
|
|
2682
|
+
}
|
|
2683
|
+
} else {
|
|
2684
|
+
option = undefined;
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
if (option)
|
|
2688
|
+
{
|
|
2689
|
+
self._fetchAll(option, function (err, data, count) {
|
|
2690
|
+
if( err ) {
|
|
2691
|
+
deferred ? deferred.reject(err) : cb(err, null, 0);
|
|
2692
|
+
} else {
|
|
2693
|
+
deferred ? deferred.resolve(data) : cb(null, data, count);
|
|
2694
|
+
}
|
|
2695
|
+
});
|
|
2696
|
+
}
|
|
2697
|
+
else
|
|
2698
|
+
{
|
|
2699
|
+
self._fetchAll(function (err, data, count) {
|
|
2700
|
+
if( err ) {
|
|
2701
|
+
deferred ? deferred.reject(err) : cb(err, null, 0);
|
|
2702
|
+
} else {
|
|
2703
|
+
deferred ? deferred.resolve(data) : cb(null, data, count);
|
|
2704
|
+
}
|
|
2705
|
+
});
|
|
2706
|
+
}
|
|
2707
|
+
return deferred ? deferred.promise : false;
|
|
2708
|
+
};
|
|
2709
|
+
|
|
2710
|
+
// Async function to fetch up to N rows from the result set.
|
|
2711
|
+
// result.fetchN(count, [option], callback);
|
|
2712
|
+
// count: positive integer - maximum number of rows to fetch in this batch.
|
|
2713
|
+
// option: optional object {fetchMode: 4|3} default is 4 (OBJECT).
|
|
2714
|
+
// callback: optional - callback(err, rows). rows is an array.
|
|
2715
|
+
// If callback is not provided, returns a Promise that resolves to the rows array.
|
|
2716
|
+
// Does not close the cursor or free columns, so it can be called repeatedly.
|
|
2717
|
+
odbc.ODBCResult.prototype.fetchN = function (count, option, cb) {
|
|
2718
|
+
var self = this, deferred;
|
|
2719
|
+
self.queue = self.queue || new SimpleQueue();
|
|
2720
|
+
|
|
2721
|
+
if (typeof option === 'function')
|
|
2722
|
+
{
|
|
2723
|
+
cb = option;
|
|
2724
|
+
option = undefined;
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
if (!cb)
|
|
2728
|
+
{
|
|
2729
|
+
deferred = createDeferred();
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
if (typeof count !== 'number' || count <= 0 || !Number.isInteger(count))
|
|
2733
|
+
{
|
|
2734
|
+
var error = { message: "fetchN(): count must be a positive integer." };
|
|
2735
|
+
deferred ? deferred.reject(error) : (cb && cb(error));
|
|
2736
|
+
return deferred ? deferred.promise : false;
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2739
|
+
if (typeof option === 'object')
|
|
2740
|
+
{
|
|
2741
|
+
if (option.fetchMode != 3 && option.fetchMode != 4)
|
|
2742
|
+
{
|
|
2743
|
+
var error = "Invalid fetchMode!";
|
|
2744
|
+
deferred ? deferred.reject(error) : cb(error);
|
|
2745
|
+
return deferred ? deferred.promise : false;
|
|
2746
|
+
}
|
|
2747
|
+
} else {
|
|
2748
|
+
option = undefined;
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
self.queue.push(function (next) {
|
|
2752
|
+
var args = option ? [count, option] : [count];
|
|
2753
|
+
args.push(function (err, rows) {
|
|
2754
|
+
if (err) {
|
|
2755
|
+
deferred ? deferred.reject(err) : cb(err, null);
|
|
2756
|
+
} else {
|
|
2757
|
+
deferred ? deferred.resolve(rows) : cb(null, rows);
|
|
2758
|
+
}
|
|
2759
|
+
return next();
|
|
2760
|
+
});
|
|
2761
|
+
self._fetchN.apply(self, args);
|
|
2762
|
+
});
|
|
2763
|
+
return deferred ? deferred.promise : false;
|
|
2764
|
+
};
|
|
2765
|
+
|
|
2766
|
+
// Async funcion to getData for a column after call of fetch with fetchMode:0
|
|
2767
|
+
// If no callback function, then return Promise.
|
|
2768
|
+
odbc.ODBCResult.prototype.getData = function (colNum, dataSize, cb)
|
|
2769
|
+
{
|
|
2770
|
+
var self = this, deferred;
|
|
2771
|
+
|
|
2772
|
+
if (!cb && typeof colNum !== 'function' && typeof dataSize !== 'function')
|
|
2773
|
+
{
|
|
2774
|
+
deferred = createDeferred();
|
|
2775
|
+
}
|
|
2776
|
+
self.queue = self.queue || new SimpleQueue();
|
|
2777
|
+
|
|
2778
|
+
if (!cb && typeof dataSize === 'function')
|
|
2779
|
+
{
|
|
2780
|
+
cb = dataSize;
|
|
2781
|
+
dataSize = 0;
|
|
2782
|
+
}
|
|
2783
|
+
if (!colNum)
|
|
2784
|
+
{
|
|
2785
|
+
colNum = 0;
|
|
2786
|
+
}
|
|
2787
|
+
|
|
2788
|
+
self.queue.push(function (next) {
|
|
2789
|
+
self._getData(colNum, dataSize, function (err, data) {
|
|
2790
|
+
if( err ) {
|
|
2791
|
+
deferred ? deferred.reject(err) : cb(err, null);
|
|
2792
|
+
} else {
|
|
2793
|
+
deferred ? deferred.resolve(data) : cb(null, data);
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
return next();
|
|
2797
|
+
});
|
|
2798
|
+
});
|
|
2799
|
+
return deferred ? deferred.promise : false;
|
|
2800
|
+
};
|
|
2801
|
+
|
|
2802
|
+
// Async funcion to close a result object to free statement handle
|
|
2803
|
+
// If no callback function, then return Promise.
|
|
2804
|
+
odbc.ODBCResult.prototype.close = function (closeOption, cb)
|
|
2805
|
+
{
|
|
2806
|
+
var self = this, deferred;
|
|
2807
|
+
self.queue = self.queue || new SimpleQueue();
|
|
2808
|
+
|
|
2809
|
+
if (!cb)
|
|
2810
|
+
{
|
|
2811
|
+
if (typeof closeOption === 'function') {
|
|
2812
|
+
cb = closeOption;
|
|
2813
|
+
closeOption = 1;
|
|
2814
|
+
} else {
|
|
2815
|
+
deferred = createDeferred();
|
|
2816
|
+
}
|
|
2817
|
+
if(!closeOption) closeOption = 1;
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2820
|
+
self.queue.push(function (next) {
|
|
2821
|
+
self._close(closeOption, function (err) {
|
|
2822
|
+
if( err ) {
|
|
2823
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
2824
|
+
} else {
|
|
2825
|
+
deferred ? deferred.resolve(false) : cb(null);
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2828
|
+
return next();
|
|
2829
|
+
});
|
|
2830
|
+
});
|
|
2831
|
+
return deferred ? deferred.promise : false;
|
|
2832
|
+
};
|
|
2833
|
+
|
|
2834
|
+
// Async version of bindFileToColSync.
|
|
2835
|
+
// Bind a LOB result column to an output file using SQLBindFileToCol.
|
|
2836
|
+
// result.bindFileToCol(colNum, filePath, fileOption, callback);
|
|
2837
|
+
// If callback is not provided, returns a Promise.
|
|
2838
|
+
odbc.ODBCResult.prototype.bindFileToCol = function (colNum, filePath, fileOption, cb)
|
|
2839
|
+
{
|
|
2840
|
+
var self = this, deferred;
|
|
2841
|
+
|
|
2842
|
+
if (typeof fileOption === 'function') {
|
|
2843
|
+
cb = fileOption;
|
|
2844
|
+
fileOption = exports.SQL_FILE_OVERWRITE;
|
|
2845
|
+
}
|
|
2846
|
+
if (!cb) {
|
|
2847
|
+
deferred = createDeferred();
|
|
2848
|
+
}
|
|
2849
|
+
|
|
2850
|
+
try {
|
|
2851
|
+
self.bindFileToColSync(colNum, filePath, fileOption);
|
|
2852
|
+
deferred ? deferred.resolve(true) : cb(null);
|
|
2853
|
+
} catch(err) {
|
|
2854
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
2855
|
+
}
|
|
2856
|
+
return deferred ? deferred.promise : undefined;
|
|
2857
|
+
};
|
|
2858
|
+
|
|
2859
|
+
|
|
2860
|
+
/***** CONNECTION POOLING RELATED APIs *******/
|
|
2861
|
+
/*===========================================*/
|
|
2862
|
+
|
|
2863
|
+
module.exports.Pool = Pool;
|
|
2864
|
+
|
|
2865
|
+
Pool.count = 0;
|
|
2866
|
+
|
|
2867
|
+
function Pool (_options) {
|
|
2868
|
+
var self = this;
|
|
2869
|
+
self.options = {};
|
|
2870
|
+
self.maxPoolSize = 0;
|
|
2871
|
+
if(_options)
|
|
2872
|
+
{
|
|
2873
|
+
if(_options.idleTimeout && !isNaN(_options.idleTimeout))
|
|
2874
|
+
self.options.idleTimeout = _options.idleTimeout;
|
|
2875
|
+
if(_options.autoCleanIdle)
|
|
2876
|
+
self.options.autoCleanIdle = _options.autoCleanIdle;
|
|
2877
|
+
if(_options.maxPoolSize)
|
|
2878
|
+
self.maxPoolSize = _options.maxPoolSize;
|
|
2879
|
+
if(_options.connectTimeout)
|
|
2880
|
+
self.options.connectTimeout = _options.connectTimeout;
|
|
2881
|
+
if(_options.systemNaming)
|
|
2882
|
+
self.options.systemNaming=_options.systemNaming;
|
|
2883
|
+
}
|
|
2884
|
+
self.index = Pool.count++;
|
|
2885
|
+
self.availablePool = {};
|
|
2886
|
+
self.usedPool = {};
|
|
2887
|
+
self.poolSize = 0;
|
|
2888
|
+
self.queue = self.queue || new SimpleQueue();
|
|
2889
|
+
self.queue.executing = true; // Do not call next, untill next is called by db.close();
|
|
2890
|
+
if(!ENV) ENV = new odbc.ODBC();
|
|
2891
|
+
self.odbc = ENV;
|
|
2892
|
+
self.options.connectTimeout = self.options.connectTimeout || 60;
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
// Get a new connection from pool asynchronously
|
|
2896
|
+
Pool.prototype.open = function (connStr, callback)
|
|
2897
|
+
{
|
|
2898
|
+
var self = this
|
|
2899
|
+
, db, deferred
|
|
2900
|
+
;
|
|
2901
|
+
|
|
2902
|
+
if (!callback)
|
|
2903
|
+
{
|
|
2904
|
+
deferred = createDeferred();
|
|
2905
|
+
}
|
|
2906
|
+
//check to see if we already have a connection for this connection string
|
|
2907
|
+
if (self.availablePool[connStr] && self.availablePool[connStr].length)
|
|
2908
|
+
{
|
|
2909
|
+
// Remove connection if marked as not connected.
|
|
2910
|
+
do {
|
|
2911
|
+
db = self.availablePool[connStr].shift();
|
|
2912
|
+
if (db && !db.connected) {
|
|
2913
|
+
db = null;
|
|
2914
|
+
if(self.poolSize) self.poolSize--;
|
|
2915
|
+
}
|
|
2916
|
+
else { break; }
|
|
2917
|
+
} while (!db);
|
|
2918
|
+
}
|
|
2919
|
+
if (db) {
|
|
2920
|
+
db.lastUsed=null;
|
|
2921
|
+
self.usedPool[connStr] = self.usedPool[connStr] || [];
|
|
2922
|
+
self.usedPool[connStr].push(db);
|
|
2923
|
+
deferred ? deferred.resolve(db) : callback(null, db);
|
|
2924
|
+
}
|
|
2925
|
+
else if((self.maxPoolSize > 0) && (self.poolSize >= self.maxPoolSize))
|
|
2926
|
+
{
|
|
2927
|
+
// Move it to queue untill an existing connection is not closed.
|
|
2928
|
+
// Call it from db.close() version of pool.open and pool.init.
|
|
2929
|
+
function queueCallback(next) {
|
|
2930
|
+
if (self.availablePool[connStr] && self.availablePool[connStr].length)
|
|
2931
|
+
{
|
|
2932
|
+
db = self.availablePool[connStr].shift();
|
|
2933
|
+
db.lastUsed=null;
|
|
2934
|
+
self.usedPool[connStr] = self.usedPool[connStr] || [];
|
|
2935
|
+
self.usedPool[connStr].push(db);
|
|
2936
|
+
deferred ? deferred.resolve(db) : callback(null, db);
|
|
2937
|
+
}
|
|
2938
|
+
else {
|
|
2939
|
+
self.queue.push(queueCallback);
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
self.queue.push(queueCallback);
|
|
2943
|
+
}
|
|
2944
|
+
else
|
|
2945
|
+
{
|
|
2946
|
+
if(typeof(self.options.odbc) === 'undefined')
|
|
2947
|
+
self.options.odbc = self.odbc;
|
|
2948
|
+
self.options.pool = self;
|
|
2949
|
+
self.options.connStr = connStr;
|
|
2950
|
+
db = new Database(self.options);
|
|
2951
|
+
self.poolSize++;
|
|
2952
|
+
|
|
2953
|
+
db.open(connStr, function (error) {
|
|
2954
|
+
exports.debug && console.log("%s odbc.js : pool[%s] : pool.db.open new connection.", getElapsedTime(), self.index);
|
|
2955
|
+
if(error)
|
|
2956
|
+
{
|
|
2957
|
+
self.poolSize--;
|
|
2958
|
+
deferred ? deferred.reject(error) : callback(error, db);
|
|
2959
|
+
}
|
|
2960
|
+
else
|
|
2961
|
+
{
|
|
2962
|
+
self.usedPool[connStr] = self.usedPool[connStr] || [];
|
|
2963
|
+
db.created = Date.now();
|
|
2964
|
+
self.usedPool[connStr].push(db);
|
|
2965
|
+
deferred ? deferred.resolve(db) : callback(error, db);
|
|
2966
|
+
}
|
|
2967
|
+
}); //db.open
|
|
2968
|
+
}
|
|
2969
|
+
return deferred ? deferred.promise : null;
|
|
2970
|
+
};
|
|
2971
|
+
|
|
2972
|
+
// Get a new connection from pool synchronously
|
|
2973
|
+
Pool.prototype.openSync = function (connStr)
|
|
2974
|
+
{
|
|
2975
|
+
var self = this
|
|
2976
|
+
, db
|
|
2977
|
+
;
|
|
2978
|
+
|
|
2979
|
+
//check to see if we already have a connection for this connection string
|
|
2980
|
+
if (self.availablePool[connStr] && self.availablePool[connStr].length)
|
|
2981
|
+
{
|
|
2982
|
+
// Remove connection if marked as not connected.
|
|
2983
|
+
do {
|
|
2984
|
+
db = self.availablePool[connStr].shift();
|
|
2985
|
+
if (db && !db.connected) {
|
|
2986
|
+
db = null;
|
|
2987
|
+
if(self.poolSize) self.poolSize--;
|
|
2988
|
+
}
|
|
2989
|
+
else { break; }
|
|
2990
|
+
} while (!db);
|
|
2991
|
+
}
|
|
2992
|
+
if (db) {
|
|
2993
|
+
db.lastUsed=null;
|
|
2994
|
+
self.usedPool[connStr] = self.usedPool[connStr] || [];
|
|
2995
|
+
self.usedPool[connStr].push(db);
|
|
2996
|
+
return db;
|
|
2997
|
+
}
|
|
2998
|
+
else if((self.maxPoolSize > 0) && (self.poolSize >= self.maxPoolSize))
|
|
2999
|
+
{
|
|
3000
|
+
// Move it to queue untill an existing connection is not closed.
|
|
3001
|
+
// Call it from db.close() version of pool.open and pool.init.
|
|
3002
|
+
function queueCallback(next) {
|
|
3003
|
+
if (self.availablePool[connStr] && self.availablePool[connStr].length)
|
|
3004
|
+
{
|
|
3005
|
+
db = self.availablePool[connStr].shift();
|
|
3006
|
+
db.lastUsed=null;
|
|
3007
|
+
self.usedPool[connStr] = self.usedPool[connStr] || [];
|
|
3008
|
+
self.usedPool[connStr].push(db);
|
|
3009
|
+
return db;
|
|
3010
|
+
}
|
|
3011
|
+
else {
|
|
3012
|
+
self.queue.push(queueCallback);
|
|
3013
|
+
}
|
|
3014
|
+
}
|
|
3015
|
+
self.queue.push(queueCallback);
|
|
3016
|
+
}
|
|
3017
|
+
else
|
|
3018
|
+
{
|
|
3019
|
+
if(typeof(self.options.odbc) === 'undefined')
|
|
3020
|
+
self.options.odbc = self.odbc;
|
|
3021
|
+
self.options.pool = self;
|
|
3022
|
+
self.options.connStr = connStr;
|
|
3023
|
+
db = new Database(self.options);
|
|
3024
|
+
|
|
3025
|
+
exports.debug && console.log("%s odbc.js : pool[%s] : pool.db.openSync new connection.", getElapsedTime(), self.index);
|
|
3026
|
+
db.openSync(connStr);
|
|
3027
|
+
self.poolSize++;
|
|
3028
|
+
self.usedPool[connStr] = self.usedPool[connStr] || [];
|
|
3029
|
+
db.created = Date.now();
|
|
3030
|
+
self.usedPool[connStr].push(db);
|
|
3031
|
+
return db;
|
|
3032
|
+
}
|
|
3033
|
+
}; //pool.openSync
|
|
3034
|
+
|
|
3035
|
+
// closeSync function for pooled connection.
|
|
3036
|
+
Database.prototype.poolCloseSync = function ()
|
|
3037
|
+
{
|
|
3038
|
+
var db = this;
|
|
3039
|
+
var self = this.pool;
|
|
3040
|
+
var connStr = this.connStr;
|
|
3041
|
+
if( !self ) { return db.closeSync(); }
|
|
3042
|
+
|
|
3043
|
+
self.availablePool[connStr] = self.availablePool[connStr] || [];
|
|
3044
|
+
// If conn.closeSync is called more than once for this connection,
|
|
3045
|
+
// nothing to do. Just return.
|
|
3046
|
+
if( self.availablePool[connStr] &&
|
|
3047
|
+
self.availablePool[connStr].indexOf(db) >= 0 )
|
|
3048
|
+
{
|
|
3049
|
+
return;
|
|
3050
|
+
}
|
|
3051
|
+
db.lastUsed = Date.now();
|
|
3052
|
+
|
|
3053
|
+
// If this connection has some active transaction, rollback the
|
|
3054
|
+
// transaction to free up the held resorces before moving back to
|
|
3055
|
+
// the pool. So that, next request can get afresh connection from pool.
|
|
3056
|
+
if(db.conn && db.conn.inTransaction)
|
|
3057
|
+
{
|
|
3058
|
+
try {
|
|
3059
|
+
db.rollbackTransactionSync();
|
|
3060
|
+
} catch(error) {
|
|
3061
|
+
// Just ignore the error, since we're closing the connection.
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3065
|
+
//remove this db from the usedPool
|
|
3066
|
+
if(self.usedPool[connStr]) {
|
|
3067
|
+
self.usedPool[connStr].splice(self.usedPool[connStr].indexOf(db), 1);
|
|
3068
|
+
self.poolSize--;
|
|
3069
|
+
}
|
|
3070
|
+
|
|
3071
|
+
//move this connection back to the connection pool at the end.
|
|
3072
|
+
if(db.conn)
|
|
3073
|
+
{
|
|
3074
|
+
self.availablePool[connStr].push(db);
|
|
3075
|
+
self.poolSize++;
|
|
3076
|
+
}
|
|
3077
|
+
|
|
3078
|
+
if(db.conn && self.options.autoCleanIdle) self.cleanUp(connStr);
|
|
3079
|
+
return self.queue.next();
|
|
3080
|
+
}; // db.poolCloseSync function
|
|
3081
|
+
|
|
3082
|
+
// conn.close function for pooled connection.
|
|
3083
|
+
Database.prototype.poolClose = function (cb)
|
|
3084
|
+
{
|
|
3085
|
+
var db = this;
|
|
3086
|
+
var self = this.pool;
|
|
3087
|
+
var connStr = this.connStr;
|
|
3088
|
+
if( !self ) { return db.close(cb); }
|
|
3089
|
+
var deferred;
|
|
3090
|
+
if(!cb) {
|
|
3091
|
+
deferred = createDeferred();
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3094
|
+
self.availablePool[connStr] = self.availablePool[connStr] || [];
|
|
3095
|
+
// If conn.close is called more than once for this connection,
|
|
3096
|
+
// nothing to do. Just call the callback function and return.
|
|
3097
|
+
if( self.availablePool[connStr] &&
|
|
3098
|
+
self.availablePool[connStr].indexOf(db) >= 0 )
|
|
3099
|
+
{
|
|
3100
|
+
deferred ? deferred.resolve(true) : cb(null);
|
|
3101
|
+
return;
|
|
3102
|
+
}
|
|
3103
|
+
db.lastUsed = Date.now();
|
|
3104
|
+
|
|
3105
|
+
// If this connection has some active transaction, rollback the
|
|
3106
|
+
// transaction to free up the held resorces before moving back to
|
|
3107
|
+
// the pool. So that, next request can get afresh connection from pool.
|
|
3108
|
+
if(db.conn && db.conn.inTransaction)
|
|
3109
|
+
{
|
|
3110
|
+
db.rollbackTransaction(function(err){});
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
//remove this db from the usedPool
|
|
3114
|
+
if(self.usedPool[connStr]) {
|
|
3115
|
+
self.usedPool[connStr].splice(self.usedPool[connStr].indexOf(db), 1);
|
|
3116
|
+
self.poolSize--;
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
//move this connection back to the connection pool at the end.
|
|
3120
|
+
if(db.conn)
|
|
3121
|
+
{
|
|
3122
|
+
self.availablePool[connStr].push(db);
|
|
3123
|
+
self.poolSize++;
|
|
3124
|
+
}
|
|
3125
|
+
deferred ? deferred.resolve(true) : cb(null);
|
|
3126
|
+
|
|
3127
|
+
if(db.conn && self.options.autoCleanIdle) self.cleanUp(connStr);
|
|
3128
|
+
//if(exports.debug) {
|
|
3129
|
+
//process.stdout.write(getElapsedTime());
|
|
3130
|
+
//console.log(util.inspect(self, {depth: null}));
|
|
3131
|
+
//}
|
|
3132
|
+
return self.queue.next();
|
|
3133
|
+
}; // poolClose function
|
|
3134
|
+
|
|
3135
|
+
Pool.prototype.init = function(count, connStr)
|
|
3136
|
+
{
|
|
3137
|
+
var self = this;
|
|
3138
|
+
var ret = false;
|
|
3139
|
+
exports.debug && console.log(getElapsedTime(), "Max pool size at start of init = " + self.maxPoolSize);
|
|
3140
|
+
|
|
3141
|
+
//check to see if we already have a connection for this connection string
|
|
3142
|
+
if (self.availablePool[connStr] && self.availablePool[connStr].length)
|
|
3143
|
+
{
|
|
3144
|
+
console.log("Pool is already initialized and it has "+
|
|
3145
|
+
self.availablePool[connStr].length + " available connections.\n");
|
|
3146
|
+
return;
|
|
3147
|
+
}
|
|
3148
|
+
else if(count < 1) {
|
|
3149
|
+
let err = {};
|
|
3150
|
+
err["message"] = "Error: Count should be greater than 0. Pool not initialized.";
|
|
3151
|
+
exports.debug && console.log(getElapsedTime(), err.message);
|
|
3152
|
+
return err;
|
|
3153
|
+
}
|
|
3154
|
+
else
|
|
3155
|
+
{
|
|
3156
|
+
if((self.maxPoolSize > 0) && (count > self.maxPoolSize))
|
|
3157
|
+
{
|
|
3158
|
+
console.log(getElapsedTime(), " ** Can not open connection more than max pool size.\n");
|
|
3159
|
+
count = self.maxPoolSize;
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3162
|
+
if(typeof(self.options.odbc) === 'undefined')
|
|
3163
|
+
self.options.odbc = self.odbc;
|
|
3164
|
+
self.options.pool = self;
|
|
3165
|
+
self.options.connStr = connStr;
|
|
3166
|
+
for(var i = 0; i < count; i++)
|
|
3167
|
+
{
|
|
3168
|
+
var db = new Database(self.options);
|
|
3169
|
+
self.poolSize++;
|
|
3170
|
+
try{
|
|
3171
|
+
ret = db.openSync(connStr);
|
|
3172
|
+
} catch (ret) {
|
|
3173
|
+
self.poolSize--;
|
|
3174
|
+
exports.debug && console.log("%s odbc.js: %d connection(s) initialized.\n", getElapsedTime(), self.poolSize);
|
|
3175
|
+
return ret;
|
|
3176
|
+
}
|
|
3177
|
+
if(ret !== true) break;
|
|
3178
|
+
exports.debug && console.log("%s odbc.js : pool[%s] : pool.init %d", getElapsedTime(), self.index, i);
|
|
3179
|
+
|
|
3180
|
+
self.availablePool[connStr] = self.availablePool[connStr] || [];
|
|
3181
|
+
db.created = Date.now();
|
|
3182
|
+
|
|
3183
|
+
db.availablePool = self.availablePool[connStr] || [];
|
|
3184
|
+
self.availablePool[connStr].push(db);
|
|
3185
|
+
}
|
|
3186
|
+
self.usedPool[connStr] = self.usedPool[connStr] || [];
|
|
3187
|
+
exports.debug && console.log(getElapsedTime(), "Max pool size = " + self.maxPoolSize);
|
|
3188
|
+
exports.debug && console.log(getElapsedTime(), "Pool = ", self);
|
|
3189
|
+
return ret;
|
|
3190
|
+
}
|
|
3191
|
+
};// Pool.init()
|
|
3192
|
+
|
|
3193
|
+
// Initialize pool asynchronously
|
|
3194
|
+
Pool.prototype.initAsync = function(count, connStr, cb)
|
|
3195
|
+
{
|
|
3196
|
+
var self = this, deferred;
|
|
3197
|
+
var ret = false;
|
|
3198
|
+
exports.debug && console.log(getElapsedTime(), "Max pool size at start of init = " + self.maxPoolSize);
|
|
3199
|
+
|
|
3200
|
+
if (typeof(connStr) === "object")
|
|
3201
|
+
{
|
|
3202
|
+
let obj = connStr;
|
|
3203
|
+
connStr = "";
|
|
3204
|
+
|
|
3205
|
+
Object.keys(obj).forEach(function (key) {
|
|
3206
|
+
connStr += key + "=" + obj[key] + ";";
|
|
3207
|
+
});
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3210
|
+
if (!cb)
|
|
3211
|
+
{
|
|
3212
|
+
deferred = createDeferred();
|
|
3213
|
+
}
|
|
3214
|
+
//check to see if we already have a connection for this connection string
|
|
3215
|
+
if (self.availablePool[connStr] && self.availablePool[connStr].length)
|
|
3216
|
+
{
|
|
3217
|
+
console.log("Pool is already initialized and it has "+
|
|
3218
|
+
self.availablePool[connStr].length + " available connections.\n");
|
|
3219
|
+
deferred ? deferred.resolve(true) : cb(null);
|
|
3220
|
+
}
|
|
3221
|
+
else if(count < 1) {
|
|
3222
|
+
let err = {};
|
|
3223
|
+
err["message"] = "Error: Count should be greater than 0. Pool not initialized.";
|
|
3224
|
+
exports.debug && console.log(getElapsedTime(), err.message);
|
|
3225
|
+
deferred ? deferred.reject(err) : cb(err);
|
|
3226
|
+
}
|
|
3227
|
+
else
|
|
3228
|
+
{
|
|
3229
|
+
if((self.maxPoolSize > 0) && (count > self.maxPoolSize))
|
|
3230
|
+
{
|
|
3231
|
+
console.log(getElapsedTime(), " ** Can not open connection more than max pool size.\n");
|
|
3232
|
+
count = self.maxPoolSize;
|
|
3233
|
+
}
|
|
3234
|
+
|
|
3235
|
+
if(typeof(self.options.odbc) === 'undefined')
|
|
3236
|
+
self.options.odbc = self.odbc;
|
|
3237
|
+
self.options.pool = self;
|
|
3238
|
+
self.options.connStr = connStr;
|
|
3239
|
+
self.availablePool[connStr] = self.availablePool[connStr] || [];
|
|
3240
|
+
self.usedPool[connStr] = self.usedPool[connStr] || [];
|
|
3241
|
+
|
|
3242
|
+
for(var i = 0; i < count; i++)
|
|
3243
|
+
{
|
|
3244
|
+
(function (connNo) {
|
|
3245
|
+
var db = new Database(self.options);
|
|
3246
|
+
self.poolSize++;
|
|
3247
|
+
db.open(connStr, function(error) {
|
|
3248
|
+
if(error) {
|
|
3249
|
+
self.poolSize--;
|
|
3250
|
+
} else {
|
|
3251
|
+
exports.debug && console.log("%s odbc.js: %d connections initialized.\n",
|
|
3252
|
+
getElapsedTime(), self.poolSize);
|
|
3253
|
+
exports.debug && console.log("%s odbc.js : pool[%s] : pool.init %d",
|
|
3254
|
+
getElapsedTime(), self.index, connNo);
|
|
3255
|
+
|
|
3256
|
+
db.created = Date.now();
|
|
3257
|
+
db.availablePool = self.availablePool[connStr];
|
|
3258
|
+
self.availablePool[connStr].push(db);
|
|
3259
|
+
}
|
|
3260
|
+
if(connNo == count) {
|
|
3261
|
+
exports.debug && console.log(getElapsedTime(), "Pool = ", self);
|
|
3262
|
+
if(error) {
|
|
3263
|
+
deferred ? deferred.reject(error) : cb(error);
|
|
3264
|
+
} else {
|
|
3265
|
+
deferred ? deferred.resolve(true) : cb(null);
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
});
|
|
3269
|
+
})(i+1);
|
|
3270
|
+
}
|
|
3271
|
+
}
|
|
3272
|
+
return deferred ? deferred.promise : null;
|
|
3273
|
+
};// Pool.initAsync()
|
|
3274
|
+
|
|
3275
|
+
// No of active connections in pool should not grow more than maxPoolSize.
|
|
3276
|
+
// Run test/test-max-pool-size.js to test this functionality.
|
|
3277
|
+
Pool.prototype.setMaxPoolSize = function(size)
|
|
3278
|
+
{
|
|
3279
|
+
var self = this;
|
|
3280
|
+
self.maxPoolSize = size;
|
|
3281
|
+
exports.debug && console.log(getElapsedTime(), "Max pool size is set to " + self.maxPoolSize);
|
|
3282
|
+
return true;
|
|
3283
|
+
};
|
|
3284
|
+
|
|
3285
|
+
Pool.prototype.setConnectTimeout = function(timeout)
|
|
3286
|
+
{
|
|
3287
|
+
// Don't use this API. Will be removed in next major release.
|
|
3288
|
+
// It is just a place holder as of now to avoid breaking of
|
|
3289
|
+
// existing applications that uses it.
|
|
3290
|
+
|
|
3291
|
+
// Now there is no timeout for connection request from pool.
|
|
3292
|
+
// Once conn.close() get called for existing pooled connection,
|
|
3293
|
+
// the waiting connection request will get that connection from
|
|
3294
|
+
// pool as connection pooling uses now FIFO queue for new
|
|
3295
|
+
// connections beyond maxPoolSize.
|
|
3296
|
+
return true;
|
|
3297
|
+
};
|
|
3298
|
+
|
|
3299
|
+
// Close idle connections
|
|
3300
|
+
Pool.prototype.cleanUp = function(connStr) {
|
|
3301
|
+
var self = this;
|
|
3302
|
+
if(self.availablePool[connStr].length < 2) return;
|
|
3303
|
+
|
|
3304
|
+
self.availablePool[connStr] = self.availablePool[connStr].filter(function(conn)
|
|
3305
|
+
{
|
|
3306
|
+
if(conn.lastUsed &&
|
|
3307
|
+
(Date.now()-conn.lastUsed > (self.options.idleTimeout || 1800 * 1000)) &&
|
|
3308
|
+
conn.realClose )
|
|
3309
|
+
{
|
|
3310
|
+
conn.realClose(function()
|
|
3311
|
+
{
|
|
3312
|
+
if(self.poolSize) self.poolSize--;
|
|
3313
|
+
exports.debug && console.log("odbc.js : pool[%s] : Pool.cleanUp() : " +
|
|
3314
|
+
"pool.realClose() : Connection duration : %s", self.index,
|
|
3315
|
+
(Date.now() - conn.created)/1000);
|
|
3316
|
+
});
|
|
3317
|
+
return false;
|
|
3318
|
+
}
|
|
3319
|
+
else
|
|
3320
|
+
{
|
|
3321
|
+
return true;
|
|
3322
|
+
}
|
|
3323
|
+
});
|
|
3324
|
+
}; //Pool.cleanUp()
|
|
3325
|
+
|
|
3326
|
+
Pool.prototype.close = function (callback)
|
|
3327
|
+
{
|
|
3328
|
+
var self = this
|
|
3329
|
+
, required = 0
|
|
3330
|
+
, received = 0
|
|
3331
|
+
, connections
|
|
3332
|
+
, key
|
|
3333
|
+
, x
|
|
3334
|
+
, deferred
|
|
3335
|
+
;
|
|
3336
|
+
|
|
3337
|
+
if(!callback) {
|
|
3338
|
+
deferred = createDeferred();
|
|
3339
|
+
}
|
|
3340
|
+
exports.debug && console.log("%s odbc.js : pool[%s] : pool.close()", getElapsedTime(), self.index);
|
|
3341
|
+
//we set a timeout because a previous db.close() may
|
|
3342
|
+
//have caused db.open() behind the scenes to prepare
|
|
3343
|
+
//a new connection
|
|
3344
|
+
setTimeout(function () {
|
|
3345
|
+
//merge the available pool and the usedPool
|
|
3346
|
+
var pools = {};
|
|
3347
|
+
|
|
3348
|
+
for (key in self.availablePool)
|
|
3349
|
+
{
|
|
3350
|
+
pools[key] = (pools[key] || []).concat(self.availablePool[key]);
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3353
|
+
for (key in self.usedPool)
|
|
3354
|
+
{
|
|
3355
|
+
pools[key] = (pools[key] || []).concat(self.usedPool[key]);
|
|
3356
|
+
}
|
|
3357
|
+
|
|
3358
|
+
exports.debug && console.log("%s odbc.js : pool[%s] : pool.close() - setTimeout() callback", getElapsedTime(), self.index);
|
|
3359
|
+
//console.dir(pools);
|
|
3360
|
+
|
|
3361
|
+
if (Object.keys(pools).length === 0)
|
|
3362
|
+
{
|
|
3363
|
+
if (callback) return callback();
|
|
3364
|
+
else return deferred.resolve(true);
|
|
3365
|
+
}
|
|
3366
|
+
|
|
3367
|
+
for (key in pools)
|
|
3368
|
+
{
|
|
3369
|
+
connections = pools[key];
|
|
3370
|
+
var connLen = connections.length;
|
|
3371
|
+
required += connLen;
|
|
3372
|
+
|
|
3373
|
+
if(exports.debug) {
|
|
3374
|
+
console.log("%s odbc.js : pool[%s] : pool.close() - processing pools - connections: %s",
|
|
3375
|
+
getElapsedTime(), self.index, connections.length);
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
for (x = 0 ; x < connLen; x ++)
|
|
3379
|
+
{
|
|
3380
|
+
(function (x) {
|
|
3381
|
+
//call the realClose method to avoid
|
|
3382
|
+
//automatically re-opening the connection
|
|
3383
|
+
if(exports.debug) {
|
|
3384
|
+
console.log("%s odbc.js : pool[%s] : pool.close() - calling realClose() for connection #%s",
|
|
3385
|
+
getElapsedTime(), self.index, x + 1);
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
if(connections[x].realClose) {
|
|
3389
|
+
connections[x].realClose(function () {
|
|
3390
|
+
if(exports.debug) {
|
|
3391
|
+
console.log("%s odbc.js : pool[%s] : pool.close() - realClose() callback for connection #%s",
|
|
3392
|
+
getElapsedTime(), self.index, x + 1);
|
|
3393
|
+
}
|
|
3394
|
+
module.exports.close(connections[x]);
|
|
3395
|
+
received += 1;
|
|
3396
|
+
if(self.poolSize) self.poolSize--;
|
|
3397
|
+
|
|
3398
|
+
if (received === required)
|
|
3399
|
+
{
|
|
3400
|
+
deferred ? deferred.resolve(true) : callback();
|
|
3401
|
+
|
|
3402
|
+
//prevent mem leaks
|
|
3403
|
+
self = null;
|
|
3404
|
+
connections = null;
|
|
3405
|
+
required = null;
|
|
3406
|
+
received = null;
|
|
3407
|
+
key = null;
|
|
3408
|
+
|
|
3409
|
+
return;
|
|
3410
|
+
}
|
|
3411
|
+
}); // connections[x].realClose i.e. conn.close().
|
|
3412
|
+
}
|
|
3413
|
+
else {
|
|
3414
|
+
exports.debug && console.log("%s realClose is not a member of connection %s", getElapsedTime(), x + 1);
|
|
3415
|
+
}
|
|
3416
|
+
})(x);
|
|
3417
|
+
} //for loop.
|
|
3418
|
+
} //for (key in pools)
|
|
3419
|
+
}, 2000); //setTimeout
|
|
3420
|
+
return deferred ? deferred.promise : null;
|
|
3421
|
+
}; //Pool.close()
|
|
3422
|
+
|
|
3423
|
+
Pool.prototype.closeSync = function ()
|
|
3424
|
+
{
|
|
3425
|
+
var self = this
|
|
3426
|
+
, connections
|
|
3427
|
+
, key
|
|
3428
|
+
, x, error
|
|
3429
|
+
;
|
|
3430
|
+
|
|
3431
|
+
exports.debug && console.log("%s odbc.js : pool[%s] : pool.closeSync()", getElapsedTime(), self.index);
|
|
3432
|
+
|
|
3433
|
+
//merge the available pool and the usedPool
|
|
3434
|
+
var pools = {};
|
|
3435
|
+
|
|
3436
|
+
for (key in self.availablePool)
|
|
3437
|
+
{
|
|
3438
|
+
pools[key] = (pools[key] || []).concat(self.availablePool[key]);
|
|
3439
|
+
}
|
|
3440
|
+
for (key in self.usedPool)
|
|
3441
|
+
{
|
|
3442
|
+
pools[key] = (pools[key] || []).concat(self.usedPool[key]);
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
if (Object.keys(pools).length === 0)
|
|
3446
|
+
{
|
|
3447
|
+
return null;
|
|
3448
|
+
}
|
|
3449
|
+
|
|
3450
|
+
for (key in pools)
|
|
3451
|
+
{
|
|
3452
|
+
connections = pools[key];
|
|
3453
|
+
var connLen = connections.length;
|
|
3454
|
+
|
|
3455
|
+
if(exports.debug) {
|
|
3456
|
+
console.log("%s odbc.js : pool[%s] : pool.closeSync() - processing pools - connections: %s",
|
|
3457
|
+
getElapsedTime(), self.index, connLen);
|
|
3458
|
+
}
|
|
3459
|
+
|
|
3460
|
+
for (x = 0 ; x < connLen; x ++)
|
|
3461
|
+
{
|
|
3462
|
+
if(exports.debug) {
|
|
3463
|
+
console.log("%s odbc.js : pool[%s] : pool.closeSync() - calling realClose() for connection #%s",
|
|
3464
|
+
getElapsedTime(), self.index, x + 1);
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
if(connections[x].realCloseSync) {
|
|
3468
|
+
error = connections[x].realCloseSync();
|
|
3469
|
+
module.exports.close(connections[x]);
|
|
3470
|
+
if(self.poolSize) self.poolSize--;
|
|
3471
|
+
}
|
|
3472
|
+
else {
|
|
3473
|
+
exports.debug && console.log("%s realCloseSync is not a member of connection %s", getElapsedTime(), x + 1);
|
|
3474
|
+
}
|
|
3475
|
+
}
|
|
3476
|
+
} //for (key in pools)
|
|
3477
|
+
self = null;
|
|
3478
|
+
return error;
|
|
3479
|
+
}; //Pool.closeSync()
|
|
3480
|
+
|
|
3481
|
+
|
|
3482
|
+
// Add attributes from climacros.js
|
|
3483
|
+
var attr;
|
|
3484
|
+
for (attr in macro.attributes) {
|
|
3485
|
+
module.exports[attr] = macro.attributes[attr];
|
|
3486
|
+
}
|
|
3487
|
+
|