plugin-data-source-mssql 1.9.48 → 2.0.1
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 +86 -72
- 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 +35 -4
- package/package.json +2 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tedious-benchmarks",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "This folder contains a collection of benchmarks for `tedious`.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tedious": "file:.."
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const { createBenchmark, createConnection } = require('../common');
|
|
2
|
+
|
|
3
|
+
const { Request, TYPES } = require('tedious');
|
|
4
|
+
|
|
5
|
+
const bench = createBenchmark(main, {
|
|
6
|
+
n: [10, 100]
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
function main({ n }) {
|
|
10
|
+
createConnection(function(connection) {
|
|
11
|
+
const request = new Request(`
|
|
12
|
+
USE tempdb;
|
|
13
|
+
|
|
14
|
+
DROP TYPE IF EXISTS TediousTestType;
|
|
15
|
+
|
|
16
|
+
CREATE TYPE TediousTestType AS TABLE (
|
|
17
|
+
FileId uniqueidentifier,
|
|
18
|
+
FileNumber bigint,
|
|
19
|
+
FileVersion varchar(20),
|
|
20
|
+
FileCommitID varchar(40),
|
|
21
|
+
FileModel nvarchar(max)
|
|
22
|
+
);
|
|
23
|
+
`, (err) => {
|
|
24
|
+
if (err) {
|
|
25
|
+
throw err;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const request = new Request(`
|
|
29
|
+
CREATE PROCEDURE #__tediousTvpTest @tvp TediousTestType readonly AS BEGIN select COUNT(*) from @tvp END
|
|
30
|
+
`, (err) => {
|
|
31
|
+
if (err) {
|
|
32
|
+
throw err;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const tvp = {
|
|
36
|
+
columns: [
|
|
37
|
+
{
|
|
38
|
+
name: 'FileId',
|
|
39
|
+
type: TYPES.UniqueIdentifier
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'FileNumber',
|
|
43
|
+
type: TYPES.BigInt
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'FileVersion',
|
|
47
|
+
type: TYPES.VarChar,
|
|
48
|
+
length: 20,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'FileCommitID',
|
|
52
|
+
type: TYPES.VarChar,
|
|
53
|
+
length: 40,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'FileModel',
|
|
57
|
+
type: TYPES.NVarChar,
|
|
58
|
+
length: Infinity
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
rows: []
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
for (let i = 0; i < 500; i++) {
|
|
65
|
+
tvp.rows.push([
|
|
66
|
+
'6F9619FF-8B86-D011-B42D-00C04FC964FF',
|
|
67
|
+
1,
|
|
68
|
+
'12345',
|
|
69
|
+
'6b8bd41619d843b35b13478bb8aa88ea67039a05',
|
|
70
|
+
new Array(5000).join('x')
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
let i = 0;
|
|
75
|
+
bench.start();
|
|
76
|
+
|
|
77
|
+
(function cb() {
|
|
78
|
+
const request = new Request('#__tediousTvpTest', (err) => {
|
|
79
|
+
if (err) {
|
|
80
|
+
throw err;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (i++ === n) {
|
|
84
|
+
bench.end(n);
|
|
85
|
+
|
|
86
|
+
connection.close();
|
|
87
|
+
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
cb();
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
request.addParameter('tvp', TYPES.TVP, tvp);
|
|
95
|
+
|
|
96
|
+
connection.callProcedure(request);
|
|
97
|
+
})();
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
connection.execSqlBatch(request);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
connection.execSqlBatch(request);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const { createBenchmark, createConnection } = require('../common');
|
|
2
|
+
|
|
3
|
+
const { Request, TYPES } = require('tedious');
|
|
4
|
+
|
|
5
|
+
const bench = createBenchmark(main, {
|
|
6
|
+
n: [10, 100],
|
|
7
|
+
size: [
|
|
8
|
+
10,
|
|
9
|
+
1024,
|
|
10
|
+
1024 * 1024,
|
|
11
|
+
10 * 1024 * 1024
|
|
12
|
+
]
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
function main({ n, size }) {
|
|
16
|
+
createConnection(function(connection) {
|
|
17
|
+
const buf = Buffer.alloc(size);
|
|
18
|
+
buf.fill('x');
|
|
19
|
+
|
|
20
|
+
let i = 0;
|
|
21
|
+
|
|
22
|
+
bench.start();
|
|
23
|
+
|
|
24
|
+
(function cb() {
|
|
25
|
+
const request = new Request('SELECT DATALENGTH(@value)', (err) => {
|
|
26
|
+
if (err) {
|
|
27
|
+
throw err;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (i++ === n) {
|
|
31
|
+
bench.end(n);
|
|
32
|
+
|
|
33
|
+
connection.close();
|
|
34
|
+
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
cb();
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
request.addParameter('value', TYPES.VarBinary, buf);
|
|
42
|
+
|
|
43
|
+
connection.execSql(request);
|
|
44
|
+
})();
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const { createBenchmark, createConnection } = require('../common');
|
|
2
|
+
|
|
3
|
+
const { Request, TYPES } = require('tedious');
|
|
4
|
+
|
|
5
|
+
const bench = createBenchmark(main, {
|
|
6
|
+
n: [10, 100, 1000],
|
|
7
|
+
size: [10, 100, 1000, 10000]
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
function main({ n, size }) {
|
|
11
|
+
createConnection(function(connection) {
|
|
12
|
+
const request = new Request('CREATE TABLE #benchmark ([id] int IDENTITY(1,1), [name] nvarchar(100), [description] nvarchar(max))', (err) => {
|
|
13
|
+
if (err) {
|
|
14
|
+
throw err;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
(function insertNext(num, done) {
|
|
18
|
+
var request = new Request('INSERT INTO #benchmark ([name], [description]) VALUES (@name, @description)', (err) => {
|
|
19
|
+
if (err) {
|
|
20
|
+
throw err;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (num === size) {
|
|
24
|
+
done();
|
|
25
|
+
} else {
|
|
26
|
+
insertNext(num + 1, done);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
request.addParameter('name', TYPES.NVarChar, 'Row ' + n);
|
|
31
|
+
request.addParameter('description', TYPES.NVarChar, 'Example Test Description for Row ' + n);
|
|
32
|
+
|
|
33
|
+
connection.execSql(request);
|
|
34
|
+
})(0, (err) => {
|
|
35
|
+
let i = 0;
|
|
36
|
+
|
|
37
|
+
bench.start();
|
|
38
|
+
|
|
39
|
+
(function cb() {
|
|
40
|
+
const request = new Request('SELECT * FROM #benchmark', (err) => {
|
|
41
|
+
if (err) {
|
|
42
|
+
throw err;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (i++ === n) {
|
|
46
|
+
bench.end(n);
|
|
47
|
+
|
|
48
|
+
connection.close();
|
|
49
|
+
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
cb();
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
connection.execSql(request);
|
|
57
|
+
})();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
connection.execSqlBatch(request);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const { createBenchmark, createConnection } = require('../common');
|
|
2
|
+
|
|
3
|
+
const { Request, TYPES } = require('tedious');
|
|
4
|
+
|
|
5
|
+
const bench = createBenchmark(main, {
|
|
6
|
+
n: [10, 100, 1000],
|
|
7
|
+
size: [10, 100, 1000, 10000]
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
function main({ n, size }) {
|
|
11
|
+
createConnection(function(connection) {
|
|
12
|
+
const request = new Request('CREATE TABLE #benchmark ([value] nvarchar(max))', (err) => {
|
|
13
|
+
if (err) {
|
|
14
|
+
throw err;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var request = new Request('INSERT INTO #benchmark ([value]) VALUES (@value)', (err) => {
|
|
18
|
+
let i = 0;
|
|
19
|
+
|
|
20
|
+
bench.start();
|
|
21
|
+
|
|
22
|
+
(function cb() {
|
|
23
|
+
const request = new Request('SELECT * FROM #benchmark', (err) => {
|
|
24
|
+
if (err) {
|
|
25
|
+
throw err;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (i++ === n) {
|
|
29
|
+
bench.end(n);
|
|
30
|
+
|
|
31
|
+
connection.close();
|
|
32
|
+
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
cb();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
connection.execSql(request);
|
|
40
|
+
})();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const value = 'a'.repeat(size);
|
|
44
|
+
request.addParameter('value', TYPES.NVarChar, value);
|
|
45
|
+
connection.execSql(request);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
connection.execSqlBatch(request);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const { createBenchmark, createConnection } = require('../common');
|
|
2
|
+
|
|
3
|
+
const { Request, TYPES } = require('tedious');
|
|
4
|
+
|
|
5
|
+
const bench = createBenchmark(main, {
|
|
6
|
+
n: [10, 100],
|
|
7
|
+
size: [10, 100, 1000, 10000, 1024 * 1024, 10 * 1024 * 1024]
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
function main({ n, size }) {
|
|
11
|
+
createConnection(function(connection) {
|
|
12
|
+
const request = new Request('CREATE TABLE #benchmark ([value] varbinary(max))', (err) => {
|
|
13
|
+
if (err) {
|
|
14
|
+
throw err;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var request = new Request('INSERT INTO #benchmark ([value]) VALUES (@value)', (err) => {
|
|
18
|
+
let i = 0;
|
|
19
|
+
|
|
20
|
+
bench.start();
|
|
21
|
+
|
|
22
|
+
(function cb() {
|
|
23
|
+
const request = new Request('SELECT * FROM #benchmark', (err) => {
|
|
24
|
+
if (err) {
|
|
25
|
+
throw err;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (i++ === n) {
|
|
29
|
+
bench.end(n);
|
|
30
|
+
|
|
31
|
+
connection.close();
|
|
32
|
+
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
cb();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
connection.execSql(request);
|
|
40
|
+
})();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const value = Buffer.alloc(size, 'a');
|
|
44
|
+
request.addParameter('value', TYPES.VarBinary, value);
|
|
45
|
+
connection.execSql(request);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
connection.execSqlBatch(request);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const { createBenchmark } = require('../common');
|
|
2
|
+
|
|
3
|
+
const { Request, TYPES } = require('tedious');
|
|
4
|
+
const RpcRequestPayload = require('tedious/lib/rpcrequest-payload');
|
|
5
|
+
|
|
6
|
+
const { Readable } = require('stream');
|
|
7
|
+
|
|
8
|
+
const bench = createBenchmark(main, {
|
|
9
|
+
n: [10, 100],
|
|
10
|
+
size: [10, 100, 1000, 10000]
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
function main({ n, size }) {
|
|
14
|
+
var table = {
|
|
15
|
+
columns: [
|
|
16
|
+
{ name: 'user_id', type: TYPES.Int },
|
|
17
|
+
{ name: 'user_name', type: TYPES.VarChar, length: 500 },
|
|
18
|
+
{ name: 'user_enabled', type: TYPES.Bit }
|
|
19
|
+
],
|
|
20
|
+
rows: []
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
for (let j = 0; j < size; j++) {
|
|
24
|
+
table.rows.push([15, 'Eric', true]);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const request = new Request('...', () => {});
|
|
28
|
+
request.addParameter('value', TYPES.TVP, table);
|
|
29
|
+
request.validateParameters();
|
|
30
|
+
|
|
31
|
+
let i = 0;
|
|
32
|
+
bench.start();
|
|
33
|
+
|
|
34
|
+
(function cb() {
|
|
35
|
+
if (i++ === n) {
|
|
36
|
+
bench.end(n);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const payload = new RpcRequestPayload(request.sqlTextOrProcedure, request.parameters, Buffer.alloc(0), {}, undefined);
|
|
41
|
+
const stream = Readable.from(payload);
|
|
42
|
+
stream.on('data', () => {});
|
|
43
|
+
stream.on('end', cb);
|
|
44
|
+
})();
|
|
45
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const { createBenchmark } = require('../common');
|
|
2
|
+
|
|
3
|
+
const { Request, TYPES } = require('tedious');
|
|
4
|
+
const RpcRequestPayload = require('tedious/lib/rpcrequest-payload');
|
|
5
|
+
|
|
6
|
+
const { Readable } = require('stream');
|
|
7
|
+
|
|
8
|
+
const bench = createBenchmark(main, {
|
|
9
|
+
n: [10, 100],
|
|
10
|
+
size: [
|
|
11
|
+
1024 * 1024,
|
|
12
|
+
10 * 1024 * 1024,
|
|
13
|
+
50 * 1024 * 1024,
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
function main({ n, size }) {
|
|
18
|
+
const buf = Buffer.alloc(size, 'x');
|
|
19
|
+
|
|
20
|
+
const request = new Request('...', () => {});
|
|
21
|
+
request.addParameter('value', TYPES.VarBinary, buf);
|
|
22
|
+
|
|
23
|
+
let i = 0;
|
|
24
|
+
bench.start();
|
|
25
|
+
|
|
26
|
+
(function cb() {
|
|
27
|
+
if (i++ === n) {
|
|
28
|
+
bench.end(n);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const payload = new RpcRequestPayload(request.sqlTextOrProcedure, request.parameters, Buffer.alloc(0), {}, undefined);
|
|
33
|
+
const stream = Readable.from(payload);
|
|
34
|
+
stream.on('data', () => {});
|
|
35
|
+
stream.on('end', cb);
|
|
36
|
+
})();
|
|
37
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const { createBenchmark } = require('../common');
|
|
2
|
+
|
|
3
|
+
const { Parser } = require('tedious/lib/token/token-stream-parser');
|
|
4
|
+
|
|
5
|
+
const bench = createBenchmark(main, {
|
|
6
|
+
n: [10, 100, 1000],
|
|
7
|
+
tokenCount: [10, 100, 1000, 10000]
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
async function * repeat(data, n) {
|
|
11
|
+
for (let i = 0; i < n; i++) {
|
|
12
|
+
yield data;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function main({ n, tokenCount }) {
|
|
17
|
+
const data = Buffer.from('810300000000001000380269006400000000000900e7c8000904d00034046e0061006d006500000000000900e7ffff0904d000340b6400650073006300720069007000740069006f006e00'.repeat(tokenCount), 'hex');
|
|
18
|
+
const parser = new Parser(repeat(data, n), { token: function() { } }, {
|
|
19
|
+
onColMetadata: (token) => { }
|
|
20
|
+
}, {});
|
|
21
|
+
|
|
22
|
+
bench.start();
|
|
23
|
+
|
|
24
|
+
parser.on('end', () => {
|
|
25
|
+
bench.end(n);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const { createBenchmark } = require('../common');
|
|
2
|
+
|
|
3
|
+
const { Parser } = require('tedious/lib/token/token-stream-parser');
|
|
4
|
+
|
|
5
|
+
const bench = createBenchmark(main, {
|
|
6
|
+
n: [10, 100, 1000],
|
|
7
|
+
tokenCount: [10, 100, 1000, 10000]
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
async function * repeat(data, n) {
|
|
11
|
+
for (let i = 0; i < n; i++) {
|
|
12
|
+
yield data;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function main({ n, tokenCount }) {
|
|
17
|
+
const data = Buffer.from('FE0000E0000000000000000000'.repeat(tokenCount), 'hex');
|
|
18
|
+
|
|
19
|
+
const parser = new Parser(repeat(data, n), { token: function() { } }, {
|
|
20
|
+
onDoneProc: (token) => { }
|
|
21
|
+
}, {});
|
|
22
|
+
|
|
23
|
+
bench.start();
|
|
24
|
+
|
|
25
|
+
parser.on('end', () => {
|
|
26
|
+
bench.end(n);
|
|
27
|
+
});
|
|
28
|
+
}
|