plugin-data-source-mssql 2.0.0 → 2.0.2
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 +31 -10
- package/dist/externalVersion.js +6 -6
- package/dist/node_modules/tedious/245.index.js +741 -0
- package/dist/node_modules/tedious/LICENSE +21 -0
- package/dist/node_modules/tedious/appveyor.yml +67 -0
- package/dist/node_modules/tedious/benchmarks/bulk-load/iterable.js +61 -0
- package/dist/node_modules/tedious/benchmarks/common.js +287 -0
- package/dist/node_modules/tedious/benchmarks/connection/open.js +26 -0
- package/dist/node_modules/tedious/benchmarks/package-lock.json +21173 -0
- package/dist/node_modules/tedious/benchmarks/package.json +11 -0
- package/dist/node_modules/tedious/benchmarks/query/call-tvp.js +105 -0
- package/dist/node_modules/tedious/benchmarks/query/insert-varbinary.js +46 -0
- package/dist/node_modules/tedious/benchmarks/query/select-many-rows.js +63 -0
- package/dist/node_modules/tedious/benchmarks/query/select-nvarchar.js +50 -0
- package/dist/node_modules/tedious/benchmarks/query/select-varbinary.js +50 -0
- package/dist/node_modules/tedious/benchmarks/request/rpcrequest-payload-tvp.js +45 -0
- package/dist/node_modules/tedious/benchmarks/request/rpcrequest-payload-varbinary.js +37 -0
- package/dist/node_modules/tedious/benchmarks/token-parser/colmetadata-token.js +27 -0
- package/dist/node_modules/tedious/benchmarks/token-parser/done-token.js +28 -0
- package/dist/node_modules/tedious/benchmarks/token-parser/simple-tokens.js +363 -0
- package/dist/node_modules/tedious/lib/all-headers.d.ts +2 -0
- package/dist/node_modules/tedious/lib/all-headers.js +24 -0
- package/dist/node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-algorithm.js +82 -0
- package/dist/node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-encryption-key.js +55 -0
- package/dist/node_modules/tedious/lib/always-encrypted/cek-entry.d.ts +11 -0
- package/dist/node_modules/tedious/lib/always-encrypted/cek-entry.js +42 -0
- package/dist/node_modules/tedious/lib/always-encrypted/get-parameter-encryption-metadata.js +90 -0
- package/dist/node_modules/tedious/lib/always-encrypted/key-crypto.js +94 -0
- package/dist/node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.d.ts +21 -0
- package/dist/node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.js +247 -0
- package/dist/node_modules/tedious/lib/always-encrypted/symmetric-key-cache.js +36 -0
- package/dist/node_modules/tedious/lib/always-encrypted/symmetric-key.js +25 -0
- package/dist/node_modules/tedious/lib/always-encrypted/types.d.ts +73 -0
- package/dist/node_modules/tedious/lib/always-encrypted/types.js +48 -0
- package/dist/node_modules/tedious/lib/always-encrypted/utils.js +23 -0
- package/dist/node_modules/tedious/lib/bulk-load-payload.d.ts +8 -0
- package/dist/node_modules/tedious/lib/bulk-load-payload.js +23 -0
- package/dist/node_modules/tedious/lib/bulk-load.d.ts +275 -0
- package/dist/node_modules/tedious/lib/bulk-load.js +516 -0
- package/dist/node_modules/tedious/lib/collation.d.ts +28 -0
- package/dist/node_modules/tedious/lib/collation.js +348 -0
- package/dist/node_modules/tedious/lib/connection.d.ts +1310 -0
- package/dist/node_modules/tedious/lib/connection.js +2730 -0
- package/dist/node_modules/tedious/lib/connector.d.ts +18 -0
- package/dist/node_modules/tedious/lib/connector.js +150 -0
- package/dist/node_modules/tedious/lib/data-type.d.ts +455 -0
- package/dist/node_modules/tedious/lib/data-type.js +428 -0
- package/dist/node_modules/tedious/lib/data-types/bigint.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/bigint.js +53 -0
- package/dist/node_modules/tedious/lib/data-types/binary.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/binary.js +67 -0
- package/dist/node_modules/tedious/lib/data-types/bit.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/bit.js +46 -0
- package/dist/node_modules/tedious/lib/data-types/bitn.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/bitn.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/char.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/char.js +86 -0
- package/dist/node_modules/tedious/lib/data-types/date.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/date.js +72 -0
- package/dist/node_modules/tedious/lib/data-types/datetime.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/datetime.js +93 -0
- package/dist/node_modules/tedious/lib/data-types/datetime2.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/datetime2.js +118 -0
- package/dist/node_modules/tedious/lib/data-types/datetimen.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/datetimen.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/datetimeoffset.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/datetimeoffset.js +111 -0
- package/dist/node_modules/tedious/lib/data-types/decimal.d.ts +6 -0
- package/dist/node_modules/tedious/lib/data-types/decimal.js +107 -0
- package/dist/node_modules/tedious/lib/data-types/decimaln.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/decimaln.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/float.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/float.js +47 -0
- package/dist/node_modules/tedious/lib/data-types/floatn.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/floatn.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/image.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/image.js +56 -0
- package/dist/node_modules/tedious/lib/data-types/int.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/int.js +53 -0
- package/dist/node_modules/tedious/lib/data-types/intn.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/intn.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/money.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/money.js +59 -0
- package/dist/node_modules/tedious/lib/data-types/moneyn.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/moneyn.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/nchar.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/nchar.js +100 -0
- package/dist/node_modules/tedious/lib/data-types/ntext.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/ntext.js +60 -0
- package/dist/node_modules/tedious/lib/data-types/null.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/null.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/numeric.d.ts +6 -0
- package/dist/node_modules/tedious/lib/data-types/numeric.js +106 -0
- package/dist/node_modules/tedious/lib/data-types/numericn.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/numericn.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/nvarchar.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/nvarchar.js +133 -0
- package/dist/node_modules/tedious/lib/data-types/real.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/real.js +48 -0
- package/dist/node_modules/tedious/lib/data-types/smalldatetime.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/smalldatetime.js +83 -0
- package/dist/node_modules/tedious/lib/data-types/smallint.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/smallint.js +53 -0
- package/dist/node_modules/tedious/lib/data-types/smallmoney.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/smallmoney.js +51 -0
- package/dist/node_modules/tedious/lib/data-types/sql-variant.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/sql-variant.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/text.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/text.js +69 -0
- package/dist/node_modules/tedious/lib/data-types/time.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/time.js +96 -0
- package/dist/node_modules/tedious/lib/data-types/tinyint.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/tinyint.js +53 -0
- package/dist/node_modules/tedious/lib/data-types/tvp.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/tvp.js +117 -0
- package/dist/node_modules/tedious/lib/data-types/udt.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/udt.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/uniqueidentifier.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/uniqueidentifier.js +50 -0
- package/dist/node_modules/tedious/lib/data-types/varbinary.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/varbinary.js +119 -0
- package/dist/node_modules/tedious/lib/data-types/varchar.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/varchar.js +112 -0
- package/dist/node_modules/tedious/lib/data-types/xml.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/xml.js +29 -0
- package/dist/node_modules/tedious/lib/debug.d.ts +25 -0
- package/dist/node_modules/tedious/lib/debug.js +67 -0
- package/dist/node_modules/tedious/lib/errors/abort-error.d.ts +4 -0
- package/dist/node_modules/tedious/lib/errors/abort-error.js +15 -0
- package/dist/node_modules/tedious/lib/errors/timeout-error.d.ts +4 -0
- package/dist/node_modules/tedious/lib/errors/timeout-error.js +15 -0
- package/dist/node_modules/tedious/lib/errors.d.ts +17 -0
- package/dist/node_modules/tedious/lib/errors.js +23 -0
- package/dist/node_modules/tedious/lib/guid-parser.d.ts +3 -0
- package/dist/node_modules/tedious/lib/guid-parser.js +30 -0
- package/dist/node_modules/tedious/lib/incoming-message-stream.d.ts +19 -0
- package/dist/node_modules/tedious/lib/incoming-message-stream.js +97 -0
- package/dist/node_modules/tedious/lib/instance-lookup.d.ts +13 -0
- package/dist/node_modules/tedious/lib/instance-lookup.js +96 -0
- package/dist/node_modules/tedious/lib/library.d.ts +1 -0
- package/dist/node_modules/tedious/lib/library.js +8 -0
- package/dist/node_modules/tedious/lib/login7-payload.d.ts +51 -0
- package/dist/node_modules/tedious/lib/login7-payload.js +402 -0
- package/dist/node_modules/tedious/lib/message-io.d.ts +28 -0
- package/dist/node_modules/tedious/lib/message-io.js +153 -0
- package/dist/node_modules/tedious/lib/message.d.ts +11 -0
- package/dist/node_modules/tedious/lib/message.js +21 -0
- package/dist/node_modules/tedious/lib/metadata-parser.d.ts +48 -0
- package/dist/node_modules/tedious/lib/metadata-parser.js +380 -0
- package/dist/node_modules/tedious/lib/ntlm-payload.d.ts +23 -0
- package/dist/node_modules/tedious/lib/ntlm-payload.js +136 -0
- package/dist/node_modules/tedious/lib/ntlm.d.ts +4 -0
- package/dist/node_modules/tedious/lib/ntlm.js +72 -0
- package/dist/node_modules/tedious/lib/outgoing-message-stream.d.ts +15 -0
- package/dist/node_modules/tedious/lib/outgoing-message-stream.js +81 -0
- package/dist/node_modules/tedious/lib/packet.d.ts +33 -0
- package/dist/node_modules/tedious/lib/packet.js +191 -0
- package/dist/node_modules/tedious/lib/prelogin-payload.d.ts +61 -0
- package/dist/node_modules/tedious/lib/prelogin-payload.js +209 -0
- package/dist/node_modules/tedious/lib/request.d.ts +370 -0
- package/dist/node_modules/tedious/lib/request.js +387 -0
- package/dist/node_modules/tedious/lib/rpcrequest-payload.d.ts +16 -0
- package/dist/node_modules/tedious/lib/rpcrequest-payload.js +109 -0
- package/dist/node_modules/tedious/lib/sender.d.ts +5 -0
- package/dist/node_modules/tedious/lib/sender.js +83 -0
- package/dist/node_modules/tedious/lib/special-stored-procedure.d.ts +18 -0
- package/dist/node_modules/tedious/lib/special-stored-procedure.js +26 -0
- package/dist/node_modules/tedious/lib/sqlbatch-payload.d.ts +13 -0
- package/dist/node_modules/tedious/lib/sqlbatch-payload.js +34 -0
- package/dist/node_modules/tedious/lib/tds-versions.d.ts +6 -0
- package/dist/node_modules/tedious/lib/tds-versions.js +19 -0
- package/dist/node_modules/tedious/lib/tedious.d.ts +13 -0
- package/dist/node_modules/tedious/lib/tedious.js +249 -0
- package/dist/node_modules/tedious/lib/token/colmetadata-token-parser.d.ts +12 -0
- package/dist/node_modules/tedious/lib/token/colmetadata-token-parser.js +124 -0
- package/dist/node_modules/tedious/lib/token/done-token-parser.d.ts +6 -0
- package/dist/node_modules/tedious/lib/token/done-token-parser.js +76 -0
- package/dist/node_modules/tedious/lib/token/env-change-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/env-change-token-parser.js +190 -0
- package/dist/node_modules/tedious/lib/token/feature-ext-ack-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/feature-ext-ack-parser.js +52 -0
- package/dist/node_modules/tedious/lib/token/fedauth-info-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/fedauth-info-parser.js +62 -0
- package/dist/node_modules/tedious/lib/token/handler.d.ts +135 -0
- package/dist/node_modules/tedious/lib/token/handler.js +444 -0
- package/dist/node_modules/tedious/lib/token/helpers.d.ts +28 -0
- package/dist/node_modules/tedious/lib/token/helpers.js +205 -0
- package/dist/node_modules/tedious/lib/token/infoerror-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/infoerror-token-parser.js +80 -0
- package/dist/node_modules/tedious/lib/token/loginack-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/loginack-token-parser.js +75 -0
- package/dist/node_modules/tedious/lib/token/nbcrow-token-parser.d.ts +4 -0
- package/dist/node_modules/tedious/lib/token/nbcrow-token-parser.js +104 -0
- package/dist/node_modules/tedious/lib/token/order-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/order-token-parser.js +34 -0
- package/dist/node_modules/tedious/lib/token/returnstatus-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/returnstatus-token-parser.js +21 -0
- package/dist/node_modules/tedious/lib/token/returnvalue-token-parser.d.ts +4 -0
- package/dist/node_modules/tedious/lib/token/returnvalue-token-parser.js +94 -0
- package/dist/node_modules/tedious/lib/token/row-token-parser.d.ts +4 -0
- package/dist/node_modules/tedious/lib/token/row-token-parser.js +77 -0
- package/dist/node_modules/tedious/lib/token/sspi-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/sspi-token-parser.js +42 -0
- package/dist/node_modules/tedious/lib/token/stream-parser.d.ts +34 -0
- package/dist/node_modules/tedious/lib/token/stream-parser.js +341 -0
- package/dist/node_modules/tedious/lib/token/token-stream-parser.d.ts +15 -0
- package/dist/node_modules/tedious/lib/token/token-stream-parser.js +36 -0
- package/dist/node_modules/tedious/lib/token/token.d.ts +312 -0
- package/dist/node_modules/tedious/lib/token/token.js +328 -0
- package/dist/node_modules/tedious/lib/tracking-buffer/writable-tracking-buffer.d.ts +47 -0
- package/dist/node_modules/tedious/lib/tracking-buffer/writable-tracking-buffer.js +249 -0
- package/dist/node_modules/tedious/lib/transaction.d.ts +39 -0
- package/dist/node_modules/tedious/lib/transaction.js +137 -0
- package/dist/node_modules/tedious/lib/transient-error-lookup.d.ts +3 -0
- package/dist/node_modules/tedious/lib/transient-error-lookup.js +19 -0
- package/dist/node_modules/tedious/lib/utils/with-timeout.d.ts +7 -0
- package/dist/node_modules/tedious/lib/utils/with-timeout.js +36 -0
- package/dist/node_modules/tedious/lib/value-parser.d.ts +7 -0
- package/dist/node_modules/tedious/lib/value-parser.js +813 -0
- package/dist/node_modules/tedious/node_modules/@types/node/assert/strict.d.ts +105 -0
- package/dist/node_modules/tedious/node_modules/@types/node/assert.d.ts +955 -0
- package/dist/node_modules/tedious/node_modules/@types/node/async_hooks.d.ts +623 -0
- package/dist/node_modules/tedious/node_modules/@types/node/buffer.buffer.d.ts +466 -0
- package/dist/node_modules/tedious/node_modules/@types/node/buffer.d.ts +1810 -0
- package/dist/node_modules/tedious/node_modules/@types/node/child_process.d.ts +1428 -0
- package/dist/node_modules/tedious/node_modules/@types/node/cluster.d.ts +486 -0
- package/dist/node_modules/tedious/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/dist/node_modules/tedious/node_modules/@types/node/console.d.ts +151 -0
- package/dist/node_modules/tedious/node_modules/@types/node/constants.d.ts +20 -0
- package/dist/node_modules/tedious/node_modules/@types/node/crypto.d.ts +4065 -0
- package/dist/node_modules/tedious/node_modules/@types/node/dgram.d.ts +564 -0
- package/dist/node_modules/tedious/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
- package/dist/node_modules/tedious/node_modules/@types/node/dns/promises.d.ts +503 -0
- package/dist/node_modules/tedious/node_modules/@types/node/dns.d.ts +922 -0
- package/dist/node_modules/tedious/node_modules/@types/node/domain.d.ts +166 -0
- package/dist/node_modules/tedious/node_modules/@types/node/events.d.ts +1054 -0
- package/dist/node_modules/tedious/node_modules/@types/node/fs/promises.d.ts +1329 -0
- package/dist/node_modules/tedious/node_modules/@types/node/fs.d.ts +4676 -0
- package/dist/node_modules/tedious/node_modules/@types/node/globals.d.ts +150 -0
- package/dist/node_modules/tedious/node_modules/@types/node/globals.typedarray.d.ts +101 -0
- package/dist/node_modules/tedious/node_modules/@types/node/http.d.ts +2167 -0
- package/dist/node_modules/tedious/node_modules/@types/node/http2.d.ts +2480 -0
- package/dist/node_modules/tedious/node_modules/@types/node/https.d.ts +405 -0
- package/dist/node_modules/tedious/node_modules/@types/node/index.d.ts +115 -0
- package/dist/node_modules/tedious/node_modules/@types/node/inspector/promises.d.ts +41 -0
- package/dist/node_modules/tedious/node_modules/@types/node/inspector.d.ts +224 -0
- package/dist/node_modules/tedious/node_modules/@types/node/inspector.generated.d.ts +4226 -0
- package/dist/node_modules/tedious/node_modules/@types/node/module.d.ts +819 -0
- package/dist/node_modules/tedious/node_modules/@types/node/net.d.ts +933 -0
- package/dist/node_modules/tedious/node_modules/@types/node/os.d.ts +507 -0
- package/dist/node_modules/tedious/node_modules/@types/node/package.json +155 -0
- package/dist/node_modules/tedious/node_modules/@types/node/path/posix.d.ts +8 -0
- package/dist/node_modules/tedious/node_modules/@types/node/path/win32.d.ts +8 -0
- package/dist/node_modules/tedious/node_modules/@types/node/path.d.ts +187 -0
- package/dist/node_modules/tedious/node_modules/@types/node/perf_hooks.d.ts +643 -0
- package/dist/node_modules/tedious/node_modules/@types/node/process.d.ts +2161 -0
- package/dist/node_modules/tedious/node_modules/@types/node/punycode.d.ts +117 -0
- package/dist/node_modules/tedious/node_modules/@types/node/querystring.d.ts +152 -0
- package/dist/node_modules/tedious/node_modules/@types/node/quic.d.ts +910 -0
- package/dist/node_modules/tedious/node_modules/@types/node/readline/promises.d.ts +161 -0
- package/dist/node_modules/tedious/node_modules/@types/node/readline.d.ts +541 -0
- package/dist/node_modules/tedious/node_modules/@types/node/repl.d.ts +415 -0
- package/dist/node_modules/tedious/node_modules/@types/node/sea.d.ts +162 -0
- package/dist/node_modules/tedious/node_modules/@types/node/sqlite.d.ts +955 -0
- package/dist/node_modules/tedious/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/dist/node_modules/tedious/node_modules/@types/node/stream/promises.d.ts +211 -0
- package/dist/node_modules/tedious/node_modules/@types/node/stream/web.d.ts +296 -0
- package/dist/node_modules/tedious/node_modules/@types/node/stream.d.ts +1760 -0
- package/dist/node_modules/tedious/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/dist/node_modules/tedious/node_modules/@types/node/test/reporters.d.ts +96 -0
- package/dist/node_modules/tedious/node_modules/@types/node/test.d.ts +2240 -0
- package/dist/node_modules/tedious/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/dist/node_modules/tedious/node_modules/@types/node/timers.d.ts +159 -0
- package/dist/node_modules/tedious/node_modules/@types/node/tls.d.ts +1198 -0
- package/dist/node_modules/tedious/node_modules/@types/node/trace_events.d.ts +197 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/index.d.ts +117 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.7/index.d.ts +117 -0
- package/dist/node_modules/tedious/node_modules/@types/node/tty.d.ts +250 -0
- package/dist/node_modules/tedious/node_modules/@types/node/url.d.ts +519 -0
- package/dist/node_modules/tedious/node_modules/@types/node/util/types.d.ts +558 -0
- package/dist/node_modules/tedious/node_modules/@types/node/util.d.ts +1662 -0
- package/dist/node_modules/tedious/node_modules/@types/node/v8.d.ts +983 -0
- package/dist/node_modules/tedious/node_modules/@types/node/vm.d.ts +1208 -0
- package/dist/node_modules/tedious/node_modules/@types/node/wasi.d.ts +202 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/events.d.ts +106 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/dist/node_modules/tedious/node_modules/@types/node/worker_threads.d.ts +717 -0
- package/dist/node_modules/tedious/node_modules/@types/node/zlib.d.ts +618 -0
- package/dist/node_modules/tedious/node_modules/bl/.github/dependabot.yml +16 -0
- package/dist/node_modules/tedious/node_modules/bl/.github/workflows/test-and-release.yml +61 -0
- package/dist/node_modules/tedious/node_modules/bl/BufferList.d.ts +431 -0
- package/dist/node_modules/tedious/node_modules/bl/BufferList.js +421 -0
- package/dist/node_modules/tedious/node_modules/bl/bl.js +84 -0
- package/dist/node_modules/tedious/node_modules/bl/index.d.ts +88 -0
- package/dist/node_modules/tedious/node_modules/bl/package.json +123 -0
- package/dist/node_modules/tedious/node_modules/bl/test/convert.js +21 -0
- package/dist/node_modules/tedious/node_modules/bl/test/indexOf.js +492 -0
- package/dist/node_modules/tedious/node_modules/bl/test/isBufferList.js +32 -0
- package/dist/node_modules/tedious/node_modules/bl/test/test.js +1032 -0
- package/dist/node_modules/tedious/node_modules/buffer/index.d.ts +194 -0
- package/dist/node_modules/tedious/node_modules/buffer/index.js +2106 -0
- package/dist/node_modules/tedious/node_modules/buffer/package.json +93 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_readable.js +4 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_transform.js +4 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_writable.js +4 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +286 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/legacy.js +89 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/readable.js +1290 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/utils.js +327 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/writable.js +819 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/validators.js +530 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/browser.js +35 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/errors.js +343 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/index.js +65 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/primordials.js +124 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/util/inspect.js +55 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/util.js +148 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/stream/promises.js +43 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/stream.js +143 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/package.json +88 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/dist/.gitattributes +4 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/dist/angular-sprintf.min.js +3 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/dist/sprintf.min.js +3 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/package.json +35 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/src/angular-sprintf.js +24 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/src/sprintf.js +231 -0
- package/dist/node_modules/tedious/node_modules/undici-types/agent.d.ts +32 -0
- package/dist/node_modules/tedious/node_modules/undici-types/api.d.ts +43 -0
- package/dist/node_modules/tedious/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/dist/node_modules/tedious/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- package/dist/node_modules/tedious/node_modules/undici-types/cache.d.ts +36 -0
- package/dist/node_modules/tedious/node_modules/undici-types/client-stats.d.ts +15 -0
- package/dist/node_modules/tedious/node_modules/undici-types/client.d.ts +108 -0
- package/dist/node_modules/tedious/node_modules/undici-types/connector.d.ts +34 -0
- package/dist/node_modules/tedious/node_modules/undici-types/content-type.d.ts +21 -0
- package/dist/node_modules/tedious/node_modules/undici-types/cookies.d.ts +30 -0
- package/dist/node_modules/tedious/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- package/dist/node_modules/tedious/node_modules/undici-types/dispatcher.d.ts +276 -0
- package/dist/node_modules/tedious/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/dist/node_modules/tedious/node_modules/undici-types/errors.d.ts +161 -0
- package/dist/node_modules/tedious/node_modules/undici-types/eventsource.d.ts +66 -0
- package/dist/node_modules/tedious/node_modules/undici-types/fetch.d.ts +211 -0
- package/dist/node_modules/tedious/node_modules/undici-types/formdata.d.ts +108 -0
- package/dist/node_modules/tedious/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/dist/node_modules/tedious/node_modules/undici-types/global-origin.d.ts +7 -0
- package/dist/node_modules/tedious/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/dist/node_modules/tedious/node_modules/undici-types/handlers.d.ts +15 -0
- package/dist/node_modules/tedious/node_modules/undici-types/header.d.ts +160 -0
- package/dist/node_modules/tedious/node_modules/undici-types/index.d.ts +80 -0
- package/dist/node_modules/tedious/node_modules/undici-types/interceptors.d.ts +39 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-agent.d.ts +68 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-client.d.ts +27 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-pool.d.ts +27 -0
- package/dist/node_modules/tedious/node_modules/undici-types/package.json +55 -0
- package/dist/node_modules/tedious/node_modules/undici-types/patch.d.ts +29 -0
- package/dist/node_modules/tedious/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/dist/node_modules/tedious/node_modules/undici-types/pool.d.ts +41 -0
- package/dist/node_modules/tedious/node_modules/undici-types/proxy-agent.d.ts +29 -0
- package/dist/node_modules/tedious/node_modules/undici-types/readable.d.ts +68 -0
- package/dist/node_modules/tedious/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/dist/node_modules/tedious/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/dist/node_modules/tedious/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/dist/node_modules/tedious/node_modules/undici-types/util.d.ts +18 -0
- package/dist/node_modules/tedious/node_modules/undici-types/utility.d.ts +7 -0
- package/dist/node_modules/tedious/node_modules/undici-types/webidl.d.ts +341 -0
- package/dist/node_modules/tedious/node_modules/undici-types/websocket.d.ts +186 -0
- package/dist/node_modules/tedious/package.json +1 -0
- package/dist/node_modules/tedious/tsconfig.build-types.json +15 -0
- package/dist/node_modules/tedious/tsconfig.json +29 -0
- package/dist/node_modules/tedious/types/js-md4.d.ts +7 -0
- package/dist/node_modules/tedious/types/native-duplexpair.d.ts +12 -0
- package/dist/server/data-source/MssqlExternalDataSource.js +23 -2
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2010-2018 Mike D Pilsbury
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
version: "{build}"
|
|
2
|
+
|
|
3
|
+
environment:
|
|
4
|
+
matrix:
|
|
5
|
+
- nodejs_version: "18"
|
|
6
|
+
- nodejs_version: "20"
|
|
7
|
+
- nodejs_version: "21"
|
|
8
|
+
|
|
9
|
+
branches:
|
|
10
|
+
only:
|
|
11
|
+
- master
|
|
12
|
+
- /^maint\/.+/
|
|
13
|
+
- /v\d+\.\d+\.\d+/
|
|
14
|
+
|
|
15
|
+
install:
|
|
16
|
+
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
|
|
17
|
+
- npm install
|
|
18
|
+
|
|
19
|
+
services:
|
|
20
|
+
- mssql2017
|
|
21
|
+
|
|
22
|
+
cache:
|
|
23
|
+
- node_modules
|
|
24
|
+
|
|
25
|
+
build: off
|
|
26
|
+
|
|
27
|
+
before_test:
|
|
28
|
+
- npm prune
|
|
29
|
+
|
|
30
|
+
- sc config sqlbrowser start= auto
|
|
31
|
+
- net start sqlbrowser
|
|
32
|
+
|
|
33
|
+
test_script:
|
|
34
|
+
- node --version
|
|
35
|
+
- npm --version
|
|
36
|
+
|
|
37
|
+
- pwsh: |-
|
|
38
|
+
$ErrorActionPreference = "Stop"
|
|
39
|
+
|
|
40
|
+
npm run-script test
|
|
41
|
+
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
42
|
+
|
|
43
|
+
Copy-Item -Force test/config.appveyor.ts test/config.ts
|
|
44
|
+
|
|
45
|
+
$env:NTLM_USERNAME = $env:USERNAME
|
|
46
|
+
$env:NTLM_PASSWORD = [Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword", '')
|
|
47
|
+
$env:NTLM_DOMAIN = $env:COMPUTERNAME
|
|
48
|
+
|
|
49
|
+
$env:TEDIOUS_TDS_VERSION = '7_4'
|
|
50
|
+
npm run-script test-integration
|
|
51
|
+
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
52
|
+
|
|
53
|
+
$env:TEDIOUS_TDS_VERSION = '7_3_B'
|
|
54
|
+
npm run-script test-integration
|
|
55
|
+
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
56
|
+
|
|
57
|
+
$env:TEDIOUS_TDS_VERSION = '7_3_A'
|
|
58
|
+
npm run-script test-integration
|
|
59
|
+
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
60
|
+
|
|
61
|
+
$env:TEDIOUS_TDS_VERSION = '7_2'
|
|
62
|
+
npm run-script test-integration
|
|
63
|
+
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
64
|
+
|
|
65
|
+
$env:TEDIOUS_TDS_VERSION = '7_1'
|
|
66
|
+
npm run-script test-integration
|
|
67
|
+
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
const { createBenchmark, createConnection } = require('../common');
|
|
4
|
+
|
|
5
|
+
const { Request, TYPES } = require('tedious');
|
|
6
|
+
|
|
7
|
+
const bench = createBenchmark(main, {
|
|
8
|
+
n: [10, 100],
|
|
9
|
+
size: [
|
|
10
|
+
10,
|
|
11
|
+
100,
|
|
12
|
+
1000,
|
|
13
|
+
10000
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
function main({ n, size }) {
|
|
18
|
+
createConnection((connection) => {
|
|
19
|
+
const request = new Request(`
|
|
20
|
+
CREATE TABLE "#tmpTestTable" (
|
|
21
|
+
"id" int NOT NULL
|
|
22
|
+
)
|
|
23
|
+
`, (err) => {
|
|
24
|
+
if (err) {
|
|
25
|
+
throw err;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let i = 0;
|
|
29
|
+
|
|
30
|
+
bench.start();
|
|
31
|
+
|
|
32
|
+
(function cb() {
|
|
33
|
+
const bulkLoad = connection.newBulkLoad('#tmpTestTable', (err) => {
|
|
34
|
+
if (err) {
|
|
35
|
+
throw err;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (i++ === n) {
|
|
39
|
+
bench.end(n);
|
|
40
|
+
|
|
41
|
+
connection.close();
|
|
42
|
+
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
cb();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
bulkLoad.addColumn('id', TYPES.Int, { nullable: false });
|
|
50
|
+
|
|
51
|
+
const rows = [];
|
|
52
|
+
for (let j = 0; j < size; j++) {
|
|
53
|
+
rows.push([ j ]);
|
|
54
|
+
}
|
|
55
|
+
connection.execBulkLoad(bulkLoad, rows);
|
|
56
|
+
})();
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
connection.execSqlBatch(request);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const child_process = require('child_process');
|
|
5
|
+
|
|
6
|
+
const {
|
|
7
|
+
PerformanceObserver,
|
|
8
|
+
constants: {
|
|
9
|
+
NODE_PERFORMANCE_GC_INCREMENTAL,
|
|
10
|
+
NODE_PERFORMANCE_GC_MAJOR,
|
|
11
|
+
NODE_PERFORMANCE_GC_MINOR
|
|
12
|
+
}
|
|
13
|
+
} = require('perf_hooks');
|
|
14
|
+
|
|
15
|
+
const { Connection } = require('tedious');
|
|
16
|
+
|
|
17
|
+
// The `Benchmark` class is taken from Node.js - see
|
|
18
|
+
// https://github.com/nodejs/node/blob/0f96dc266fd0cd8c1baa82ce7eb951c11b29a331/benchmark/common.js
|
|
19
|
+
// Copyright Node.js contributors. All rights reserved.
|
|
20
|
+
function Benchmark(fn, configs, options) {
|
|
21
|
+
// Use the file name as the name of the benchmark
|
|
22
|
+
this.name = require.main.filename.slice(__dirname.length + 1);
|
|
23
|
+
// Parse job-specific configuration from the command line arguments
|
|
24
|
+
const parsed_args = this._parseArgs(process.argv.slice(2), configs);
|
|
25
|
+
this.options = parsed_args.cli;
|
|
26
|
+
this.extra_options = parsed_args.extra;
|
|
27
|
+
// The configuration list as a queue of jobs
|
|
28
|
+
this.queue = this._queue(this.options);
|
|
29
|
+
// The configuration of the current job, head of the queue
|
|
30
|
+
this.config = this.queue[0];
|
|
31
|
+
// Execution arguments i.e. flags used to run the jobs
|
|
32
|
+
this.flags = [];
|
|
33
|
+
if (options && options.flags) {
|
|
34
|
+
this.flags = this.flags.concat(options.flags);
|
|
35
|
+
}
|
|
36
|
+
if (process.env.NODE_BENCHMARK_FLAGS) {
|
|
37
|
+
const flags = process.env.NODE_BENCHMARK_FLAGS.split(/\s+/);
|
|
38
|
+
this.flags = this.flags.concat(flags);
|
|
39
|
+
}
|
|
40
|
+
// Holds process.hrtime value
|
|
41
|
+
this._time = [0, 0];
|
|
42
|
+
// Used to make sure a benchmark only start a timer once
|
|
43
|
+
this._started = false;
|
|
44
|
+
|
|
45
|
+
this._gcStats = {
|
|
46
|
+
[NODE_PERFORMANCE_GC_INCREMENTAL]: {
|
|
47
|
+
count: 0,
|
|
48
|
+
totalDuration: 0
|
|
49
|
+
},
|
|
50
|
+
[NODE_PERFORMANCE_GC_MINOR]: {
|
|
51
|
+
count: 0,
|
|
52
|
+
totalDuration: 0
|
|
53
|
+
},
|
|
54
|
+
[NODE_PERFORMANCE_GC_MAJOR]: {
|
|
55
|
+
count: 0,
|
|
56
|
+
totalDuration: 0
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
this._observer = new PerformanceObserver((list) => {
|
|
61
|
+
const entries = list.getEntries();
|
|
62
|
+
const length = entries.length;
|
|
63
|
+
|
|
64
|
+
for (let i = 0; i < length; i++) {
|
|
65
|
+
const entry = entries[i];
|
|
66
|
+
const stats = this._gcStats[entry.detail.kind];
|
|
67
|
+
|
|
68
|
+
if (stats) {
|
|
69
|
+
stats.count += 1;
|
|
70
|
+
stats.totalDuration += entry.duration;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// this._run will use fork() to create a new process for each configuration
|
|
76
|
+
// combination.
|
|
77
|
+
if (process.env.hasOwnProperty('NODE_RUN_BENCHMARK_FN')) {
|
|
78
|
+
process.nextTick(() => fn(this.config));
|
|
79
|
+
} else {
|
|
80
|
+
process.nextTick(() => this._run());
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
Benchmark.prototype._parseArgs = function(argv, configs) {
|
|
85
|
+
const cliOptions = {};
|
|
86
|
+
const extraOptions = {};
|
|
87
|
+
const validArgRE = /^(.+?)=([\s\S]*)$/;
|
|
88
|
+
// Parse configuration arguments
|
|
89
|
+
for (const arg of argv) {
|
|
90
|
+
const match = arg.match(validArgRE);
|
|
91
|
+
if (!match) {
|
|
92
|
+
console.error(`bad argument: ${arg}`);
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
const config = match[1];
|
|
96
|
+
|
|
97
|
+
if (configs[config]) {
|
|
98
|
+
// Infer the type from the config object and parse accordingly
|
|
99
|
+
const isNumber = typeof configs[config][0] === 'number';
|
|
100
|
+
const value = isNumber ? +match[2] : match[2];
|
|
101
|
+
if (!cliOptions[config])
|
|
102
|
+
cliOptions[config] = [];
|
|
103
|
+
cliOptions[config].push(value);
|
|
104
|
+
} else {
|
|
105
|
+
extraOptions[config] = match[2];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return { cli: Object.assign({}, configs, cliOptions), extra: extraOptions };
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
Benchmark.prototype._queue = function(options) {
|
|
112
|
+
const queue = [];
|
|
113
|
+
const keys = Object.keys(options);
|
|
114
|
+
|
|
115
|
+
// Perform a depth-first walk though all options to generate a
|
|
116
|
+
// configuration list that contains all combinations.
|
|
117
|
+
function recursive(keyIndex, prevConfig) {
|
|
118
|
+
const key = keys[keyIndex];
|
|
119
|
+
const values = options[key];
|
|
120
|
+
const type = typeof values[0];
|
|
121
|
+
|
|
122
|
+
for (const value of values) {
|
|
123
|
+
if (typeof value !== 'number' && typeof value !== 'string') {
|
|
124
|
+
throw new TypeError(`configuration "${key}" had type ${typeof value}`);
|
|
125
|
+
}
|
|
126
|
+
if (typeof value !== type) {
|
|
127
|
+
// This is a requirement for being able to consistently and predictably
|
|
128
|
+
// parse CLI provided configuration values.
|
|
129
|
+
throw new TypeError(`configuration "${key}" has mixed types`);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const currConfig = Object.assign({ [key]: value }, prevConfig);
|
|
133
|
+
|
|
134
|
+
if (keyIndex + 1 < keys.length) {
|
|
135
|
+
recursive(keyIndex + 1, currConfig);
|
|
136
|
+
} else {
|
|
137
|
+
queue.push(currConfig);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (keys.length > 0) {
|
|
143
|
+
recursive(0, {});
|
|
144
|
+
} else {
|
|
145
|
+
queue.push({});
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return queue;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
Benchmark.prototype._run = function() {
|
|
152
|
+
const self = this;
|
|
153
|
+
// If forked, report to the parent.
|
|
154
|
+
if (process.send) {
|
|
155
|
+
process.send({
|
|
156
|
+
type: 'config',
|
|
157
|
+
name: this.name,
|
|
158
|
+
queueLength: this.queue.length,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
(function recursive(queueIndex) {
|
|
163
|
+
const config = self.queue[queueIndex];
|
|
164
|
+
|
|
165
|
+
// Set NODE_RUN_BENCHMARK_FN to indicate that the child shouldn't construct
|
|
166
|
+
// a configuration queue, but just execute the benchmark function.
|
|
167
|
+
const childEnv = Object.assign({}, process.env);
|
|
168
|
+
childEnv.NODE_RUN_BENCHMARK_FN = '';
|
|
169
|
+
|
|
170
|
+
// Create configuration arguments
|
|
171
|
+
const childArgs = [];
|
|
172
|
+
for (const key of Object.keys(config)) {
|
|
173
|
+
childArgs.push(`${key}=${config[key]}`);
|
|
174
|
+
}
|
|
175
|
+
for (const key of Object.keys(self.extra_options)) {
|
|
176
|
+
childArgs.push(`${key}=${self.extra_options[key]}`);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const child = child_process.fork(require.main.filename, childArgs, {
|
|
180
|
+
env: childEnv,
|
|
181
|
+
execArgv: self.flags.concat(process.execArgv),
|
|
182
|
+
});
|
|
183
|
+
child.on('message', sendResult);
|
|
184
|
+
child.on('close', (code) => {
|
|
185
|
+
if (code) {
|
|
186
|
+
process.exit(code);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (queueIndex + 1 < self.queue.length) {
|
|
190
|
+
recursive(queueIndex + 1);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
})(0);
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
Benchmark.prototype.start = function() {
|
|
197
|
+
if (this._started) {
|
|
198
|
+
throw new Error('Called start more than once in a single benchmark');
|
|
199
|
+
}
|
|
200
|
+
this._started = true;
|
|
201
|
+
this._observer.observe({ entryTypes: ['gc'], buffered: false });
|
|
202
|
+
|
|
203
|
+
this._time = process.hrtime();
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
Benchmark.prototype.end = function(operations) {
|
|
207
|
+
// Get elapsed time now and do error checking later for accuracy.
|
|
208
|
+
const elapsed = process.hrtime(this._time);
|
|
209
|
+
|
|
210
|
+
if (!this._started) {
|
|
211
|
+
throw new Error('called end without start');
|
|
212
|
+
}
|
|
213
|
+
if (typeof operations !== 'number') {
|
|
214
|
+
throw new Error('called end() without specifying operation count');
|
|
215
|
+
}
|
|
216
|
+
if (!process.env.NODEJS_BENCHMARK_ZERO_ALLOWED && operations <= 0) {
|
|
217
|
+
throw new Error('called end() with operation count <= 0');
|
|
218
|
+
}
|
|
219
|
+
if (elapsed[0] === 0 && elapsed[1] === 0) {
|
|
220
|
+
if (!process.env.NODEJS_BENCHMARK_ZERO_ALLOWED)
|
|
221
|
+
throw new Error('insufficient clock precision for short benchmark');
|
|
222
|
+
// Avoid dividing by zero
|
|
223
|
+
elapsed[1] = 1;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
this._observer.disconnect();
|
|
227
|
+
|
|
228
|
+
const time = elapsed[0] + elapsed[1] / 1e9;
|
|
229
|
+
const rate = operations / time;
|
|
230
|
+
this.report(rate, elapsed);
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
function formatResult(data) {
|
|
234
|
+
// Construct configuration string, " A=a, B=b, ..."
|
|
235
|
+
let conf = '';
|
|
236
|
+
for (const key of Object.keys(data.conf)) {
|
|
237
|
+
conf += ` ${key}=${JSON.stringify(data.conf[key])}`;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
var rate = data.rate.toString().split('.');
|
|
241
|
+
rate[0] = rate[0].replace(/(\d)(?=(?:\d\d\d)+(?!\d))/g, '$1,');
|
|
242
|
+
rate = (rate[1] ? rate.join('.') : rate[0]);
|
|
243
|
+
|
|
244
|
+
var gcInfo;
|
|
245
|
+
gcInfo = `(minor: ${data.gcStats[NODE_PERFORMANCE_GC_MINOR].count} - ${data.gcStats[NODE_PERFORMANCE_GC_MINOR].totalDuration}ms,`;
|
|
246
|
+
gcInfo += ` major: ${data.gcStats[NODE_PERFORMANCE_GC_MAJOR].count} - ${data.gcStats[NODE_PERFORMANCE_GC_MAJOR].totalDuration}ms,`;
|
|
247
|
+
gcInfo += ` incremental: ${data.gcStats[NODE_PERFORMANCE_GC_INCREMENTAL].count} - ${data.gcStats[NODE_PERFORMANCE_GC_INCREMENTAL].totalDuration}ms)`;
|
|
248
|
+
|
|
249
|
+
return `${data.name}${conf}: ${rate} ${gcInfo}`;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function sendResult(data) {
|
|
253
|
+
if (process.send) {
|
|
254
|
+
// If forked, report by process send
|
|
255
|
+
process.send(data);
|
|
256
|
+
} else {
|
|
257
|
+
// Otherwise report by stdout
|
|
258
|
+
console.log(formatResult(data));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
Benchmark.prototype.report = function(rate, elapsed) {
|
|
263
|
+
sendResult({
|
|
264
|
+
name: this.name,
|
|
265
|
+
conf: this.config,
|
|
266
|
+
rate: rate,
|
|
267
|
+
time: elapsed[0] + elapsed[1] / 1e9,
|
|
268
|
+
type: 'report',
|
|
269
|
+
gcStats: this._gcStats
|
|
270
|
+
});
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
function createBenchmark(fn, configs, options) {
|
|
274
|
+
return new Benchmark(fn, configs, options);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
function createConnection(cb) {
|
|
278
|
+
var config = JSON.parse(fs.readFileSync(require('os').homedir() + '/.tedious/test-connection.json', 'utf8')).config;
|
|
279
|
+
|
|
280
|
+
var connection = new Connection(config);
|
|
281
|
+
connection.connect(function() {
|
|
282
|
+
cb(connection);
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
module.exports.createBenchmark = createBenchmark;
|
|
287
|
+
module.exports.createConnection = createConnection;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const { createBenchmark, createConnection } = require('../common');
|
|
2
|
+
|
|
3
|
+
const bench = createBenchmark(main, {
|
|
4
|
+
n: [10, 100]
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
function main({ n }) {
|
|
8
|
+
let i = 0;
|
|
9
|
+
bench.start();
|
|
10
|
+
|
|
11
|
+
(function cb() {
|
|
12
|
+
createConnection(function(connection) {
|
|
13
|
+
connection.close();
|
|
14
|
+
|
|
15
|
+
if (i++ === n) {
|
|
16
|
+
bench.end(n);
|
|
17
|
+
|
|
18
|
+
connection.close();
|
|
19
|
+
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
cb();
|
|
24
|
+
});
|
|
25
|
+
})();
|
|
26
|
+
}
|