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.
Files changed (409) hide show
  1. package/README.md +31 -10
  2. package/dist/externalVersion.js +6 -6
  3. package/dist/node_modules/tedious/245.index.js +741 -0
  4. package/dist/node_modules/tedious/LICENSE +21 -0
  5. package/dist/node_modules/tedious/appveyor.yml +67 -0
  6. package/dist/node_modules/tedious/benchmarks/bulk-load/iterable.js +61 -0
  7. package/dist/node_modules/tedious/benchmarks/common.js +287 -0
  8. package/dist/node_modules/tedious/benchmarks/connection/open.js +26 -0
  9. package/dist/node_modules/tedious/benchmarks/package-lock.json +21173 -0
  10. package/dist/node_modules/tedious/benchmarks/package.json +11 -0
  11. package/dist/node_modules/tedious/benchmarks/query/call-tvp.js +105 -0
  12. package/dist/node_modules/tedious/benchmarks/query/insert-varbinary.js +46 -0
  13. package/dist/node_modules/tedious/benchmarks/query/select-many-rows.js +63 -0
  14. package/dist/node_modules/tedious/benchmarks/query/select-nvarchar.js +50 -0
  15. package/dist/node_modules/tedious/benchmarks/query/select-varbinary.js +50 -0
  16. package/dist/node_modules/tedious/benchmarks/request/rpcrequest-payload-tvp.js +45 -0
  17. package/dist/node_modules/tedious/benchmarks/request/rpcrequest-payload-varbinary.js +37 -0
  18. package/dist/node_modules/tedious/benchmarks/token-parser/colmetadata-token.js +27 -0
  19. package/dist/node_modules/tedious/benchmarks/token-parser/done-token.js +28 -0
  20. package/dist/node_modules/tedious/benchmarks/token-parser/simple-tokens.js +363 -0
  21. package/dist/node_modules/tedious/lib/all-headers.d.ts +2 -0
  22. package/dist/node_modules/tedious/lib/all-headers.js +24 -0
  23. package/dist/node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-algorithm.js +82 -0
  24. package/dist/node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-encryption-key.js +55 -0
  25. package/dist/node_modules/tedious/lib/always-encrypted/cek-entry.d.ts +11 -0
  26. package/dist/node_modules/tedious/lib/always-encrypted/cek-entry.js +42 -0
  27. package/dist/node_modules/tedious/lib/always-encrypted/get-parameter-encryption-metadata.js +90 -0
  28. package/dist/node_modules/tedious/lib/always-encrypted/key-crypto.js +94 -0
  29. package/dist/node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.d.ts +21 -0
  30. package/dist/node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.js +247 -0
  31. package/dist/node_modules/tedious/lib/always-encrypted/symmetric-key-cache.js +36 -0
  32. package/dist/node_modules/tedious/lib/always-encrypted/symmetric-key.js +25 -0
  33. package/dist/node_modules/tedious/lib/always-encrypted/types.d.ts +73 -0
  34. package/dist/node_modules/tedious/lib/always-encrypted/types.js +48 -0
  35. package/dist/node_modules/tedious/lib/always-encrypted/utils.js +23 -0
  36. package/dist/node_modules/tedious/lib/bulk-load-payload.d.ts +8 -0
  37. package/dist/node_modules/tedious/lib/bulk-load-payload.js +23 -0
  38. package/dist/node_modules/tedious/lib/bulk-load.d.ts +275 -0
  39. package/dist/node_modules/tedious/lib/bulk-load.js +516 -0
  40. package/dist/node_modules/tedious/lib/collation.d.ts +28 -0
  41. package/dist/node_modules/tedious/lib/collation.js +348 -0
  42. package/dist/node_modules/tedious/lib/connection.d.ts +1310 -0
  43. package/dist/node_modules/tedious/lib/connection.js +2730 -0
  44. package/dist/node_modules/tedious/lib/connector.d.ts +18 -0
  45. package/dist/node_modules/tedious/lib/connector.js +150 -0
  46. package/dist/node_modules/tedious/lib/data-type.d.ts +455 -0
  47. package/dist/node_modules/tedious/lib/data-type.js +428 -0
  48. package/dist/node_modules/tedious/lib/data-types/bigint.d.ts +3 -0
  49. package/dist/node_modules/tedious/lib/data-types/bigint.js +53 -0
  50. package/dist/node_modules/tedious/lib/data-types/binary.d.ts +5 -0
  51. package/dist/node_modules/tedious/lib/data-types/binary.js +67 -0
  52. package/dist/node_modules/tedious/lib/data-types/bit.d.ts +3 -0
  53. package/dist/node_modules/tedious/lib/data-types/bit.js +46 -0
  54. package/dist/node_modules/tedious/lib/data-types/bitn.d.ts +3 -0
  55. package/dist/node_modules/tedious/lib/data-types/bitn.js +29 -0
  56. package/dist/node_modules/tedious/lib/data-types/char.d.ts +5 -0
  57. package/dist/node_modules/tedious/lib/data-types/char.js +86 -0
  58. package/dist/node_modules/tedious/lib/data-types/date.d.ts +3 -0
  59. package/dist/node_modules/tedious/lib/data-types/date.js +72 -0
  60. package/dist/node_modules/tedious/lib/data-types/datetime.d.ts +3 -0
  61. package/dist/node_modules/tedious/lib/data-types/datetime.js +93 -0
  62. package/dist/node_modules/tedious/lib/data-types/datetime2.d.ts +5 -0
  63. package/dist/node_modules/tedious/lib/data-types/datetime2.js +118 -0
  64. package/dist/node_modules/tedious/lib/data-types/datetimen.d.ts +3 -0
  65. package/dist/node_modules/tedious/lib/data-types/datetimen.js +29 -0
  66. package/dist/node_modules/tedious/lib/data-types/datetimeoffset.d.ts +5 -0
  67. package/dist/node_modules/tedious/lib/data-types/datetimeoffset.js +111 -0
  68. package/dist/node_modules/tedious/lib/data-types/decimal.d.ts +6 -0
  69. package/dist/node_modules/tedious/lib/data-types/decimal.js +107 -0
  70. package/dist/node_modules/tedious/lib/data-types/decimaln.d.ts +3 -0
  71. package/dist/node_modules/tedious/lib/data-types/decimaln.js +29 -0
  72. package/dist/node_modules/tedious/lib/data-types/float.d.ts +3 -0
  73. package/dist/node_modules/tedious/lib/data-types/float.js +47 -0
  74. package/dist/node_modules/tedious/lib/data-types/floatn.d.ts +3 -0
  75. package/dist/node_modules/tedious/lib/data-types/floatn.js +29 -0
  76. package/dist/node_modules/tedious/lib/data-types/image.d.ts +3 -0
  77. package/dist/node_modules/tedious/lib/data-types/image.js +56 -0
  78. package/dist/node_modules/tedious/lib/data-types/int.d.ts +3 -0
  79. package/dist/node_modules/tedious/lib/data-types/int.js +53 -0
  80. package/dist/node_modules/tedious/lib/data-types/intn.d.ts +3 -0
  81. package/dist/node_modules/tedious/lib/data-types/intn.js +29 -0
  82. package/dist/node_modules/tedious/lib/data-types/money.d.ts +3 -0
  83. package/dist/node_modules/tedious/lib/data-types/money.js +59 -0
  84. package/dist/node_modules/tedious/lib/data-types/moneyn.d.ts +3 -0
  85. package/dist/node_modules/tedious/lib/data-types/moneyn.js +29 -0
  86. package/dist/node_modules/tedious/lib/data-types/nchar.d.ts +5 -0
  87. package/dist/node_modules/tedious/lib/data-types/nchar.js +100 -0
  88. package/dist/node_modules/tedious/lib/data-types/ntext.d.ts +3 -0
  89. package/dist/node_modules/tedious/lib/data-types/ntext.js +60 -0
  90. package/dist/node_modules/tedious/lib/data-types/null.d.ts +3 -0
  91. package/dist/node_modules/tedious/lib/data-types/null.js +29 -0
  92. package/dist/node_modules/tedious/lib/data-types/numeric.d.ts +6 -0
  93. package/dist/node_modules/tedious/lib/data-types/numeric.js +106 -0
  94. package/dist/node_modules/tedious/lib/data-types/numericn.d.ts +3 -0
  95. package/dist/node_modules/tedious/lib/data-types/numericn.js +29 -0
  96. package/dist/node_modules/tedious/lib/data-types/nvarchar.d.ts +5 -0
  97. package/dist/node_modules/tedious/lib/data-types/nvarchar.js +133 -0
  98. package/dist/node_modules/tedious/lib/data-types/real.d.ts +3 -0
  99. package/dist/node_modules/tedious/lib/data-types/real.js +48 -0
  100. package/dist/node_modules/tedious/lib/data-types/smalldatetime.d.ts +3 -0
  101. package/dist/node_modules/tedious/lib/data-types/smalldatetime.js +83 -0
  102. package/dist/node_modules/tedious/lib/data-types/smallint.d.ts +3 -0
  103. package/dist/node_modules/tedious/lib/data-types/smallint.js +53 -0
  104. package/dist/node_modules/tedious/lib/data-types/smallmoney.d.ts +3 -0
  105. package/dist/node_modules/tedious/lib/data-types/smallmoney.js +51 -0
  106. package/dist/node_modules/tedious/lib/data-types/sql-variant.d.ts +3 -0
  107. package/dist/node_modules/tedious/lib/data-types/sql-variant.js +29 -0
  108. package/dist/node_modules/tedious/lib/data-types/text.d.ts +3 -0
  109. package/dist/node_modules/tedious/lib/data-types/text.js +69 -0
  110. package/dist/node_modules/tedious/lib/data-types/time.d.ts +3 -0
  111. package/dist/node_modules/tedious/lib/data-types/time.js +96 -0
  112. package/dist/node_modules/tedious/lib/data-types/tinyint.d.ts +3 -0
  113. package/dist/node_modules/tedious/lib/data-types/tinyint.js +53 -0
  114. package/dist/node_modules/tedious/lib/data-types/tvp.d.ts +3 -0
  115. package/dist/node_modules/tedious/lib/data-types/tvp.js +117 -0
  116. package/dist/node_modules/tedious/lib/data-types/udt.d.ts +3 -0
  117. package/dist/node_modules/tedious/lib/data-types/udt.js +29 -0
  118. package/dist/node_modules/tedious/lib/data-types/uniqueidentifier.d.ts +3 -0
  119. package/dist/node_modules/tedious/lib/data-types/uniqueidentifier.js +50 -0
  120. package/dist/node_modules/tedious/lib/data-types/varbinary.d.ts +5 -0
  121. package/dist/node_modules/tedious/lib/data-types/varbinary.js +119 -0
  122. package/dist/node_modules/tedious/lib/data-types/varchar.d.ts +5 -0
  123. package/dist/node_modules/tedious/lib/data-types/varchar.js +112 -0
  124. package/dist/node_modules/tedious/lib/data-types/xml.d.ts +3 -0
  125. package/dist/node_modules/tedious/lib/data-types/xml.js +29 -0
  126. package/dist/node_modules/tedious/lib/debug.d.ts +25 -0
  127. package/dist/node_modules/tedious/lib/debug.js +67 -0
  128. package/dist/node_modules/tedious/lib/errors/abort-error.d.ts +4 -0
  129. package/dist/node_modules/tedious/lib/errors/abort-error.js +15 -0
  130. package/dist/node_modules/tedious/lib/errors/timeout-error.d.ts +4 -0
  131. package/dist/node_modules/tedious/lib/errors/timeout-error.js +15 -0
  132. package/dist/node_modules/tedious/lib/errors.d.ts +17 -0
  133. package/dist/node_modules/tedious/lib/errors.js +23 -0
  134. package/dist/node_modules/tedious/lib/guid-parser.d.ts +3 -0
  135. package/dist/node_modules/tedious/lib/guid-parser.js +30 -0
  136. package/dist/node_modules/tedious/lib/incoming-message-stream.d.ts +19 -0
  137. package/dist/node_modules/tedious/lib/incoming-message-stream.js +97 -0
  138. package/dist/node_modules/tedious/lib/instance-lookup.d.ts +13 -0
  139. package/dist/node_modules/tedious/lib/instance-lookup.js +96 -0
  140. package/dist/node_modules/tedious/lib/library.d.ts +1 -0
  141. package/dist/node_modules/tedious/lib/library.js +8 -0
  142. package/dist/node_modules/tedious/lib/login7-payload.d.ts +51 -0
  143. package/dist/node_modules/tedious/lib/login7-payload.js +402 -0
  144. package/dist/node_modules/tedious/lib/message-io.d.ts +28 -0
  145. package/dist/node_modules/tedious/lib/message-io.js +153 -0
  146. package/dist/node_modules/tedious/lib/message.d.ts +11 -0
  147. package/dist/node_modules/tedious/lib/message.js +21 -0
  148. package/dist/node_modules/tedious/lib/metadata-parser.d.ts +48 -0
  149. package/dist/node_modules/tedious/lib/metadata-parser.js +380 -0
  150. package/dist/node_modules/tedious/lib/ntlm-payload.d.ts +23 -0
  151. package/dist/node_modules/tedious/lib/ntlm-payload.js +136 -0
  152. package/dist/node_modules/tedious/lib/ntlm.d.ts +4 -0
  153. package/dist/node_modules/tedious/lib/ntlm.js +72 -0
  154. package/dist/node_modules/tedious/lib/outgoing-message-stream.d.ts +15 -0
  155. package/dist/node_modules/tedious/lib/outgoing-message-stream.js +81 -0
  156. package/dist/node_modules/tedious/lib/packet.d.ts +33 -0
  157. package/dist/node_modules/tedious/lib/packet.js +191 -0
  158. package/dist/node_modules/tedious/lib/prelogin-payload.d.ts +61 -0
  159. package/dist/node_modules/tedious/lib/prelogin-payload.js +209 -0
  160. package/dist/node_modules/tedious/lib/request.d.ts +370 -0
  161. package/dist/node_modules/tedious/lib/request.js +387 -0
  162. package/dist/node_modules/tedious/lib/rpcrequest-payload.d.ts +16 -0
  163. package/dist/node_modules/tedious/lib/rpcrequest-payload.js +109 -0
  164. package/dist/node_modules/tedious/lib/sender.d.ts +5 -0
  165. package/dist/node_modules/tedious/lib/sender.js +83 -0
  166. package/dist/node_modules/tedious/lib/special-stored-procedure.d.ts +18 -0
  167. package/dist/node_modules/tedious/lib/special-stored-procedure.js +26 -0
  168. package/dist/node_modules/tedious/lib/sqlbatch-payload.d.ts +13 -0
  169. package/dist/node_modules/tedious/lib/sqlbatch-payload.js +34 -0
  170. package/dist/node_modules/tedious/lib/tds-versions.d.ts +6 -0
  171. package/dist/node_modules/tedious/lib/tds-versions.js +19 -0
  172. package/dist/node_modules/tedious/lib/tedious.d.ts +13 -0
  173. package/dist/node_modules/tedious/lib/tedious.js +249 -0
  174. package/dist/node_modules/tedious/lib/token/colmetadata-token-parser.d.ts +12 -0
  175. package/dist/node_modules/tedious/lib/token/colmetadata-token-parser.js +124 -0
  176. package/dist/node_modules/tedious/lib/token/done-token-parser.d.ts +6 -0
  177. package/dist/node_modules/tedious/lib/token/done-token-parser.js +76 -0
  178. package/dist/node_modules/tedious/lib/token/env-change-token-parser.d.ts +5 -0
  179. package/dist/node_modules/tedious/lib/token/env-change-token-parser.js +190 -0
  180. package/dist/node_modules/tedious/lib/token/feature-ext-ack-parser.d.ts +5 -0
  181. package/dist/node_modules/tedious/lib/token/feature-ext-ack-parser.js +52 -0
  182. package/dist/node_modules/tedious/lib/token/fedauth-info-parser.d.ts +5 -0
  183. package/dist/node_modules/tedious/lib/token/fedauth-info-parser.js +62 -0
  184. package/dist/node_modules/tedious/lib/token/handler.d.ts +135 -0
  185. package/dist/node_modules/tedious/lib/token/handler.js +444 -0
  186. package/dist/node_modules/tedious/lib/token/helpers.d.ts +28 -0
  187. package/dist/node_modules/tedious/lib/token/helpers.js +205 -0
  188. package/dist/node_modules/tedious/lib/token/infoerror-token-parser.d.ts +5 -0
  189. package/dist/node_modules/tedious/lib/token/infoerror-token-parser.js +80 -0
  190. package/dist/node_modules/tedious/lib/token/loginack-token-parser.d.ts +5 -0
  191. package/dist/node_modules/tedious/lib/token/loginack-token-parser.js +75 -0
  192. package/dist/node_modules/tedious/lib/token/nbcrow-token-parser.d.ts +4 -0
  193. package/dist/node_modules/tedious/lib/token/nbcrow-token-parser.js +104 -0
  194. package/dist/node_modules/tedious/lib/token/order-token-parser.d.ts +5 -0
  195. package/dist/node_modules/tedious/lib/token/order-token-parser.js +34 -0
  196. package/dist/node_modules/tedious/lib/token/returnstatus-token-parser.d.ts +5 -0
  197. package/dist/node_modules/tedious/lib/token/returnstatus-token-parser.js +21 -0
  198. package/dist/node_modules/tedious/lib/token/returnvalue-token-parser.d.ts +4 -0
  199. package/dist/node_modules/tedious/lib/token/returnvalue-token-parser.js +94 -0
  200. package/dist/node_modules/tedious/lib/token/row-token-parser.d.ts +4 -0
  201. package/dist/node_modules/tedious/lib/token/row-token-parser.js +77 -0
  202. package/dist/node_modules/tedious/lib/token/sspi-token-parser.d.ts +5 -0
  203. package/dist/node_modules/tedious/lib/token/sspi-token-parser.js +42 -0
  204. package/dist/node_modules/tedious/lib/token/stream-parser.d.ts +34 -0
  205. package/dist/node_modules/tedious/lib/token/stream-parser.js +341 -0
  206. package/dist/node_modules/tedious/lib/token/token-stream-parser.d.ts +15 -0
  207. package/dist/node_modules/tedious/lib/token/token-stream-parser.js +36 -0
  208. package/dist/node_modules/tedious/lib/token/token.d.ts +312 -0
  209. package/dist/node_modules/tedious/lib/token/token.js +328 -0
  210. package/dist/node_modules/tedious/lib/tracking-buffer/writable-tracking-buffer.d.ts +47 -0
  211. package/dist/node_modules/tedious/lib/tracking-buffer/writable-tracking-buffer.js +249 -0
  212. package/dist/node_modules/tedious/lib/transaction.d.ts +39 -0
  213. package/dist/node_modules/tedious/lib/transaction.js +137 -0
  214. package/dist/node_modules/tedious/lib/transient-error-lookup.d.ts +3 -0
  215. package/dist/node_modules/tedious/lib/transient-error-lookup.js +19 -0
  216. package/dist/node_modules/tedious/lib/utils/with-timeout.d.ts +7 -0
  217. package/dist/node_modules/tedious/lib/utils/with-timeout.js +36 -0
  218. package/dist/node_modules/tedious/lib/value-parser.d.ts +7 -0
  219. package/dist/node_modules/tedious/lib/value-parser.js +813 -0
  220. package/dist/node_modules/tedious/node_modules/@types/node/assert/strict.d.ts +105 -0
  221. package/dist/node_modules/tedious/node_modules/@types/node/assert.d.ts +955 -0
  222. package/dist/node_modules/tedious/node_modules/@types/node/async_hooks.d.ts +623 -0
  223. package/dist/node_modules/tedious/node_modules/@types/node/buffer.buffer.d.ts +466 -0
  224. package/dist/node_modules/tedious/node_modules/@types/node/buffer.d.ts +1810 -0
  225. package/dist/node_modules/tedious/node_modules/@types/node/child_process.d.ts +1428 -0
  226. package/dist/node_modules/tedious/node_modules/@types/node/cluster.d.ts +486 -0
  227. package/dist/node_modules/tedious/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  228. package/dist/node_modules/tedious/node_modules/@types/node/console.d.ts +151 -0
  229. package/dist/node_modules/tedious/node_modules/@types/node/constants.d.ts +20 -0
  230. package/dist/node_modules/tedious/node_modules/@types/node/crypto.d.ts +4065 -0
  231. package/dist/node_modules/tedious/node_modules/@types/node/dgram.d.ts +564 -0
  232. package/dist/node_modules/tedious/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
  233. package/dist/node_modules/tedious/node_modules/@types/node/dns/promises.d.ts +503 -0
  234. package/dist/node_modules/tedious/node_modules/@types/node/dns.d.ts +922 -0
  235. package/dist/node_modules/tedious/node_modules/@types/node/domain.d.ts +166 -0
  236. package/dist/node_modules/tedious/node_modules/@types/node/events.d.ts +1054 -0
  237. package/dist/node_modules/tedious/node_modules/@types/node/fs/promises.d.ts +1329 -0
  238. package/dist/node_modules/tedious/node_modules/@types/node/fs.d.ts +4676 -0
  239. package/dist/node_modules/tedious/node_modules/@types/node/globals.d.ts +150 -0
  240. package/dist/node_modules/tedious/node_modules/@types/node/globals.typedarray.d.ts +101 -0
  241. package/dist/node_modules/tedious/node_modules/@types/node/http.d.ts +2167 -0
  242. package/dist/node_modules/tedious/node_modules/@types/node/http2.d.ts +2480 -0
  243. package/dist/node_modules/tedious/node_modules/@types/node/https.d.ts +405 -0
  244. package/dist/node_modules/tedious/node_modules/@types/node/index.d.ts +115 -0
  245. package/dist/node_modules/tedious/node_modules/@types/node/inspector/promises.d.ts +41 -0
  246. package/dist/node_modules/tedious/node_modules/@types/node/inspector.d.ts +224 -0
  247. package/dist/node_modules/tedious/node_modules/@types/node/inspector.generated.d.ts +4226 -0
  248. package/dist/node_modules/tedious/node_modules/@types/node/module.d.ts +819 -0
  249. package/dist/node_modules/tedious/node_modules/@types/node/net.d.ts +933 -0
  250. package/dist/node_modules/tedious/node_modules/@types/node/os.d.ts +507 -0
  251. package/dist/node_modules/tedious/node_modules/@types/node/package.json +155 -0
  252. package/dist/node_modules/tedious/node_modules/@types/node/path/posix.d.ts +8 -0
  253. package/dist/node_modules/tedious/node_modules/@types/node/path/win32.d.ts +8 -0
  254. package/dist/node_modules/tedious/node_modules/@types/node/path.d.ts +187 -0
  255. package/dist/node_modules/tedious/node_modules/@types/node/perf_hooks.d.ts +643 -0
  256. package/dist/node_modules/tedious/node_modules/@types/node/process.d.ts +2161 -0
  257. package/dist/node_modules/tedious/node_modules/@types/node/punycode.d.ts +117 -0
  258. package/dist/node_modules/tedious/node_modules/@types/node/querystring.d.ts +152 -0
  259. package/dist/node_modules/tedious/node_modules/@types/node/quic.d.ts +910 -0
  260. package/dist/node_modules/tedious/node_modules/@types/node/readline/promises.d.ts +161 -0
  261. package/dist/node_modules/tedious/node_modules/@types/node/readline.d.ts +541 -0
  262. package/dist/node_modules/tedious/node_modules/@types/node/repl.d.ts +415 -0
  263. package/dist/node_modules/tedious/node_modules/@types/node/sea.d.ts +162 -0
  264. package/dist/node_modules/tedious/node_modules/@types/node/sqlite.d.ts +955 -0
  265. package/dist/node_modules/tedious/node_modules/@types/node/stream/consumers.d.ts +38 -0
  266. package/dist/node_modules/tedious/node_modules/@types/node/stream/promises.d.ts +211 -0
  267. package/dist/node_modules/tedious/node_modules/@types/node/stream/web.d.ts +296 -0
  268. package/dist/node_modules/tedious/node_modules/@types/node/stream.d.ts +1760 -0
  269. package/dist/node_modules/tedious/node_modules/@types/node/string_decoder.d.ts +67 -0
  270. package/dist/node_modules/tedious/node_modules/@types/node/test/reporters.d.ts +96 -0
  271. package/dist/node_modules/tedious/node_modules/@types/node/test.d.ts +2240 -0
  272. package/dist/node_modules/tedious/node_modules/@types/node/timers/promises.d.ts +108 -0
  273. package/dist/node_modules/tedious/node_modules/@types/node/timers.d.ts +159 -0
  274. package/dist/node_modules/tedious/node_modules/@types/node/tls.d.ts +1198 -0
  275. package/dist/node_modules/tedious/node_modules/@types/node/trace_events.d.ts +197 -0
  276. package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
  277. package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  278. package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  279. package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/index.d.ts +117 -0
  280. package/dist/node_modules/tedious/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  281. package/dist/node_modules/tedious/node_modules/@types/node/ts5.7/index.d.ts +117 -0
  282. package/dist/node_modules/tedious/node_modules/@types/node/tty.d.ts +250 -0
  283. package/dist/node_modules/tedious/node_modules/@types/node/url.d.ts +519 -0
  284. package/dist/node_modules/tedious/node_modules/@types/node/util/types.d.ts +558 -0
  285. package/dist/node_modules/tedious/node_modules/@types/node/util.d.ts +1662 -0
  286. package/dist/node_modules/tedious/node_modules/@types/node/v8.d.ts +983 -0
  287. package/dist/node_modules/tedious/node_modules/@types/node/vm.d.ts +1208 -0
  288. package/dist/node_modules/tedious/node_modules/@types/node/wasi.d.ts +202 -0
  289. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
  290. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  291. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/console.d.ts +9 -0
  292. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
  293. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  294. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  295. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/events.d.ts +106 -0
  296. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
  297. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  298. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  299. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  300. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  301. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  302. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/streams.d.ts +115 -0
  303. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  304. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/url.d.ts +24 -0
  305. package/dist/node_modules/tedious/node_modules/@types/node/worker_threads.d.ts +717 -0
  306. package/dist/node_modules/tedious/node_modules/@types/node/zlib.d.ts +618 -0
  307. package/dist/node_modules/tedious/node_modules/bl/.github/dependabot.yml +16 -0
  308. package/dist/node_modules/tedious/node_modules/bl/.github/workflows/test-and-release.yml +61 -0
  309. package/dist/node_modules/tedious/node_modules/bl/BufferList.d.ts +431 -0
  310. package/dist/node_modules/tedious/node_modules/bl/BufferList.js +421 -0
  311. package/dist/node_modules/tedious/node_modules/bl/bl.js +84 -0
  312. package/dist/node_modules/tedious/node_modules/bl/index.d.ts +88 -0
  313. package/dist/node_modules/tedious/node_modules/bl/package.json +123 -0
  314. package/dist/node_modules/tedious/node_modules/bl/test/convert.js +21 -0
  315. package/dist/node_modules/tedious/node_modules/bl/test/indexOf.js +492 -0
  316. package/dist/node_modules/tedious/node_modules/bl/test/isBufferList.js +32 -0
  317. package/dist/node_modules/tedious/node_modules/bl/test/test.js +1032 -0
  318. package/dist/node_modules/tedious/node_modules/buffer/index.d.ts +194 -0
  319. package/dist/node_modules/tedious/node_modules/buffer/index.js +2106 -0
  320. package/dist/node_modules/tedious/node_modules/buffer/package.json +93 -0
  321. package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
  322. package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
  323. package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_readable.js +4 -0
  324. package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_transform.js +4 -0
  325. package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_writable.js +4 -0
  326. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
  327. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
  328. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
  329. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
  330. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
  331. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
  332. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +286 -0
  333. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
  334. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
  335. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/legacy.js +89 -0
  336. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
  337. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
  338. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
  339. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/readable.js +1290 -0
  340. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
  341. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
  342. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/utils.js +327 -0
  343. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/writable.js +819 -0
  344. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/validators.js +530 -0
  345. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/browser.js +35 -0
  346. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/errors.js +343 -0
  347. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/index.js +65 -0
  348. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/primordials.js +124 -0
  349. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/util/inspect.js +55 -0
  350. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/util.js +148 -0
  351. package/dist/node_modules/tedious/node_modules/readable-stream/lib/stream/promises.js +43 -0
  352. package/dist/node_modules/tedious/node_modules/readable-stream/lib/stream.js +143 -0
  353. package/dist/node_modules/tedious/node_modules/readable-stream/package.json +88 -0
  354. package/dist/node_modules/tedious/node_modules/sprintf-js/dist/.gitattributes +4 -0
  355. package/dist/node_modules/tedious/node_modules/sprintf-js/dist/angular-sprintf.min.js +3 -0
  356. package/dist/node_modules/tedious/node_modules/sprintf-js/dist/sprintf.min.js +3 -0
  357. package/dist/node_modules/tedious/node_modules/sprintf-js/package.json +35 -0
  358. package/dist/node_modules/tedious/node_modules/sprintf-js/src/angular-sprintf.js +24 -0
  359. package/dist/node_modules/tedious/node_modules/sprintf-js/src/sprintf.js +231 -0
  360. package/dist/node_modules/tedious/node_modules/undici-types/agent.d.ts +32 -0
  361. package/dist/node_modules/tedious/node_modules/undici-types/api.d.ts +43 -0
  362. package/dist/node_modules/tedious/node_modules/undici-types/balanced-pool.d.ts +29 -0
  363. package/dist/node_modules/tedious/node_modules/undici-types/cache-interceptor.d.ts +172 -0
  364. package/dist/node_modules/tedious/node_modules/undici-types/cache.d.ts +36 -0
  365. package/dist/node_modules/tedious/node_modules/undici-types/client-stats.d.ts +15 -0
  366. package/dist/node_modules/tedious/node_modules/undici-types/client.d.ts +108 -0
  367. package/dist/node_modules/tedious/node_modules/undici-types/connector.d.ts +34 -0
  368. package/dist/node_modules/tedious/node_modules/undici-types/content-type.d.ts +21 -0
  369. package/dist/node_modules/tedious/node_modules/undici-types/cookies.d.ts +30 -0
  370. package/dist/node_modules/tedious/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
  371. package/dist/node_modules/tedious/node_modules/undici-types/dispatcher.d.ts +276 -0
  372. package/dist/node_modules/tedious/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  373. package/dist/node_modules/tedious/node_modules/undici-types/errors.d.ts +161 -0
  374. package/dist/node_modules/tedious/node_modules/undici-types/eventsource.d.ts +66 -0
  375. package/dist/node_modules/tedious/node_modules/undici-types/fetch.d.ts +211 -0
  376. package/dist/node_modules/tedious/node_modules/undici-types/formdata.d.ts +108 -0
  377. package/dist/node_modules/tedious/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  378. package/dist/node_modules/tedious/node_modules/undici-types/global-origin.d.ts +7 -0
  379. package/dist/node_modules/tedious/node_modules/undici-types/h2c-client.d.ts +73 -0
  380. package/dist/node_modules/tedious/node_modules/undici-types/handlers.d.ts +15 -0
  381. package/dist/node_modules/tedious/node_modules/undici-types/header.d.ts +160 -0
  382. package/dist/node_modules/tedious/node_modules/undici-types/index.d.ts +80 -0
  383. package/dist/node_modules/tedious/node_modules/undici-types/interceptors.d.ts +39 -0
  384. package/dist/node_modules/tedious/node_modules/undici-types/mock-agent.d.ts +68 -0
  385. package/dist/node_modules/tedious/node_modules/undici-types/mock-call-history.d.ts +111 -0
  386. package/dist/node_modules/tedious/node_modules/undici-types/mock-client.d.ts +27 -0
  387. package/dist/node_modules/tedious/node_modules/undici-types/mock-errors.d.ts +12 -0
  388. package/dist/node_modules/tedious/node_modules/undici-types/mock-interceptor.d.ts +94 -0
  389. package/dist/node_modules/tedious/node_modules/undici-types/mock-pool.d.ts +27 -0
  390. package/dist/node_modules/tedious/node_modules/undici-types/package.json +55 -0
  391. package/dist/node_modules/tedious/node_modules/undici-types/patch.d.ts +29 -0
  392. package/dist/node_modules/tedious/node_modules/undici-types/pool-stats.d.ts +19 -0
  393. package/dist/node_modules/tedious/node_modules/undici-types/pool.d.ts +41 -0
  394. package/dist/node_modules/tedious/node_modules/undici-types/proxy-agent.d.ts +29 -0
  395. package/dist/node_modules/tedious/node_modules/undici-types/readable.d.ts +68 -0
  396. package/dist/node_modules/tedious/node_modules/undici-types/retry-agent.d.ts +8 -0
  397. package/dist/node_modules/tedious/node_modules/undici-types/retry-handler.d.ts +125 -0
  398. package/dist/node_modules/tedious/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  399. package/dist/node_modules/tedious/node_modules/undici-types/util.d.ts +18 -0
  400. package/dist/node_modules/tedious/node_modules/undici-types/utility.d.ts +7 -0
  401. package/dist/node_modules/tedious/node_modules/undici-types/webidl.d.ts +341 -0
  402. package/dist/node_modules/tedious/node_modules/undici-types/websocket.d.ts +186 -0
  403. package/dist/node_modules/tedious/package.json +1 -0
  404. package/dist/node_modules/tedious/tsconfig.build-types.json +15 -0
  405. package/dist/node_modules/tedious/tsconfig.json +29 -0
  406. package/dist/node_modules/tedious/types/js-md4.d.ts +7 -0
  407. package/dist/node_modules/tedious/types/native-duplexpair.d.ts +12 -0
  408. package/dist/server/data-source/MssqlExternalDataSource.js +23 -2
  409. package/package.json +1 -1
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.SymmetricKey = void 0;
7
+ // This code is based on the `mssql-jdbc` library published under the conditions of MIT license.
8
+ // Copyright (c) 2019 Microsoft Corporation
9
+
10
+ class SymmetricKey {
11
+ constructor(rootKey) {
12
+ if (!rootKey) {
13
+ throw new Error('Column encryption key cannot be null.');
14
+ } else if (0 === rootKey.length) {
15
+ throw new Error('Empty column encryption key specified.');
16
+ }
17
+ this.rootKey = rootKey;
18
+ }
19
+ zeroOutKey() {
20
+ this.rootKey = Buffer.alloc(this.rootKey.length);
21
+ }
22
+ }
23
+ exports.SymmetricKey = SymmetricKey;
24
+ var _default = exports.default = SymmetricKey;
25
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJTeW1tZXRyaWNLZXkiLCJjb25zdHJ1Y3RvciIsInJvb3RLZXkiLCJFcnJvciIsImxlbmd0aCIsInplcm9PdXRLZXkiLCJCdWZmZXIiLCJhbGxvYyIsImV4cG9ydHMiLCJfZGVmYXVsdCIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvYWx3YXlzLWVuY3J5cHRlZC9zeW1tZXRyaWMta2V5LnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIFRoaXMgY29kZSBpcyBiYXNlZCBvbiB0aGUgYG1zc3FsLWpkYmNgIGxpYnJhcnkgcHVibGlzaGVkIHVuZGVyIHRoZSBjb25kaXRpb25zIG9mIE1JVCBsaWNlbnNlLlxuLy8gQ29weXJpZ2h0IChjKSAyMDE5IE1pY3Jvc29mdCBDb3Jwb3JhdGlvblxuXG5leHBvcnQgY2xhc3MgU3ltbWV0cmljS2V5IHtcbiAgZGVjbGFyZSByb290S2V5OiBCdWZmZXI7XG5cbiAgY29uc3RydWN0b3Iocm9vdEtleTogQnVmZmVyKSB7XG4gICAgaWYgKCFyb290S2V5KSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ0NvbHVtbiBlbmNyeXB0aW9uIGtleSBjYW5ub3QgYmUgbnVsbC4nKTtcbiAgICB9IGVsc2UgaWYgKDAgPT09IHJvb3RLZXkubGVuZ3RoKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ0VtcHR5IGNvbHVtbiBlbmNyeXB0aW9uIGtleSBzcGVjaWZpZWQuJyk7XG4gICAgfVxuICAgIHRoaXMucm9vdEtleSA9IHJvb3RLZXk7XG4gIH1cblxuICB6ZXJvT3V0S2V5KCkge1xuICAgIHRoaXMucm9vdEtleSA9IEJ1ZmZlci5hbGxvYyh0aGlzLnJvb3RLZXkubGVuZ3RoKTtcbiAgfVxufVxuZXhwb3J0IGRlZmF1bHQgU3ltbWV0cmljS2V5O1xuIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQTtBQUNBOztBQUVPLE1BQU1BLFlBQVksQ0FBQztFQUd4QkMsV0FBV0EsQ0FBQ0MsT0FBZSxFQUFFO0lBQzNCLElBQUksQ0FBQ0EsT0FBTyxFQUFFO01BQ1osTUFBTSxJQUFJQyxLQUFLLENBQUMsdUNBQXVDLENBQUM7SUFDMUQsQ0FBQyxNQUFNLElBQUksQ0FBQyxLQUFLRCxPQUFPLENBQUNFLE1BQU0sRUFBRTtNQUMvQixNQUFNLElBQUlELEtBQUssQ0FBQyx3Q0FBd0MsQ0FBQztJQUMzRDtJQUNBLElBQUksQ0FBQ0QsT0FBTyxHQUFHQSxPQUFPO0VBQ3hCO0VBRUFHLFVBQVVBLENBQUEsRUFBRztJQUNYLElBQUksQ0FBQ0gsT0FBTyxHQUFHSSxNQUFNLENBQUNDLEtBQUssQ0FBQyxJQUFJLENBQUNMLE9BQU8sQ0FBQ0UsTUFBTSxDQUFDO0VBQ2xEO0FBQ0Y7QUFBQ0ksT0FBQSxDQUFBUixZQUFBLEdBQUFBLFlBQUE7QUFBQSxJQUFBUyxRQUFBLEdBQUFELE9BQUEsQ0FBQUUsT0FBQSxHQUNjVixZQUFZIn0=
@@ -0,0 +1,73 @@
1
+ import { CEKEntry } from './cek-entry';
2
+ import { type BaseMetadata } from '../metadata-parser';
3
+ export interface EncryptionKeyInfo {
4
+ encryptedKey: Buffer;
5
+ dbId: number;
6
+ keyId: number;
7
+ keyVersion: number;
8
+ mdVersion: Buffer;
9
+ keyPath: string;
10
+ keyStoreName: string;
11
+ algorithmName: string;
12
+ }
13
+ export declare enum SQLServerEncryptionType {
14
+ Deterministic = 1,
15
+ Randomized = 2,
16
+ PlainText = 0
17
+ }
18
+ export interface EncryptionAlgorithm {
19
+ encryptData: (plainText: Buffer) => Buffer;
20
+ decryptData: (cipherText: Buffer) => Buffer;
21
+ }
22
+ export interface CryptoMetadata {
23
+ cekEntry?: CEKEntry;
24
+ cipherAlgorithmId: number;
25
+ cipherAlgorithmName?: string;
26
+ normalizationRuleVersion: Buffer;
27
+ encryptionKeyInfo?: EncryptionKeyInfo;
28
+ ordinal: number;
29
+ encryptionType: SQLServerEncryptionType;
30
+ cipherAlgorithm?: EncryptionAlgorithm;
31
+ baseTypeInfo?: BaseMetadata;
32
+ }
33
+ export interface HashMap<T> {
34
+ [hash: string]: T;
35
+ }
36
+ export declare enum DescribeParameterEncryptionResultSet1 {
37
+ KeyOrdinal = 0,
38
+ DbId = 1,
39
+ KeyId = 2,
40
+ KeyVersion = 3,
41
+ KeyMdVersion = 4,
42
+ EncryptedKey = 5,
43
+ ProviderName = 6,
44
+ KeyPath = 7,
45
+ KeyEncryptionAlgorithm = 8
46
+ }
47
+ export declare enum DescribeParameterEncryptionResultSet2 {
48
+ ParameterOrdinal = 0,
49
+ ParameterName = 1,
50
+ ColumnEncryptionAlgorithm = 2,
51
+ ColumnEncrytionType = 3,
52
+ ColumnEncryptionKeyOrdinal = 4,
53
+ NormalizationRuleVersion = 5
54
+ }
55
+ export declare enum SQLServerStatementColumnEncryptionSetting {
56
+ /**
57
+ * if "Column Encryption Setting=Enabled" in the connection string, use Enabled. Otherwise, maps to Disabled.
58
+ */
59
+ UseConnectionSetting = 0,
60
+ /**
61
+ * Enables TCE for the command. Overrides the connection level setting for this command.
62
+ */
63
+ Enabled = 1,
64
+ /**
65
+ * Parameters will not be encrypted, only the ResultSet will be decrypted. This is an optimization for queries that
66
+ * do not pass any encrypted input parameters. Overrides the connection level setting for this command.
67
+ */
68
+ ResultSetOnly = 2,
69
+ /**
70
+ * Disables TCE for the command.Overrides the connection level setting for this command.
71
+ */
72
+ Disabled = 3
73
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SQLServerStatementColumnEncryptionSetting = exports.SQLServerEncryptionType = exports.DescribeParameterEncryptionResultSet2 = exports.DescribeParameterEncryptionResultSet1 = void 0;
7
+ // This code is based on the `mssql-jdbc` library published under the conditions of MIT license.
8
+ // Copyright (c) 2019 Microsoft Corporation
9
+ let SQLServerEncryptionType = exports.SQLServerEncryptionType = /*#__PURE__*/function (SQLServerEncryptionType) {
10
+ SQLServerEncryptionType[SQLServerEncryptionType["Deterministic"] = 1] = "Deterministic";
11
+ SQLServerEncryptionType[SQLServerEncryptionType["Randomized"] = 2] = "Randomized";
12
+ SQLServerEncryptionType[SQLServerEncryptionType["PlainText"] = 0] = "PlainText";
13
+ return SQLServerEncryptionType;
14
+ }({});
15
+ // Fields in the first resultset of "sp_describe_parameter_encryption"
16
+ // We expect the server to return the fields in the resultset in the same order as mentioned below.
17
+ // If the server changes the below order, then transparent parameter encryption will break.
18
+ let DescribeParameterEncryptionResultSet1 = exports.DescribeParameterEncryptionResultSet1 = /*#__PURE__*/function (DescribeParameterEncryptionResultSet1) {
19
+ DescribeParameterEncryptionResultSet1[DescribeParameterEncryptionResultSet1["KeyOrdinal"] = 0] = "KeyOrdinal";
20
+ DescribeParameterEncryptionResultSet1[DescribeParameterEncryptionResultSet1["DbId"] = 1] = "DbId";
21
+ DescribeParameterEncryptionResultSet1[DescribeParameterEncryptionResultSet1["KeyId"] = 2] = "KeyId";
22
+ DescribeParameterEncryptionResultSet1[DescribeParameterEncryptionResultSet1["KeyVersion"] = 3] = "KeyVersion";
23
+ DescribeParameterEncryptionResultSet1[DescribeParameterEncryptionResultSet1["KeyMdVersion"] = 4] = "KeyMdVersion";
24
+ DescribeParameterEncryptionResultSet1[DescribeParameterEncryptionResultSet1["EncryptedKey"] = 5] = "EncryptedKey";
25
+ DescribeParameterEncryptionResultSet1[DescribeParameterEncryptionResultSet1["ProviderName"] = 6] = "ProviderName";
26
+ DescribeParameterEncryptionResultSet1[DescribeParameterEncryptionResultSet1["KeyPath"] = 7] = "KeyPath";
27
+ DescribeParameterEncryptionResultSet1[DescribeParameterEncryptionResultSet1["KeyEncryptionAlgorithm"] = 8] = "KeyEncryptionAlgorithm";
28
+ return DescribeParameterEncryptionResultSet1;
29
+ }({}); // Fields in the second resultset of "sp_describe_parameter_encryption"
30
+ // We expect the server to return the fields in the resultset in the same order as mentioned below.
31
+ // If the server changes the below order, then transparent parameter encryption will break.
32
+ let DescribeParameterEncryptionResultSet2 = exports.DescribeParameterEncryptionResultSet2 = /*#__PURE__*/function (DescribeParameterEncryptionResultSet2) {
33
+ DescribeParameterEncryptionResultSet2[DescribeParameterEncryptionResultSet2["ParameterOrdinal"] = 0] = "ParameterOrdinal";
34
+ DescribeParameterEncryptionResultSet2[DescribeParameterEncryptionResultSet2["ParameterName"] = 1] = "ParameterName";
35
+ DescribeParameterEncryptionResultSet2[DescribeParameterEncryptionResultSet2["ColumnEncryptionAlgorithm"] = 2] = "ColumnEncryptionAlgorithm";
36
+ DescribeParameterEncryptionResultSet2[DescribeParameterEncryptionResultSet2["ColumnEncrytionType"] = 3] = "ColumnEncrytionType";
37
+ DescribeParameterEncryptionResultSet2[DescribeParameterEncryptionResultSet2["ColumnEncryptionKeyOrdinal"] = 4] = "ColumnEncryptionKeyOrdinal";
38
+ DescribeParameterEncryptionResultSet2[DescribeParameterEncryptionResultSet2["NormalizationRuleVersion"] = 5] = "NormalizationRuleVersion";
39
+ return DescribeParameterEncryptionResultSet2;
40
+ }({});
41
+ let SQLServerStatementColumnEncryptionSetting = exports.SQLServerStatementColumnEncryptionSetting = /*#__PURE__*/function (SQLServerStatementColumnEncryptionSetting) {
42
+ SQLServerStatementColumnEncryptionSetting[SQLServerStatementColumnEncryptionSetting["UseConnectionSetting"] = 0] = "UseConnectionSetting";
43
+ SQLServerStatementColumnEncryptionSetting[SQLServerStatementColumnEncryptionSetting["Enabled"] = 1] = "Enabled";
44
+ SQLServerStatementColumnEncryptionSetting[SQLServerStatementColumnEncryptionSetting["ResultSetOnly"] = 2] = "ResultSetOnly";
45
+ SQLServerStatementColumnEncryptionSetting[SQLServerStatementColumnEncryptionSetting["Disabled"] = 3] = "Disabled";
46
+ return SQLServerStatementColumnEncryptionSetting;
47
+ }({});
48
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJTUUxTZXJ2ZXJFbmNyeXB0aW9uVHlwZSIsImV4cG9ydHMiLCJEZXNjcmliZVBhcmFtZXRlckVuY3J5cHRpb25SZXN1bHRTZXQxIiwiRGVzY3JpYmVQYXJhbWV0ZXJFbmNyeXB0aW9uUmVzdWx0U2V0MiIsIlNRTFNlcnZlclN0YXRlbWVudENvbHVtbkVuY3J5cHRpb25TZXR0aW5nIl0sInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Fsd2F5cy1lbmNyeXB0ZWQvdHlwZXMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gVGhpcyBjb2RlIGlzIGJhc2VkIG9uIHRoZSBgbXNzcWwtamRiY2AgbGlicmFyeSBwdWJsaXNoZWQgdW5kZXIgdGhlIGNvbmRpdGlvbnMgb2YgTUlUIGxpY2Vuc2UuXG4vLyBDb3B5cmlnaHQgKGMpIDIwMTkgTWljcm9zb2Z0IENvcnBvcmF0aW9uXG5cbmltcG9ydCB7IENFS0VudHJ5IH0gZnJvbSAnLi9jZWstZW50cnknO1xuaW1wb3J0IHsgdHlwZSBCYXNlTWV0YWRhdGEgfSBmcm9tICcuLi9tZXRhZGF0YS1wYXJzZXInO1xuXG5leHBvcnQgaW50ZXJmYWNlIEVuY3J5cHRpb25LZXlJbmZvIHtcbiAgZW5jcnlwdGVkS2V5OiBCdWZmZXI7XG4gIGRiSWQ6IG51b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scUNBQXFDLENBQXJDQSxxQ0FBcUM7RUFBckNBLHFDQUFxQyxDQUFyQ0EscUNBQXFDO0VBQUEsT0FBckNBLHFDQUFxQztBQUFBO0FBQUEsSUFTckNDLHlDQUF5QyxHQUFBSCxPQUFBLENBQUFHLHlDQUFBLDBCQUF6Q0EseUNBQXlDO0VBQXpDQSx5Q0FBeUMsQ0FBekNBLHlDQUF5QztFQUF6Q0EseUNBQXlDLENBQXpDQSx5Q0FBeUM7RUFBekNBLHlDQUF5QyxDQUF6Q0EseUNBQXlDO0VBQXpDQSx5Q0FBeUMsQ0FBekNBLHlDQUF5QztFQUFBLE9BQXpDQSx5Q0FBeUM7QUFBQSJ9
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.shouldHonorAE = void 0;
7
+ var _types = require("./types");
8
+ // This code is based on the `mssql-jdbc` library published under the conditions of MIT license.
9
+ // Copyright (c) 2019 Microsoft Corporation
10
+
11
+ const shouldHonorAE = (stmtColumnEncryptionSetting, columnEncryptionSetting) => {
12
+ switch (stmtColumnEncryptionSetting) {
13
+ case _types.SQLServerStatementColumnEncryptionSetting.Disabled:
14
+ case _types.SQLServerStatementColumnEncryptionSetting.ResultSetOnly:
15
+ return false;
16
+ case _types.SQLServerStatementColumnEncryptionSetting.Enabled:
17
+ return true;
18
+ default:
19
+ return columnEncryptionSetting;
20
+ }
21
+ };
22
+ exports.shouldHonorAE = shouldHonorAE;
23
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfdHlwZXMiLCJyZXF1aXJlIiwic2hvdWxkSG9ub3JBRSIsInN0bXRDb2x1bW5FbmNyeXB0aW9uU2V0dGluZyIsImNvbHVtbkVuY3J5cHRpb25TZXR0aW5nIiwiU1FMU2VydmVyU3RhdGVtZW50Q29sdW1uRW5jcnlwdGlvblNldHRpbmciLCJEaXNhYmxlZCIsIlJl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bn07XG4iXSwibWFwcGluZ3MiOiI7Ozs7OztBQUdBLElBQUFBLE1BQUEsR0FBQUMsT0FBQTtBQUhBO0FBQ0E7O0FBSU8sTUFBTUMsYUFBYSxHQUFHQSxDQUFDQywyQkFBc0UsRUFBRUMsdUJBQWdDLEtBQWM7RUFDbEosUUFBUUQsMkJBQTJCO0lBQ2pDLEtBQUtFLGdEQUF5QyxDQUFDQyxRQUFRO0lBQ3ZELEtBQUtELGdEQUF5QyxDQUFDRSxhQUFhO01BQzFELE9BQU8sS0FBSztJQUNkLEtBQUtGLGdEQUF5QyxDQUFDRyxPQUFPO01BQ3BELE9BQU8sSUFBSTtJQUNiO01BQ0UsT0FBT0osdUJBQXVCO0VBQ2xDO0FBQ0YsQ0FBQztBQUFDSyxPQUFBLENBQUFQLGFBQUEsR0FBQUEsYUFBQSJ9
@@ -0,0 +1,8 @@
1
+ import BulkLoad from './bulk-load';
2
+ export declare class BulkLoadPayload implements AsyncIterable<Buffer> {
3
+ bulkLoad: BulkLoad;
4
+ iterator: AsyncIterableIterator<Buffer>;
5
+ constructor(bulkLoad: BulkLoad);
6
+ [Symbol.asyncIterator](): AsyncIterableIterator<Buffer>;
7
+ toString(indent?: string): string;
8
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BulkLoadPayload = void 0;
7
+ class BulkLoadPayload {
8
+ constructor(bulkLoad) {
9
+ this.bulkLoad = bulkLoad;
10
+
11
+ // We need to grab the iterator here so that `error` event handlers are set up
12
+ // as early as possible (and are not potentially lost).
13
+ this.iterator = this.bulkLoad.rowToPacketTransform[Symbol.asyncIterator]();
14
+ }
15
+ [Symbol.asyncIterator]() {
16
+ return this.iterator;
17
+ }
18
+ toString(indent = '') {
19
+ return indent + 'BulkLoad';
20
+ }
21
+ }
22
+ exports.BulkLoadPayload = BulkLoadPayload;
23
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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AgICByZXR1cm4gaW5kZW50ICsgKCdCdWxrTG9hZCcpO1xuICB9XG59XG4iXSwibWFwcGluZ3MiOiI7Ozs7OztBQUVPLE1BQU1BLGVBQWUsQ0FBa0M7RUFJNURDLFdBQVdBLENBQUNDLFFBQWtCLEVBQUU7SUFDOUIsSUFBSSxDQUFDQSxRQUFRLEdBQUdBLFFBQVE7O0lBRXhCO0lBQ0E7SUFDQSxJQUFJLENBQUNDLFFBQVEsR0FBRyxJQUFJLENBQUNELFFBQVEsQ0FBQ0Usb0JBQW9CLENBQUNDLE1BQU0sQ0FBQ0MsYUFBYSxDQUFDLENBQUMsQ0FBQztFQUM1RTtFQUVBLENBQUNELE1BQU0sQ0FBQ0MsYUFBYSxJQUFJO0lBQ3ZCLE9BQU8sSUFBSSxDQUFDSCxRQUFRO0VBQ3RCO0VBRUFJLFFBQVFBLENBQUNDLE1BQU0sR0FBRyxFQUFFLEVBQUU7SUFDcEIsT0FBT0EsTUFBTSxHQUFJLFVBQVc7RUFDOUI7QUFDRjtBQUFDQyxPQUFBLENBQUFULGVBQUEsR0FBQUEsZUFBQSJ9
@@ -0,0 +1,275 @@
1
+ import { EventEmitter } from 'events';
2
+ import Connection, { type InternalConnectionOptions } from './connection';
3
+ import { Transform } from 'stream';
4
+ import { type DataType, type Parameter } from './data-type';
5
+ import { Collation } from './collation';
6
+ /**
7
+ * @private
8
+ */
9
+ interface InternalOptions {
10
+ checkConstraints: boolean;
11
+ fireTriggers: boolean;
12
+ keepNulls: boolean;
13
+ lockTable: boolean;
14
+ order: {
15
+ [columnName: string]: 'ASC' | 'DESC';
16
+ };
17
+ }
18
+ export interface Options {
19
+ /**
20
+ * Honors constraints during bulk load, using T-SQL
21
+ * [CHECK_CONSTRAINTS](https://technet.microsoft.com/en-us/library/ms186247(v=sql.105).aspx).
22
+ * (default: `false`)
23
+ */
24
+ checkConstraints?: InternalOptions['checkConstraints'] | undefined;
25
+ /**
26
+ * Honors insert triggers during bulk load, using the T-SQL [FIRE_TRIGGERS](https://technet.microsoft.com/en-us/library/ms187640(v=sql.105).aspx). (default: `false`)
27
+ */
28
+ fireTriggers?: InternalOptions['fireTriggers'] | undefined;
29
+ /**
30
+ * Honors null value passed, ignores the default values set on table, using T-SQL [KEEP_NULLS](https://msdn.microsoft.com/en-us/library/ms187887(v=sql.120).aspx). (default: `false`)
31
+ */
32
+ keepNulls?: InternalOptions['keepNulls'] | undefined;
33
+ /**
34
+ * Places a bulk update(BU) lock on table while performing bulk load, using T-SQL [TABLOCK](https://technet.microsoft.com/en-us/library/ms180876(v=sql.105).aspx). (default: `false`)
35
+ */
36
+ lockTable?: InternalOptions['lockTable'] | undefined;
37
+ /**
38
+ * Specifies the ordering of the data to possibly increase bulk insert performance, using T-SQL [ORDER](https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms177468(v=sql.105)). (default: `{}`)
39
+ */
40
+ order?: InternalOptions['order'] | undefined;
41
+ }
42
+ export type Callback =
43
+ /**
44
+ * A function which will be called after the [[BulkLoad]] finishes executing.
45
+ *
46
+ * @param rowCount the number of rows inserted
47
+ */
48
+ (err: Error | undefined | null, rowCount?: number) => void;
49
+ interface Column extends Parameter {
50
+ objName: string;
51
+ collation: Collation | undefined;
52
+ }
53
+ interface ColumnOptions {
54
+ output?: boolean;
55
+ /**
56
+ * For VarChar, NVarChar, VarBinary. Use length as `Infinity` for VarChar(max), NVarChar(max) and VarBinary(max).
57
+ */
58
+ length?: number;
59
+ /**
60
+ * For Numeric, Decimal.
61
+ */
62
+ precision?: number;
63
+ /**
64
+ * For Numeric, Decimal, Time, DateTime2, DateTimeOffset.
65
+ */
66
+ scale?: number;
67
+ /**
68
+ * If the name of the column is different from the name of the property found on `rowObj` arguments passed to [[addRow]], then you can use this option to specify the property name.
69
+ */
70
+ objName?: string;
71
+ /**
72
+ * Indicates whether the column accepts NULL values.
73
+ */
74
+ nullable?: boolean;
75
+ }
76
+ declare class RowTransform extends Transform {
77
+ /**
78
+ * @private
79
+ */
80
+ columnMetadataWritten: boolean;
81
+ /**
82
+ * @private
83
+ */
84
+ bulkLoad: BulkLoad;
85
+ /**
86
+ * @private
87
+ */
88
+ mainOptions: BulkLoad['options'];
89
+ /**
90
+ * @private
91
+ */
92
+ columns: BulkLoad['columns'];
93
+ /**
94
+ * @private
95
+ */
96
+ constructor(bulkLoad: BulkLoad);
97
+ /**
98
+ * @private
99
+ */
100
+ _transform(row: Array<unknown> | {
101
+ [colName: string]: unknown;
102
+ }, _encoding: string, callback: (error?: Error) => void): void;
103
+ /**
104
+ * @private
105
+ */
106
+ _flush(callback: () => void): void;
107
+ }
108
+ /**
109
+ * A BulkLoad instance is used to perform a bulk insert.
110
+ *
111
+ * Use [[Connection.newBulkLoad]] to create a new instance, and [[Connection.execBulkLoad]] to execute it.
112
+ *
113
+ * Example of BulkLoad Usages:
114
+ *
115
+ * ```js
116
+ * // optional BulkLoad options
117
+ * const options = { keepNulls: true };
118
+ *
119
+ * // instantiate - provide the table where you'll be inserting to, options and a callback
120
+ * const bulkLoad = connection.newBulkLoad('MyTable', options, (error, rowCount) => {
121
+ * console.log('inserted %d rows', rowCount);
122
+ * });
123
+ *
124
+ * // setup your columns - always indicate whether the column is nullable
125
+ * bulkLoad.addColumn('myInt', TYPES.Int, { nullable: false });
126
+ * bulkLoad.addColumn('myString', TYPES.NVarChar, { length: 50, nullable: true });
127
+ *
128
+ * // execute
129
+ * connection.execBulkLoad(bulkLoad, [
130
+ * { myInt: 7, myString: 'hello' },
131
+ * { myInt: 23, myString: 'world' }
132
+ * ]);
133
+ * ```
134
+ */
135
+ declare class BulkLoad extends EventEmitter {
136
+ /**
137
+ * @private
138
+ */
139
+ error: Error | undefined;
140
+ /**
141
+ * @private
142
+ */
143
+ canceled: boolean;
144
+ /**
145
+ * @private
146
+ */
147
+ executionStarted: boolean;
148
+ /**
149
+ * @private
150
+ */
151
+ streamingMode: boolean;
152
+ /**
153
+ * @private
154
+ */
155
+ table: string;
156
+ /**
157
+ * @private
158
+ */
159
+ timeout: number | undefined;
160
+ /**
161
+ * @private
162
+ */
163
+ options: InternalConnectionOptions;
164
+ /**
165
+ * @private
166
+ */
167
+ callback: Callback;
168
+ /**
169
+ * @private
170
+ */
171
+ columns: Array<Column>;
172
+ /**
173
+ * @private
174
+ */
175
+ columnsByName: {
176
+ [name: string]: Column;
177
+ };
178
+ /**
179
+ * @private
180
+ */
181
+ firstRowWritten: boolean;
182
+ /**
183
+ * @private
184
+ */
185
+ rowToPacketTransform: RowTransform;
186
+ /**
187
+ * @private
188
+ */
189
+ bulkOptions: InternalOptions;
190
+ /**
191
+ * @private
192
+ */
193
+ connection: Connection | undefined;
194
+ /**
195
+ * @private
196
+ */
197
+ rows: Array<any> | undefined;
198
+ /**
199
+ * @private
200
+ */
201
+ rst: Array<any> | undefined;
202
+ /**
203
+ * @private
204
+ */
205
+ rowCount: number | undefined;
206
+ collation: Collation | undefined;
207
+ /**
208
+ * @private
209
+ */
210
+ constructor(table: string, collation: Collation | undefined, connectionOptions: InternalConnectionOptions, { checkConstraints, fireTriggers, keepNulls, lockTable, order, }: Options, callback: Callback);
211
+ /**
212
+ * Adds a column to the bulk load.
213
+ *
214
+ * The column definitions should match the table you are trying to insert into.
215
+ * Attempting to call addColumn after the first row has been added will throw an exception.
216
+ *
217
+ * ```js
218
+ * bulkLoad.addColumn('MyIntColumn', TYPES.Int, { nullable: false });
219
+ * ```
220
+ *
221
+ * @param name The name of the column.
222
+ * @param type One of the supported `data types`.
223
+ * @param __namedParameters Additional column type information. At a minimum, `nullable` must be set to true or false.
224
+ * @param length For VarChar, NVarChar, VarBinary. Use length as `Infinity` for VarChar(max), NVarChar(max) and VarBinary(max).
225
+ * @param nullable Indicates whether the column accepts NULL values.
226
+ * @param objName If the name of the column is different from the name of the property found on `rowObj` arguments passed to [[addRow]] or [[Connection.execBulkLoad]], then you can use this option to specify the property name.
227
+ * @param precision For Numeric, Decimal.
228
+ * @param scale For Numeric, Decimal, Time, DateTime2, DateTimeOffset.
229
+ */
230
+ addColumn(name: string, type: DataType, { output, length, precision, scale, objName, nullable }: ColumnOptions): void;
231
+ /**
232
+ * @private
233
+ */
234
+ getOptionsSql(): string;
235
+ /**
236
+ * @private
237
+ */
238
+ getBulkInsertSql(): string;
239
+ /**
240
+ * This is simply a helper utility function which returns a `CREATE TABLE SQL` statement based on the columns added to the bulkLoad object.
241
+ * This may be particularly handy when you want to insert into a temporary table (a table which starts with `#`).
242
+ *
243
+ * ```js
244
+ * var sql = bulkLoad.getTableCreationSql();
245
+ * ```
246
+ *
247
+ * A side note on bulk inserting into temporary tables: if you want to access a local temporary table after executing the bulk load,
248
+ * you'll need to use the same connection and execute your requests using [[Connection.execSqlBatch]] instead of [[Connection.execSql]]
249
+ */
250
+ getTableCreationSql(): string;
251
+ /**
252
+ * @private
253
+ */
254
+ getColMetaData(): Buffer;
255
+ /**
256
+ * Sets a timeout for this bulk load.
257
+ *
258
+ * ```js
259
+ * bulkLoad.setTimeout(timeout);
260
+ * ```
261
+ *
262
+ * @param timeout The number of milliseconds before the bulk load is considered failed, or 0 for no timeout.
263
+ * When no timeout is set for the bulk load, the [[ConnectionOptions.requestTimeout]] of the Connection is used.
264
+ */
265
+ setTimeout(timeout?: number): void;
266
+ /**
267
+ * @private
268
+ */
269
+ createDoneToken(): Buffer;
270
+ /**
271
+ * @private
272
+ */
273
+ cancel(): void;
274
+ }
275
+ export default BulkLoad;