orcaq 1.0.32 → 1.1.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.
Files changed (628) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/4by6-f6q.js +982 -0
  3. package/.output/public/_nuxt/8Ppmjv9D.js +1 -0
  4. package/.output/public/_nuxt/B1qjkRVO.js +1 -0
  5. package/.output/public/_nuxt/B3KEisfc.js +1 -0
  6. package/.output/public/_nuxt/B4ebLeWY.js +9 -0
  7. package/.output/public/_nuxt/{IitECNfD.js → B6hH0qos.js} +1 -1
  8. package/.output/public/_nuxt/{BUDtG__q.js → B7HEMfgt.js} +1 -1
  9. package/.output/public/_nuxt/B84SvUzr.js +1 -0
  10. package/.output/public/_nuxt/BDXvbRNW.js +1 -0
  11. package/.output/public/_nuxt/BGRcizqy.js +1 -0
  12. package/.output/public/_nuxt/{ClYziJpO.js → BGVGiigU.js} +1 -1
  13. package/.output/public/_nuxt/{ZdjmUBoX.js → BJYf67_H.js} +1 -1
  14. package/.output/public/_nuxt/BOK5ZFNK.js +1 -0
  15. package/.output/public/_nuxt/BPY2ud8g.js +1 -0
  16. package/.output/public/_nuxt/BSONoRG4.js +2 -0
  17. package/.output/public/_nuxt/BT53m-su.js +1 -0
  18. package/.output/public/_nuxt/BTJSh8in.js +2 -0
  19. package/.output/public/_nuxt/BVpt8J3a.js +1 -0
  20. package/.output/public/_nuxt/{BhUkpIlA.js → BdDEVolW.js} +1 -1
  21. package/.output/public/_nuxt/{C27bL9Es.js → BeNILdbT.js} +1 -1
  22. package/.output/public/_nuxt/{Dnx67EG9.js → BmU9CNkM.js} +1 -1
  23. package/.output/public/_nuxt/{DLHYqHwF.js → BnFDcr74.js} +1 -1
  24. package/.output/public/_nuxt/{sE-55p4e.js → BprXyYdv.js} +1 -1
  25. package/.output/public/_nuxt/{BCcTASq_.js → Bq7otXBA.js} +1 -1
  26. package/.output/public/_nuxt/{B_PBOfFN.js → BqyO8OjC.js} +93 -93
  27. package/.output/public/_nuxt/Bs1og3h1.js +10 -0
  28. package/.output/public/_nuxt/Bs2DgR_z.js +1 -0
  29. package/.output/public/_nuxt/{BsoQBloB.js → BvUhrUEH.js} +1 -1
  30. package/.output/public/_nuxt/{DkggUtNN.js → BxDrCsPf.js} +1 -1
  31. package/.output/public/_nuxt/BxrwrGYE.js +1 -0
  32. package/.output/public/_nuxt/By0aUn7N.js +1 -0
  33. package/.output/public/_nuxt/{C07rlnlv.js → ByOuUnNS.js} +1 -1
  34. package/.output/public/_nuxt/C177_GoB.js +1 -0
  35. package/.output/public/_nuxt/{DcfsxCxL.js → C1jMZ4hc.js} +1 -1
  36. package/.output/public/_nuxt/C5bgdIOp.js +1 -0
  37. package/.output/public/_nuxt/C69a9jD3.js +67 -0
  38. package/.output/public/_nuxt/C8AyZ3_X.js +2 -0
  39. package/.output/public/_nuxt/C8KplD68.js +1 -0
  40. package/.output/public/_nuxt/CA99KAte.js +3 -0
  41. package/.output/public/_nuxt/{CvTHaPAO.js → CE8aasoy.js} +1 -1
  42. package/.output/public/_nuxt/{DkY69STm.js → CEvNlevo.js} +1 -1
  43. package/.output/public/_nuxt/{B8JnYxjr.js → CKqvNpN3.js} +1 -1
  44. package/.output/public/_nuxt/CNF1h1lI.js +1 -0
  45. package/.output/public/_nuxt/COAycMg4.js +1 -0
  46. package/.output/public/_nuxt/CR6_eO9a.js +6 -0
  47. package/.output/public/_nuxt/{D4jn2f-6.js → CREZ9f0O.js} +4 -4
  48. package/.output/public/_nuxt/CS5ItJPR.js +39 -0
  49. package/.output/public/_nuxt/CcK14gfI.js +1 -0
  50. package/.output/public/_nuxt/{DnxDSFih.js → Ci43mke5.js} +3 -3
  51. package/.output/public/_nuxt/CjouDEjz.js +1 -0
  52. package/.output/public/_nuxt/Cp5lMcfd.js +1 -0
  53. package/.output/public/_nuxt/CpYiq1Wv.js +1 -0
  54. package/.output/public/_nuxt/{DVxTxYP4.js → CrLqg4B0.js} +1 -1
  55. package/.output/public/_nuxt/{BJxYuvXF.js → CvcedJeQ.js} +1 -1
  56. package/.output/public/_nuxt/{FIJP2AmN.js → Cvq07PgE.js} +1 -1
  57. package/.output/public/_nuxt/CwmbX4-U.js +1 -0
  58. package/.output/public/_nuxt/{B27ECqWz.js → Cx6s86aR.js} +1 -1
  59. package/.output/public/_nuxt/{DDYV6jDr.js → CybtvDjH.js} +1 -1
  60. package/.output/public/_nuxt/CzB2y8br.js +18 -0
  61. package/.output/public/_nuxt/{-p9JbKy8.js → D-YUpbah.js} +3 -3
  62. package/.output/public/_nuxt/D60Pzl_V.js +1 -0
  63. package/.output/public/_nuxt/D9BYd7AV.js +1 -0
  64. package/.output/public/_nuxt/D9dEqMyH.js +152 -0
  65. package/.output/public/_nuxt/DCJ49Fnq.js +1 -0
  66. package/.output/public/_nuxt/{gO22NLpn.js → DESYlybj.js} +1 -1
  67. package/.output/public/_nuxt/DFM-aCBX.js +1 -0
  68. package/.output/public/_nuxt/{DRKnK1N_.js → DHnNoguE.js} +1 -1
  69. package/.output/public/_nuxt/{ChkFTcxr.js → DJqZzQsX.js} +1 -1
  70. package/.output/public/_nuxt/DNNdcUH4.js +1 -0
  71. package/.output/public/_nuxt/{LFK46Fls.js → DNdM2ZyK.js} +1 -1
  72. package/.output/public/_nuxt/{CVliJ52o.js → DQT4eICL.js} +1 -1
  73. package/.output/public/_nuxt/{CffFK_qY.js → DWBoXz89.js} +1 -1
  74. package/.output/public/_nuxt/DXp9fCib.js +20 -0
  75. package/.output/public/_nuxt/{ACOLmAuq.js → DaKikgWm.js} +1 -1
  76. package/.output/public/_nuxt/{B9zSkyFO.js → DaMyovpr.js} +1 -1
  77. package/.output/public/_nuxt/DeBdxlx0.js +1 -0
  78. package/.output/public/_nuxt/{trZyeId5.js → DhKwXzSk.js} +1 -1
  79. package/.output/public/_nuxt/{C6Vqzp-9.js → DkadXn5U.js} +1 -1
  80. package/.output/public/_nuxt/Dkikh2OC.js +22 -0
  81. package/.output/public/_nuxt/DlOyXrKK.js +1 -0
  82. package/.output/public/_nuxt/{UqWhjgOc.js → Dpl6-lqE.js} +1 -1
  83. package/.output/public/_nuxt/DqA_edEU.js +1 -0
  84. package/.output/public/_nuxt/DqxL2Lpl.js +1 -0
  85. package/.output/public/_nuxt/Dt3rfvTn.js +1 -0
  86. package/.output/public/_nuxt/Dt5h0Tys.js +1 -0
  87. package/.output/public/_nuxt/DwrSZ8Vj.js +1 -0
  88. package/.output/public/_nuxt/DwyFZZT6.js +1 -0
  89. package/.output/public/_nuxt/EM8J-XL1.js +7 -0
  90. package/.output/public/_nuxt/ESKvsKwc.js +1 -0
  91. package/.output/public/_nuxt/{CWGdTiOD.js → F5lCgNdb.js} +1 -1
  92. package/.output/public/_nuxt/H5m89x1B.js +1 -0
  93. package/.output/public/_nuxt/{CwdIiq6J.js → PUe8M07P.js} +2 -2
  94. package/.output/public/_nuxt/{Cjgqfl1g.js → TEF-nDfP.js} +1 -1
  95. package/.output/public/_nuxt/{DNZpxuwM.js → TuKV3Ilv.js} +1 -1
  96. package/.output/public/_nuxt/V5LvXMJl.js +1 -0
  97. package/.output/public/_nuxt/{c_huf6xz.js → YJvNy3iu.js} +27 -27
  98. package/.output/public/_nuxt/{C7C8tPlA.js → ZObQcd0X.js} +1 -1
  99. package/.output/public/_nuxt/{CHOD7i6O.js → b_MfGg1c.js} +1 -1
  100. package/.output/public/_nuxt/builds/latest.json +1 -1
  101. package/.output/public/_nuxt/builds/meta/455d4da4-6357-4478-8703-78a79ccbbc0f.json +1 -0
  102. package/.output/public/_nuxt/entry.qdzR7QFr.css +1 -0
  103. package/.output/public/_nuxt/fpuEgQ7C.js +12 -0
  104. package/.output/public/_nuxt/jU7fkvuR.js +1 -0
  105. package/.output/public/_nuxt/{CSTzT9hP.js → lHkFwi3L.js} +1 -1
  106. package/.output/public/_nuxt/{BQOaPJzs.js → minLMBmY.js} +1 -1
  107. package/.output/public/_nuxt/pQ8l8BR2.js +1 -0
  108. package/.output/public/_nuxt/xYXqL1eV.js +1 -0
  109. package/.output/public/_nuxt/xxfb8w7n.js +1 -0
  110. package/.output/server/chunks/_/create-adapter.mjs +36 -7
  111. package/.output/server/chunks/_/create-adapter.mjs.map +1 -1
  112. package/.output/server/chunks/_/database-error.mjs +10 -0
  113. package/.output/server/chunks/_/database-error.mjs.map +1 -1
  114. package/.output/server/chunks/_/database-roles.factory.mjs +126 -22
  115. package/.output/server/chunks/_/database-roles.factory.mjs.map +1 -1
  116. package/.output/server/chunks/_/db-connection.mjs +721 -81
  117. package/.output/server/chunks/_/db-connection.mjs.map +1 -1
  118. package/.output/server/chunks/_/functions.factory.mjs +97 -6
  119. package/.output/server/chunks/_/functions.factory.mjs.map +1 -1
  120. package/.output/server/chunks/_/instance-insights.factory.mjs +106 -7
  121. package/.output/server/chunks/_/instance-insights.factory.mjs.map +1 -1
  122. package/.output/server/chunks/_/metadata.factory.mjs +912 -43
  123. package/.output/server/chunks/_/metadata.factory.mjs.map +1 -1
  124. package/.output/server/chunks/_/native-backup-jobs.mjs +1302 -0
  125. package/.output/server/chunks/_/native-backup-jobs.mjs.map +1 -0
  126. package/.output/server/chunks/_/query.factory.mjs +536 -14
  127. package/.output/server/chunks/_/query.factory.mjs.map +1 -1
  128. package/.output/server/chunks/_/schemaMeta.type.mjs +13 -0
  129. package/.output/server/chunks/_/schemaMeta.type.mjs.map +1 -0
  130. package/.output/server/chunks/_/tables.factory.mjs +905 -37
  131. package/.output/server/chunks/_/tables.factory.mjs.map +1 -1
  132. package/.output/server/chunks/_/type-alias.constants.mjs +242 -0
  133. package/.output/server/chunks/_/type-alias.constants.mjs.map +1 -0
  134. package/.output/server/chunks/_/views.factory.mjs +106 -8
  135. package/.output/server/chunks/_/views.factory.mjs.map +1 -1
  136. package/.output/server/chunks/build/client.manifest.mjs +676 -672
  137. package/.output/server/chunks/build/client.manifest.mjs.map +1 -1
  138. package/.output/server/chunks/nitro/nitro.mjs +1046 -751
  139. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  140. package/.output/server/chunks/routes/api/ai/agent.mjs +30 -79
  141. package/.output/server/chunks/routes/api/ai/agent.mjs.map +1 -1
  142. package/.output/server/chunks/routes/api/database-export/export-database.mjs +26 -124
  143. package/.output/server/chunks/routes/api/database-export/export-database.mjs.map +1 -1
  144. package/.output/server/chunks/routes/api/database-export/jobs/_jobId/download.get.mjs +52 -0
  145. package/.output/server/chunks/routes/api/database-export/jobs/_jobId/download.get.mjs.map +1 -0
  146. package/.output/server/chunks/routes/api/database-export/jobs/_jobId_.get.mjs +43 -0
  147. package/.output/server/chunks/routes/api/database-export/jobs/_jobId_.get.mjs.map +1 -0
  148. package/.output/server/chunks/routes/api/database-import/import-database.mjs +69 -134
  149. package/.output/server/chunks/routes/api/database-import/import-database.mjs.map +1 -1
  150. package/.output/server/chunks/routes/api/database-import/jobs/_jobId_.get.mjs +43 -0
  151. package/.output/server/chunks/routes/api/database-import/jobs/_jobId_.get.mjs.map +1 -0
  152. package/.output/server/chunks/routes/api/database-roles/create-role.mjs +2 -0
  153. package/.output/server/chunks/routes/api/database-roles/create-role.mjs.map +1 -1
  154. package/.output/server/chunks/routes/api/database-roles/delete-role.mjs +2 -0
  155. package/.output/server/chunks/routes/api/database-roles/delete-role.mjs.map +1 -1
  156. package/.output/server/chunks/routes/api/database-roles/get-databases-with-permissions.mjs +2 -0
  157. package/.output/server/chunks/routes/api/database-roles/get-databases-with-permissions.mjs.map +1 -1
  158. package/.output/server/chunks/routes/api/database-roles/get-databases.mjs +2 -0
  159. package/.output/server/chunks/routes/api/database-roles/get-databases.mjs.map +1 -1
  160. package/.output/server/chunks/routes/api/database-roles/get-permissions.mjs +2 -0
  161. package/.output/server/chunks/routes/api/database-roles/get-permissions.mjs.map +1 -1
  162. package/.output/server/chunks/routes/api/database-roles/get-role-inheritance.mjs +2 -0
  163. package/.output/server/chunks/routes/api/database-roles/get-role-inheritance.mjs.map +1 -1
  164. package/.output/server/chunks/routes/api/database-roles/get-role.mjs +2 -0
  165. package/.output/server/chunks/routes/api/database-roles/get-role.mjs.map +1 -1
  166. package/.output/server/chunks/routes/api/database-roles/get-roles.mjs +2 -0
  167. package/.output/server/chunks/routes/api/database-roles/get-roles.mjs.map +1 -1
  168. package/.output/server/chunks/routes/api/database-roles/get-schema-objects.mjs +2 -0
  169. package/.output/server/chunks/routes/api/database-roles/get-schema-objects.mjs.map +1 -1
  170. package/.output/server/chunks/routes/api/database-roles/get-schemas.mjs +2 -0
  171. package/.output/server/chunks/routes/api/database-roles/get-schemas.mjs.map +1 -1
  172. package/.output/server/chunks/routes/api/database-roles/grant-bulk-permissions.mjs +2 -0
  173. package/.output/server/chunks/routes/api/database-roles/grant-bulk-permissions.mjs.map +1 -1
  174. package/.output/server/chunks/routes/api/database-roles/grant-permission.mjs +2 -0
  175. package/.output/server/chunks/routes/api/database-roles/grant-permission.mjs.map +1 -1
  176. package/.output/server/chunks/routes/api/database-roles/revoke-permission.mjs +2 -0
  177. package/.output/server/chunks/routes/api/database-roles/revoke-permission.mjs.map +1 -1
  178. package/.output/server/chunks/routes/api/functions/definition.post.mjs +3 -1
  179. package/.output/server/chunks/routes/api/functions/definition.post.mjs.map +1 -1
  180. package/.output/server/chunks/routes/api/functions/delete.post.mjs +3 -1
  181. package/.output/server/chunks/routes/api/functions/delete.post.mjs.map +1 -1
  182. package/.output/server/chunks/routes/api/functions/overview.post.mjs +3 -1
  183. package/.output/server/chunks/routes/api/functions/overview.post.mjs.map +1 -1
  184. package/.output/server/chunks/routes/api/functions/rename.post.mjs +3 -1
  185. package/.output/server/chunks/routes/api/functions/rename.post.mjs.map +1 -1
  186. package/.output/server/chunks/routes/api/functions/signature.post.mjs +3 -1
  187. package/.output/server/chunks/routes/api/functions/signature.post.mjs.map +1 -1
  188. package/.output/server/chunks/routes/api/functions/update.post.mjs +24 -6
  189. package/.output/server/chunks/routes/api/functions/update.post.mjs.map +1 -1
  190. package/.output/server/chunks/routes/api/index.post.mjs +63 -0
  191. package/.output/server/chunks/routes/api/index.post.mjs.map +1 -0
  192. package/.output/server/chunks/routes/api/instance-insights/cancel-query.post.mjs +2 -0
  193. package/.output/server/chunks/routes/api/instance-insights/cancel-query.post.mjs.map +1 -1
  194. package/.output/server/chunks/routes/api/instance-insights/configuration.post.mjs +2 -0
  195. package/.output/server/chunks/routes/api/instance-insights/configuration.post.mjs.map +1 -1
  196. package/.output/server/chunks/routes/api/instance-insights/dashboard.post.mjs +2 -0
  197. package/.output/server/chunks/routes/api/instance-insights/dashboard.post.mjs.map +1 -1
  198. package/.output/server/chunks/routes/api/instance-insights/drop-slot.post.mjs +2 -0
  199. package/.output/server/chunks/routes/api/instance-insights/drop-slot.post.mjs.map +1 -1
  200. package/.output/server/chunks/routes/api/instance-insights/replication.post.mjs +2 -0
  201. package/.output/server/chunks/routes/api/instance-insights/replication.post.mjs.map +1 -1
  202. package/.output/server/chunks/routes/api/instance-insights/state.post.mjs +2 -0
  203. package/.output/server/chunks/routes/api/instance-insights/state.post.mjs.map +1 -1
  204. package/.output/server/chunks/routes/api/instance-insights/terminate-connection.post.mjs +2 -0
  205. package/.output/server/chunks/routes/api/instance-insights/terminate-connection.post.mjs.map +1 -1
  206. package/.output/server/chunks/routes/api/instance-insights/toggle-slot-status.post.mjs +2 -0
  207. package/.output/server/chunks/routes/api/instance-insights/toggle-slot-status.post.mjs.map +1 -1
  208. package/.output/server/chunks/routes/api/managment-connection/health-check.mjs +10 -4
  209. package/.output/server/chunks/routes/api/managment-connection/health-check.mjs.map +1 -1
  210. package/.output/server/chunks/routes/api/metadata/erd.post.mjs +4 -0
  211. package/.output/server/chunks/routes/api/metadata/erd.post.mjs.map +1 -1
  212. package/.output/server/chunks/routes/api/metadata/meta-data.post.mjs +4 -0
  213. package/.output/server/chunks/routes/api/metadata/meta-data.post.mjs.map +1 -1
  214. package/.output/server/chunks/routes/api/metadata/reverse-schemas.post.mjs +4 -0
  215. package/.output/server/chunks/routes/api/metadata/reverse-schemas.post.mjs.map +1 -1
  216. package/.output/server/chunks/routes/api/metrics/monitor.post.mjs +80 -7
  217. package/.output/server/chunks/routes/api/metrics/monitor.post.mjs.map +1 -1
  218. package/.output/server/chunks/routes/api/query/execute.post.mjs +3 -1
  219. package/.output/server/chunks/routes/api/query/execute.post.mjs.map +1 -1
  220. package/.output/server/chunks/routes/api/query/raw-execute-stream.post.mjs +3 -1
  221. package/.output/server/chunks/routes/api/query/raw-execute-stream.post.mjs.map +1 -1
  222. package/.output/server/chunks/routes/api/query/raw-execute.post.mjs +3 -1
  223. package/.output/server/chunks/routes/api/query/raw-execute.post.mjs.map +1 -1
  224. package/.output/server/chunks/routes/api/tables/bulk-delete.post.mjs +3 -1
  225. package/.output/server/chunks/routes/api/tables/bulk-delete.post.mjs.map +1 -1
  226. package/.output/server/chunks/routes/api/tables/bulk-update.post.mjs +3 -1
  227. package/.output/server/chunks/routes/api/tables/bulk-update.post.mjs.map +1 -1
  228. package/.output/server/chunks/routes/api/tables/ddl.post.mjs +3 -1
  229. package/.output/server/chunks/routes/api/tables/ddl.post.mjs.map +1 -1
  230. package/.output/server/chunks/routes/api/tables/export.post.mjs +4 -2
  231. package/.output/server/chunks/routes/api/tables/export.post.mjs.map +1 -1
  232. package/.output/server/chunks/routes/api/tables/indexes.post.mjs +3 -1
  233. package/.output/server/chunks/routes/api/tables/indexes.post.mjs.map +1 -1
  234. package/.output/server/chunks/routes/api/tables/meta.post.mjs +3 -1
  235. package/.output/server/chunks/routes/api/tables/meta.post.mjs.map +1 -1
  236. package/.output/server/chunks/routes/api/tables/overview.post.mjs +3 -1
  237. package/.output/server/chunks/routes/api/tables/overview.post.mjs.map +1 -1
  238. package/.output/server/chunks/routes/api/tables/rls.post.mjs +3 -1
  239. package/.output/server/chunks/routes/api/tables/rls.post.mjs.map +1 -1
  240. package/.output/server/chunks/routes/api/tables/rules.post.mjs +3 -1
  241. package/.output/server/chunks/routes/api/tables/rules.post.mjs.map +1 -1
  242. package/.output/server/chunks/routes/api/tables/size.post.mjs +3 -1
  243. package/.output/server/chunks/routes/api/tables/size.post.mjs.map +1 -1
  244. package/.output/server/chunks/routes/api/tables/structure.post.mjs +3 -1
  245. package/.output/server/chunks/routes/api/tables/structure.post.mjs.map +1 -1
  246. package/.output/server/chunks/routes/api/tables/triggers.post.mjs +3 -1
  247. package/.output/server/chunks/routes/api/tables/triggers.post.mjs.map +1 -1
  248. package/.output/server/chunks/routes/api/views/definition.post.mjs +2 -0
  249. package/.output/server/chunks/routes/api/views/definition.post.mjs.map +1 -1
  250. package/.output/server/chunks/routes/api/views/dependencies.post.mjs +2 -0
  251. package/.output/server/chunks/routes/api/views/dependencies.post.mjs.map +1 -1
  252. package/.output/server/chunks/routes/api/views/explain.post.mjs +2 -0
  253. package/.output/server/chunks/routes/api/views/explain.post.mjs.map +1 -1
  254. package/.output/server/chunks/routes/api/views/indexes.post.mjs +2 -0
  255. package/.output/server/chunks/routes/api/views/indexes.post.mjs.map +1 -1
  256. package/.output/server/chunks/routes/api/views/meta.post.mjs +2 -0
  257. package/.output/server/chunks/routes/api/views/meta.post.mjs.map +1 -1
  258. package/.output/server/chunks/routes/api/views/overview.post.mjs +2 -0
  259. package/.output/server/chunks/routes/api/views/overview.post.mjs.map +1 -1
  260. package/.output/server/chunks/routes/renderer.mjs +1 -1
  261. package/.output/server/index.mjs +1 -1
  262. package/.output/server/node_modules/aws-ssl-profiles/lib/index.js +13 -0
  263. package/.output/server/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.js +2888 -0
  264. package/.output/server/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.js +111 -0
  265. package/.output/server/node_modules/aws-ssl-profiles/package.json +52 -0
  266. package/.output/server/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  267. package/.output/server/node_modules/better-sqlite3/lib/database.js +90 -0
  268. package/.output/server/node_modules/better-sqlite3/lib/index.js +3 -0
  269. package/.output/server/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
  270. package/.output/server/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
  271. package/.output/server/node_modules/better-sqlite3/lib/methods/function.js +31 -0
  272. package/.output/server/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
  273. package/.output/server/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
  274. package/.output/server/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
  275. package/.output/server/node_modules/better-sqlite3/lib/methods/table.js +189 -0
  276. package/.output/server/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
  277. package/.output/server/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
  278. package/.output/server/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
  279. package/.output/server/node_modules/better-sqlite3/lib/util.js +12 -0
  280. package/.output/server/node_modules/better-sqlite3/package.json +59 -0
  281. package/.output/server/node_modules/cpu-features/build/Release/cpufeatures.node +0 -0
  282. package/.output/server/node_modules/cpu-features/lib/index.js +5 -0
  283. package/.output/server/node_modules/cpu-features/package.json +40 -0
  284. package/.output/server/node_modules/denque/index.js +481 -0
  285. package/.output/server/node_modules/denque/package.json +58 -0
  286. package/.output/server/node_modules/generate-function/index.js +181 -0
  287. package/.output/server/node_modules/generate-function/package.json +32 -0
  288. package/.output/server/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
  289. package/.output/server/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
  290. package/.output/server/node_modules/iconv-lite/encodings/index.js +23 -0
  291. package/.output/server/node_modules/iconv-lite/encodings/internal.js +218 -0
  292. package/.output/server/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
  293. package/.output/server/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  294. package/.output/server/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
  295. package/.output/server/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  296. package/.output/server/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  297. package/.output/server/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  298. package/.output/server/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  299. package/.output/server/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  300. package/.output/server/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  301. package/.output/server/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  302. package/.output/server/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  303. package/.output/server/node_modules/iconv-lite/encodings/utf16.js +187 -0
  304. package/.output/server/node_modules/iconv-lite/encodings/utf32.js +307 -0
  305. package/.output/server/node_modules/iconv-lite/encodings/utf7.js +283 -0
  306. package/.output/server/node_modules/iconv-lite/lib/bom-handling.js +48 -0
  307. package/.output/server/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
  308. package/.output/server/node_modules/iconv-lite/lib/index.js +182 -0
  309. package/.output/server/node_modules/iconv-lite/lib/streams.js +105 -0
  310. package/.output/server/node_modules/iconv-lite/package.json +70 -0
  311. package/.output/server/node_modules/is-property/is-property.js +5 -0
  312. package/.output/server/node_modules/is-property/package.json +36 -0
  313. package/.output/server/node_modules/long/package.json +58 -0
  314. package/.output/server/node_modules/long/umd/index.js +1622 -0
  315. package/.output/server/node_modules/long/umd/package.json +3 -0
  316. package/.output/server/node_modules/lru.min/lib/index.js +248 -0
  317. package/.output/server/node_modules/lru.min/package.json +87 -0
  318. package/.output/server/node_modules/mysql2/index.js +77 -0
  319. package/.output/server/node_modules/mysql2/lib/auth_41.js +95 -0
  320. package/.output/server/node_modules/mysql2/lib/auth_plugins/caching_sha2_password.js +115 -0
  321. package/.output/server/node_modules/mysql2/lib/auth_plugins/index.js +8 -0
  322. package/.output/server/node_modules/mysql2/lib/auth_plugins/mysql_clear_password.js +17 -0
  323. package/.output/server/node_modules/mysql2/lib/auth_plugins/mysql_native_password.js +34 -0
  324. package/.output/server/node_modules/mysql2/lib/auth_plugins/sha256_password.js +74 -0
  325. package/.output/server/node_modules/mysql2/lib/base/connection.js +1139 -0
  326. package/.output/server/node_modules/mysql2/lib/base/pool.js +343 -0
  327. package/.output/server/node_modules/mysql2/lib/commands/auth_switch.js +151 -0
  328. package/.output/server/node_modules/mysql2/lib/commands/binlog_dump.js +109 -0
  329. package/.output/server/node_modules/mysql2/lib/commands/change_user.js +68 -0
  330. package/.output/server/node_modules/mysql2/lib/commands/client_handshake.js +386 -0
  331. package/.output/server/node_modules/mysql2/lib/commands/close_statement.js +18 -0
  332. package/.output/server/node_modules/mysql2/lib/commands/command.js +54 -0
  333. package/.output/server/node_modules/mysql2/lib/commands/execute.js +116 -0
  334. package/.output/server/node_modules/mysql2/lib/commands/index.js +29 -0
  335. package/.output/server/node_modules/mysql2/lib/commands/ping.js +36 -0
  336. package/.output/server/node_modules/mysql2/lib/commands/prepare.js +143 -0
  337. package/.output/server/node_modules/mysql2/lib/commands/query.js +365 -0
  338. package/.output/server/node_modules/mysql2/lib/commands/quit.js +29 -0
  339. package/.output/server/node_modules/mysql2/lib/commands/register_slave.js +27 -0
  340. package/.output/server/node_modules/mysql2/lib/commands/reset_connection.js +29 -0
  341. package/.output/server/node_modules/mysql2/lib/commands/server_handshake.js +205 -0
  342. package/.output/server/node_modules/mysql2/lib/compressed_protocol.js +153 -0
  343. package/.output/server/node_modules/mysql2/lib/connection.js +12 -0
  344. package/.output/server/node_modules/mysql2/lib/connection_config.js +299 -0
  345. package/.output/server/node_modules/mysql2/lib/constants/charset_encodings.js +317 -0
  346. package/.output/server/node_modules/mysql2/lib/constants/charsets.js +317 -0
  347. package/.output/server/node_modules/mysql2/lib/constants/client.js +39 -0
  348. package/.output/server/node_modules/mysql2/lib/constants/commands.js +37 -0
  349. package/.output/server/node_modules/mysql2/lib/constants/cursor.js +9 -0
  350. package/.output/server/node_modules/mysql2/lib/constants/encoding_charset.js +50 -0
  351. package/.output/server/node_modules/mysql2/lib/constants/errors.js +3973 -0
  352. package/.output/server/node_modules/mysql2/lib/constants/field_flags.js +20 -0
  353. package/.output/server/node_modules/mysql2/lib/constants/server_status.js +44 -0
  354. package/.output/server/node_modules/mysql2/lib/constants/session_track.js +11 -0
  355. package/.output/server/node_modules/mysql2/lib/constants/ssl_profiles.js +11 -0
  356. package/.output/server/node_modules/mysql2/lib/constants/types.js +64 -0
  357. package/.output/server/node_modules/mysql2/lib/create_connection.js +10 -0
  358. package/.output/server/node_modules/mysql2/lib/create_pool.js +10 -0
  359. package/.output/server/node_modules/mysql2/lib/create_pool_cluster.js +9 -0
  360. package/.output/server/node_modules/mysql2/lib/helpers.js +83 -0
  361. package/.output/server/node_modules/mysql2/lib/packet_parser.js +195 -0
  362. package/.output/server/node_modules/mysql2/lib/packets/auth_next_factor.js +35 -0
  363. package/.output/server/node_modules/mysql2/lib/packets/auth_switch_request.js +38 -0
  364. package/.output/server/node_modules/mysql2/lib/packets/auth_switch_request_more_data.js +33 -0
  365. package/.output/server/node_modules/mysql2/lib/packets/auth_switch_response.js +30 -0
  366. package/.output/server/node_modules/mysql2/lib/packets/binary_row.js +95 -0
  367. package/.output/server/node_modules/mysql2/lib/packets/binlog_dump.js +33 -0
  368. package/.output/server/node_modules/mysql2/lib/packets/binlog_query_statusvars.js +115 -0
  369. package/.output/server/node_modules/mysql2/lib/packets/change_user.js +97 -0
  370. package/.output/server/node_modules/mysql2/lib/packets/close_statement.js +21 -0
  371. package/.output/server/node_modules/mysql2/lib/packets/column_definition.js +291 -0
  372. package/.output/server/node_modules/mysql2/lib/packets/encode_parameter.js +69 -0
  373. package/.output/server/node_modules/mysql2/lib/packets/execute.js +177 -0
  374. package/.output/server/node_modules/mysql2/lib/packets/handshake.js +112 -0
  375. package/.output/server/node_modules/mysql2/lib/packets/handshake_response.js +173 -0
  376. package/.output/server/node_modules/mysql2/lib/packets/index.js +154 -0
  377. package/.output/server/node_modules/mysql2/lib/packets/packet.js +978 -0
  378. package/.output/server/node_modules/mysql2/lib/packets/prepare_statement.js +27 -0
  379. package/.output/server/node_modules/mysql2/lib/packets/prepared_statement_header.js +16 -0
  380. package/.output/server/node_modules/mysql2/lib/packets/query.js +102 -0
  381. package/.output/server/node_modules/mysql2/lib/packets/register_slave.js +46 -0
  382. package/.output/server/node_modules/mysql2/lib/packets/reset_connection.js +17 -0
  383. package/.output/server/node_modules/mysql2/lib/packets/resultset_header.js +124 -0
  384. package/.output/server/node_modules/mysql2/lib/packets/ssl_request.js +25 -0
  385. package/.output/server/node_modules/mysql2/lib/packets/text_row.js +47 -0
  386. package/.output/server/node_modules/mysql2/lib/parsers/binary_parser.js +235 -0
  387. package/.output/server/node_modules/mysql2/lib/parsers/parser_cache.js +68 -0
  388. package/.output/server/node_modules/mysql2/lib/parsers/static_binary_parser.js +213 -0
  389. package/.output/server/node_modules/mysql2/lib/parsers/static_text_parser.js +152 -0
  390. package/.output/server/node_modules/mysql2/lib/parsers/string.js +50 -0
  391. package/.output/server/node_modules/mysql2/lib/parsers/text_parser.js +214 -0
  392. package/.output/server/node_modules/mysql2/lib/pool.js +12 -0
  393. package/.output/server/node_modules/mysql2/lib/pool_cluster.js +375 -0
  394. package/.output/server/node_modules/mysql2/lib/pool_config.js +34 -0
  395. package/.output/server/node_modules/mysql2/lib/pool_connection.js +81 -0
  396. package/.output/server/node_modules/mysql2/lib/promise/capture_local_err.js +25 -0
  397. package/.output/server/node_modules/mysql2/lib/promise/connection.js +237 -0
  398. package/.output/server/node_modules/mysql2/lib/promise/inherit_events.js +27 -0
  399. package/.output/server/node_modules/mysql2/lib/promise/make_done_cb.js +16 -0
  400. package/.output/server/node_modules/mysql2/lib/promise/pool.js +118 -0
  401. package/.output/server/node_modules/mysql2/lib/promise/pool_cluster.js +59 -0
  402. package/.output/server/node_modules/mysql2/lib/promise/pool_connection.js +19 -0
  403. package/.output/server/node_modules/mysql2/lib/promise/prepared_statement_info.js +35 -0
  404. package/.output/server/node_modules/mysql2/lib/server.js +37 -0
  405. package/.output/server/node_modules/mysql2/lib/tracing.js +81 -0
  406. package/.output/server/node_modules/mysql2/package.json +95 -0
  407. package/.output/server/node_modules/mysql2/promise.js +209 -0
  408. package/.output/server/node_modules/named-placeholders/index.js +179 -0
  409. package/.output/server/node_modules/named-placeholders/package.json +36 -0
  410. package/.output/server/node_modules/oracledb/index.js +27 -0
  411. package/.output/server/node_modules/oracledb/lib/aqDeqOptions.js +186 -0
  412. package/.output/server/node_modules/oracledb/lib/aqEnqOptions.js +81 -0
  413. package/.output/server/node_modules/oracledb/lib/aqMessage.js +149 -0
  414. package/.output/server/node_modules/oracledb/lib/aqQueue.js +293 -0
  415. package/.output/server/node_modules/oracledb/lib/connection.js +1842 -0
  416. package/.output/server/node_modules/oracledb/lib/constants.js +210 -0
  417. package/.output/server/node_modules/oracledb/lib/dbObject.js +606 -0
  418. package/.output/server/node_modules/oracledb/lib/errors.js +1046 -0
  419. package/.output/server/node_modules/oracledb/lib/future.js +53 -0
  420. package/.output/server/node_modules/oracledb/lib/impl/aqDeqOptions.js +206 -0
  421. package/.output/server/node_modules/oracledb/lib/impl/aqEnqOptions.js +89 -0
  422. package/.output/server/node_modules/oracledb/lib/impl/aqMessage.js +134 -0
  423. package/.output/server/node_modules/oracledb/lib/impl/aqQueue.js +82 -0
  424. package/.output/server/node_modules/oracledb/lib/impl/base.js +45 -0
  425. package/.output/server/node_modules/oracledb/lib/impl/connection.js +671 -0
  426. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/buffer.js +1214 -0
  427. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/constants.js +110 -0
  428. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/oson.js +852 -0
  429. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/vector.js +197 -0
  430. package/.output/server/node_modules/oracledb/lib/impl/dbObject.js +159 -0
  431. package/.output/server/node_modules/oracledb/lib/impl/index.js +59 -0
  432. package/.output/server/node_modules/oracledb/lib/impl/lob.js +113 -0
  433. package/.output/server/node_modules/oracledb/lib/impl/pool.js +230 -0
  434. package/.output/server/node_modules/oracledb/lib/impl/resultset.js +307 -0
  435. package/.output/server/node_modules/oracledb/lib/impl/sodaCollection.js +175 -0
  436. package/.output/server/node_modules/oracledb/lib/impl/sodaDatabase.js +82 -0
  437. package/.output/server/node_modules/oracledb/lib/impl/sodaDocCursor.js +64 -0
  438. package/.output/server/node_modules/oracledb/lib/impl/sodaDocument.js +89 -0
  439. package/.output/server/node_modules/oracledb/lib/impl/sodaOperation.js +110 -0
  440. package/.output/server/node_modules/oracledb/lib/lob.js +315 -0
  441. package/.output/server/node_modules/oracledb/lib/oracledb.js +1716 -0
  442. package/.output/server/node_modules/oracledb/lib/pool.js +873 -0
  443. package/.output/server/node_modules/oracledb/lib/poolStatistics.js +143 -0
  444. package/.output/server/node_modules/oracledb/lib/queryStream.js +119 -0
  445. package/.output/server/node_modules/oracledb/lib/resultset.js +368 -0
  446. package/.output/server/node_modules/oracledb/lib/settings.js +221 -0
  447. package/.output/server/node_modules/oracledb/lib/sodaCollection.js +284 -0
  448. package/.output/server/node_modules/oracledb/lib/sodaDatabase.js +176 -0
  449. package/.output/server/node_modules/oracledb/lib/sodaDocCursor.js +82 -0
  450. package/.output/server/node_modules/oracledb/lib/sodaDocument.js +125 -0
  451. package/.output/server/node_modules/oracledb/lib/sodaOperation.js +236 -0
  452. package/.output/server/node_modules/oracledb/lib/thin/aq.js +475 -0
  453. package/.output/server/node_modules/oracledb/lib/thin/connection.js +1504 -0
  454. package/.output/server/node_modules/oracledb/lib/thin/dbObject.js +737 -0
  455. package/.output/server/node_modules/oracledb/lib/thin/index.js +40 -0
  456. package/.output/server/node_modules/oracledb/lib/thin/lob.js +380 -0
  457. package/.output/server/node_modules/oracledb/lib/thin/pool.js +738 -0
  458. package/.output/server/node_modules/oracledb/lib/thin/protocol/capabilities.js +145 -0
  459. package/.output/server/node_modules/oracledb/lib/thin/protocol/constants.js +872 -0
  460. package/.output/server/node_modules/oracledb/lib/thin/protocol/encryptDecrypt.js +197 -0
  461. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqArray.js +238 -0
  462. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqBase.js +305 -0
  463. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqDeq.js +164 -0
  464. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqEnq.js +135 -0
  465. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/auth.js +376 -0
  466. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/base.js +568 -0
  467. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/commit.js +56 -0
  468. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/dataType.js +401 -0
  469. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/execute.js +358 -0
  470. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/fastAuth.js +83 -0
  471. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/fetch.js +64 -0
  472. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/index.js +59 -0
  473. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/lobOp.js +195 -0
  474. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/logOff.js +52 -0
  475. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/ping.js +56 -0
  476. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/protocol.js +97 -0
  477. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/rollback.js +56 -0
  478. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/sessionRelease.js +60 -0
  479. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/transactionChangeState.js +99 -0
  480. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/transactionSwitch.js +147 -0
  481. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/withData.js +920 -0
  482. package/.output/server/node_modules/oracledb/lib/thin/protocol/packet.js +631 -0
  483. package/.output/server/node_modules/oracledb/lib/thin/protocol/protocol.js +240 -0
  484. package/.output/server/node_modules/oracledb/lib/thin/protocol/utils.js +82 -0
  485. package/.output/server/node_modules/oracledb/lib/thin/resultSet.js +122 -0
  486. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ANO.js +438 -0
  487. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/connStrategy.js +316 -0
  488. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/constants.js +210 -0
  489. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ezConnectResolver.js +466 -0
  490. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/navNodes.js +904 -0
  491. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/networkSession.js +733 -0
  492. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js +609 -0
  493. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/nvStrToNvPair.js +780 -0
  494. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/packet.js +439 -0
  495. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/paramParser.js +239 -0
  496. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/sessionAtts.js +198 -0
  497. package/.output/server/node_modules/oracledb/lib/thin/statement.js +573 -0
  498. package/.output/server/node_modules/oracledb/lib/thin/statementCache.js +195 -0
  499. package/.output/server/node_modules/oracledb/lib/thin/util.js +254 -0
  500. package/.output/server/node_modules/oracledb/lib/traceHandler.js +133 -0
  501. package/.output/server/node_modules/oracledb/lib/transformer.js +279 -0
  502. package/.output/server/node_modules/oracledb/lib/types.js +592 -0
  503. package/.output/server/node_modules/oracledb/lib/util.js +648 -0
  504. package/.output/server/node_modules/oracledb/lib/version.js +36 -0
  505. package/.output/server/node_modules/oracledb/package.json +48 -0
  506. package/.output/server/node_modules/sql-escaper/lib/index.js +398 -0
  507. package/.output/server/node_modules/sql-escaper/package.json +81 -0
  508. package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node +0 -0
  509. package/.output/server/node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
  510. package/.output/server/package.json +14 -18
  511. package/package.json +2 -2
  512. package/.output/public/_nuxt/019vQzZn.js +0 -1
  513. package/.output/public/_nuxt/0lRW_xjL.js +0 -1
  514. package/.output/public/_nuxt/B6EI6PpE.js +0 -1
  515. package/.output/public/_nuxt/B9Mt45db.js +0 -1
  516. package/.output/public/_nuxt/BKltSiU0.js +0 -1
  517. package/.output/public/_nuxt/BM4vnZvX.js +0 -732
  518. package/.output/public/_nuxt/BNYR501z.js +0 -1
  519. package/.output/public/_nuxt/BVLVn__t.js +0 -9
  520. package/.output/public/_nuxt/BY1l0S_M.js +0 -1
  521. package/.output/public/_nuxt/BaseCodeEditor.SAr2eD8R.css +0 -1
  522. package/.output/public/_nuxt/BcvJQkv0.js +0 -1
  523. package/.output/public/_nuxt/BdN9B2_l.js +0 -160
  524. package/.output/public/_nuxt/BflvengI.js +0 -1
  525. package/.output/public/_nuxt/BgolbRTO.js +0 -1
  526. package/.output/public/_nuxt/BwISH3M4.js +0 -1
  527. package/.output/public/_nuxt/C-M4q4KX.js +0 -1
  528. package/.output/public/_nuxt/C2Ziircr.js +0 -1
  529. package/.output/public/_nuxt/C3NWXcpd.js +0 -39
  530. package/.output/public/_nuxt/C5p44jKD.js +0 -1
  531. package/.output/public/_nuxt/C617vhDd.js +0 -1
  532. package/.output/public/_nuxt/C8S0o4Gy.js +0 -1
  533. package/.output/public/_nuxt/CNlsVoWh.js +0 -1
  534. package/.output/public/_nuxt/CWkPMmwS.js +0 -2
  535. package/.output/public/_nuxt/Cgy4ijjN.js +0 -67
  536. package/.output/public/_nuxt/ClBBUcFW.js +0 -1
  537. package/.output/public/_nuxt/CuRyxljq.js +0 -1
  538. package/.output/public/_nuxt/Cx4Bnfq1.js +0 -2
  539. package/.output/public/_nuxt/D-H6_V16.js +0 -1
  540. package/.output/public/_nuxt/D-SDqguC.js +0 -1
  541. package/.output/public/_nuxt/D-XwprNU.js +0 -6
  542. package/.output/public/_nuxt/D3G5Xy_-.js +0 -1
  543. package/.output/public/_nuxt/D9o5Pdvp.js +0 -1
  544. package/.output/public/_nuxt/DFArp87o.js +0 -1
  545. package/.output/public/_nuxt/DFZIXzfU.js +0 -1
  546. package/.output/public/_nuxt/DHRNt0p9.js +0 -1
  547. package/.output/public/_nuxt/DLKku6fV.js +0 -1
  548. package/.output/public/_nuxt/DWgjNKGq.js +0 -152
  549. package/.output/public/_nuxt/DYm57BZk.js +0 -2
  550. package/.output/public/_nuxt/DaQw8gVp.js +0 -1
  551. package/.output/public/_nuxt/DgnsV5Qb.js +0 -1
  552. package/.output/public/_nuxt/Do5Fyo7J.js +0 -1
  553. package/.output/public/_nuxt/Dqirx7MF.js +0 -1
  554. package/.output/public/_nuxt/GoTwJjoS.js +0 -39
  555. package/.output/public/_nuxt/Hs25HoUO.js +0 -22
  556. package/.output/public/_nuxt/J2CvNR3L.js +0 -1
  557. package/.output/public/_nuxt/LK6Q8l0D.js +0 -1
  558. package/.output/public/_nuxt/Oh9SO2qg.js +0 -1
  559. package/.output/public/_nuxt/P_8UoGnr.js +0 -72
  560. package/.output/public/_nuxt/V5yaR3hv.js +0 -2
  561. package/.output/public/_nuxt/XWTuAj6n.js +0 -1
  562. package/.output/public/_nuxt/XqwbcqcW.js +0 -1
  563. package/.output/public/_nuxt/Yzrsuije.js +0 -1
  564. package/.output/public/_nuxt/_8UrUcVF.js +0 -1
  565. package/.output/public/_nuxt/builds/meta/27a307c3-bfc5-4ccd-94b8-387eb94981bb.json +0 -1
  566. package/.output/public/_nuxt/cKBf5-av.js +0 -1
  567. package/.output/public/_nuxt/entry.DeK5kcSi.css +0 -1
  568. package/.output/public/_nuxt/kc-op4gz.js +0 -12
  569. package/.output/public/_nuxt/kehy-5uo.js +0 -1
  570. package/.output/public/_nuxt/lSaGvORn.js +0 -10
  571. package/.output/public/_nuxt/lY3EyFEK.js +0 -1
  572. package/.output/public/_nuxt/tMhdAKU2.js +0 -3
  573. package/.output/public/_nuxt/uyCIL8xw.js +0 -1
  574. package/.output/server/node_modules/cross-spawn/index.js +0 -39
  575. package/.output/server/node_modules/cross-spawn/lib/enoent.js +0 -59
  576. package/.output/server/node_modules/cross-spawn/lib/parse.js +0 -91
  577. package/.output/server/node_modules/cross-spawn/lib/util/escape.js +0 -47
  578. package/.output/server/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
  579. package/.output/server/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
  580. package/.output/server/node_modules/cross-spawn/package.json +0 -73
  581. package/.output/server/node_modules/execa/index.js +0 -268
  582. package/.output/server/node_modules/execa/lib/command.js +0 -52
  583. package/.output/server/node_modules/execa/lib/error.js +0 -88
  584. package/.output/server/node_modules/execa/lib/kill.js +0 -115
  585. package/.output/server/node_modules/execa/lib/promise.js +0 -46
  586. package/.output/server/node_modules/execa/lib/stdio.js +0 -52
  587. package/.output/server/node_modules/execa/lib/stream.js +0 -97
  588. package/.output/server/node_modules/execa/package.json +0 -74
  589. package/.output/server/node_modules/get-stream/buffer-stream.js +0 -52
  590. package/.output/server/node_modules/get-stream/index.js +0 -61
  591. package/.output/server/node_modules/get-stream/package.json +0 -47
  592. package/.output/server/node_modules/human-signals/build/src/core.js +0 -273
  593. package/.output/server/node_modules/human-signals/build/src/main.js +0 -71
  594. package/.output/server/node_modules/human-signals/build/src/realtime.js +0 -19
  595. package/.output/server/node_modules/human-signals/build/src/signals.js +0 -35
  596. package/.output/server/node_modules/human-signals/package.json +0 -64
  597. package/.output/server/node_modules/is-stream/index.js +0 -28
  598. package/.output/server/node_modules/is-stream/package.json +0 -42
  599. package/.output/server/node_modules/isexe/index.js +0 -57
  600. package/.output/server/node_modules/isexe/mode.js +0 -41
  601. package/.output/server/node_modules/isexe/package.json +0 -31
  602. package/.output/server/node_modules/isexe/windows.js +0 -42
  603. package/.output/server/node_modules/merge-stream/index.js +0 -41
  604. package/.output/server/node_modules/merge-stream/package.json +0 -19
  605. package/.output/server/node_modules/mimic-fn/index.js +0 -13
  606. package/.output/server/node_modules/mimic-fn/package.json +0 -42
  607. package/.output/server/node_modules/npm-run-path/index.js +0 -47
  608. package/.output/server/node_modules/npm-run-path/package.json +0 -44
  609. package/.output/server/node_modules/onetime/index.js +0 -44
  610. package/.output/server/node_modules/onetime/package.json +0 -43
  611. package/.output/server/node_modules/path-key/index.js +0 -16
  612. package/.output/server/node_modules/path-key/package.json +0 -39
  613. package/.output/server/node_modules/pg-dump-restore/lib/common.js +0 -33
  614. package/.output/server/node_modules/pg-dump-restore/lib/index.js +0 -9
  615. package/.output/server/node_modules/pg-dump-restore/lib/pg-dump.js +0 -95
  616. package/.output/server/node_modules/pg-dump-restore/lib/pg-restore.js +0 -87
  617. package/.output/server/node_modules/pg-dump-restore/package.json +0 -66
  618. package/.output/server/node_modules/shebang-command/index.js +0 -19
  619. package/.output/server/node_modules/shebang-command/package.json +0 -34
  620. package/.output/server/node_modules/shebang-regex/index.js +0 -2
  621. package/.output/server/node_modules/shebang-regex/package.json +0 -35
  622. package/.output/server/node_modules/signal-exit/index.js +0 -202
  623. package/.output/server/node_modules/signal-exit/package.json +0 -38
  624. package/.output/server/node_modules/signal-exit/signals.js +0 -53
  625. package/.output/server/node_modules/strip-final-newline/index.js +0 -16
  626. package/.output/server/node_modules/strip-final-newline/package.json +0 -40
  627. package/.output/server/node_modules/which/package.json +0 -43
  628. package/.output/server/node_modules/which/which.js +0 -125
@@ -0,0 +1,1504 @@
1
+ // Copyright (c) 2022, 2025, Oracle and/or its affiliates.
2
+
3
+ //-----------------------------------------------------------------------------
4
+ //
5
+ // This software is dual-licensed to you under the Universal Permissive License
6
+ // (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
7
+ // 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
8
+ // either license.
9
+ //
10
+ // If you elect to accept the software under the Apache License, Version 2.0,
11
+ // the following applies:
12
+ //
13
+ // Licensed under the Apache License, Version 2.0 (the "License");
14
+ // you may not use this file except in compliance with the License.
15
+ // You may obtain a copy of the License at
16
+ //
17
+ // https://www.apache.org/licenses/LICENSE-2.0
18
+ //
19
+ // Unless required by applicable law or agreed to in writing, software
20
+ // distributed under the License is distributed on an "AS IS" BASIS,
21
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
+ // See the License for the specific language governing permissions and
23
+ // limitations under the License.
24
+ //
25
+ //-----------------------------------------------------------------------------
26
+
27
+ 'use strict';
28
+
29
+ const { Buffer } = require('buffer');
30
+ const ConnectionImpl = require('../impl/connection.js');
31
+ const ThinResultSetImpl = require('./resultSet.js');
32
+ const ThinLobImpl = require("./lob.js");
33
+ const Protocol = require("./protocol/protocol.js");
34
+ const { BaseBuffer } = require('../impl/datahandlers/buffer.js');
35
+ const {NetworkSession: nsi} = require("./sqlnet/networkSession.js");
36
+ const { Statement } = require("./statement");
37
+ const thinUtil = require('./util');
38
+ const sqlNetConstants = require('./sqlnet/constants.js');
39
+ const constants = require('./protocol/constants.js');
40
+ const process = require('process');
41
+ const types = require('../types.js');
42
+ const errors = require("../errors.js");
43
+ const messages = require('./protocol/messages');
44
+ const StatementCache = require('./statementCache.js');
45
+ const { ThinQueueImpl } = require('./aq.js');
46
+
47
+ const finalizationRegistry = new global.FinalizationRegistry((heldValue) => {
48
+ heldValue.disconnect();
49
+ });
50
+
51
+ class TDSBuffer extends BaseBuffer {
52
+ }
53
+
54
+ class ThinConnectionImpl extends ConnectionImpl {
55
+
56
+ /**
57
+ * Terminates the connection
58
+ *
59
+ * @return {Promise}
60
+ */
61
+ async close() {
62
+ try {
63
+ if (this._protocol.txnInProgress) {
64
+ if (this.tpcContext) {
65
+ const message = this.createTpcRollbackMessage();
66
+ await this._protocol._processMessage(message);
67
+ } else {
68
+ await this.rollback();
69
+ }
70
+ this.tpcContext = null;
71
+ }
72
+ if (this._drcpEnabled) {
73
+ await this._sessRelease();
74
+ this._drcpEstablishSession = true;
75
+ }
76
+ if (this._pool && !this._dropSess) {
77
+ await this._pool.release(this);
78
+ } else {
79
+ if (!this._drcpEnabled) {
80
+ const message = new messages.LogOffMessage(this);
81
+ await this._protocol._processMessage(message);
82
+ }
83
+ this.nscon.disconnect();
84
+ }
85
+ } catch (err) {
86
+ // immediate close of open socket on failure
87
+ // exception won't be thrown to user
88
+ this.nscon.disconnect(sqlNetConstants.NSFIMM);
89
+ // If connection is associated with a pool, we release it
90
+ if (this._pool)
91
+ await this._pool.release(this);
92
+ }
93
+ }
94
+
95
+ async _sessRelease() {
96
+ const message = new messages.SessionReleaseMessage(this);
97
+ if (!this.isPooled()) {
98
+ message.sessReleaseMode = constants.DRCP_DEAUTHENTICATE;
99
+ }
100
+ await this._protocol._processMessage(message);
101
+ }
102
+
103
+ //---------------------------------------------------------------------------
104
+ // _getElementTypeObj()
105
+ //
106
+ // Get the element type's object type. This is needed when processing
107
+ // collections with an object as the element type since this information is
108
+ // not available in the TDS.
109
+ //---------------------------------------------------------------------------
110
+ async _getElementTypeObj(info) {
111
+ const binds = [
112
+ {
113
+ name: "owner",
114
+ type: types.DB_TYPE_VARCHAR,
115
+ dir: constants.BIND_IN,
116
+ maxSize: 128,
117
+ values: [info.schema]
118
+ },
119
+ {
120
+ name: "name",
121
+ type: types.DB_TYPE_VARCHAR,
122
+ dir: constants.BIND_IN,
123
+ maxSize: 128,
124
+ values: [info.name]
125
+ },
126
+ {
127
+ name: "package_name",
128
+ type: types.DB_TYPE_VARCHAR,
129
+ dir: constants.BIND_IN,
130
+ maxSize: 128,
131
+ values: [info.packageName]
132
+ }
133
+ ];
134
+ let sql;
135
+ if (info.packageName) {
136
+ sql = `
137
+ select
138
+ elem_type_owner,
139
+ elem_type_name,
140
+ elem_type_package
141
+ from all_plsql_coll_types
142
+ where owner = :owner
143
+ and type_name = :name
144
+ and package_name = :package_name`;
145
+ } else {
146
+ binds.pop();
147
+ sql = `
148
+ select
149
+ elem_type_owner,
150
+ elem_type_name
151
+ from all_coll_types
152
+ where owner = :owner
153
+ and type_name = :name`;
154
+ }
155
+ const options = {
156
+ connection: { _impl: this },
157
+ prefetchRows: 2
158
+ };
159
+ const result = await this.execute(sql, 1, binds, options, false);
160
+ const rows = await result.resultSet.getRows(1, options);
161
+ await result.resultSet.close();
162
+ const row = rows[0];
163
+ info.elementTypeClass = this._getDbObjectType(row[0], row[1], row[2]);
164
+ if (info.elementTypeClass.partial) {
165
+ this._partialDbObjectTypes.push(info.elementTypeClass);
166
+ }
167
+ }
168
+
169
+ //---------------------------------------------------------------------------
170
+ // _execute()
171
+ //
172
+ // Calls the RPC that executes a SQL statement and returns the results.
173
+ //---------------------------------------------------------------------------
174
+ async _execute(statement, numIters, binds, options, executeManyFlag, internalTempLobs = []) {
175
+
176
+ // Throw error if executeMany is not called on a DML statement or PL/SQL
177
+ if (executeManyFlag && statement.isQuery) {
178
+ errors.throwErr(errors.ERR_EXECMANY_NOT_ALLOWED_ON_QUERIES);
179
+ }
180
+ // perform binds
181
+ const numStmtBinds = statement.bindInfoList.length;
182
+ const numUserBinds = binds.length;
183
+ if (numStmtBinds !== numUserBinds) {
184
+ if (!binds[0]?.name) {
185
+ // positional bind mismatch or zero binds
186
+ errors.throwErr(errors.ERR_WRONG_NUMBER_OF_BINDS, numStmtBinds, numUserBinds);
187
+ }
188
+
189
+ // named bind mismatch
190
+ // Find the number of distinct named bind placeholders and see
191
+ // if they match the bind values
192
+ const numDistinctStmtBinds = statement.bindInfoDict.size;
193
+ if (numDistinctStmtBinds !== numUserBinds)
194
+ errors.throwErr(errors.ERR_WRONG_NUMBER_OF_BINDS, numStmtBinds, numUserBinds);
195
+ }
196
+
197
+ for (let i = 0; i < binds.length; i++) {
198
+ await this._bind(statement, binds[i], i + 1, internalTempLobs);
199
+ }
200
+ if (statement.isPlSql && (options.batchErrors || options.dmlRowCounts)) {
201
+ errors.throwErr(errors.ERR_EXEC_MODE_ONLY_FOR_DML);
202
+ }
203
+
204
+ // send database request
205
+ const message = new messages.ExecuteMessage(this, statement, options);
206
+ message.numExecs = numIters;
207
+ message.arrayDmlRowCounts = options.dmlRowCounts;
208
+ message.batchErrors = options.batchErrors;
209
+
210
+ // if a PL/SQL statement requires a full execute, perform only a single
211
+ // iteration in order to allow the determination of input/output binds
212
+ // to be completed; after that, an execution of the remaining iterations
213
+ // can be performed.
214
+ if (statement.isPlSql && (statement.cursorId === 0 ||
215
+ statement.requiresFullExecute)) {
216
+ message.numExecs = 1;
217
+ message.noImplicitRelease = true;
218
+ await this._protocol._processMessage(message);
219
+ statement.requiresFullExecute = false;
220
+ message.numExecs = numIters - 1;
221
+ message.offset = 1;
222
+ message.noImplicitRelease = false;
223
+ }
224
+ if (message.numExecs > 0) {
225
+ await this._protocol._processMessage(message);
226
+ statement.requiresFullExecute = false;
227
+ }
228
+
229
+ // if a define is required, send an additional request to the database
230
+ if (statement.requiresDefine && statement.sql) {
231
+ statement.requiresFullExecute = true;
232
+ await this._protocol._processMessage(message);
233
+ statement.requiresFullExecute = false;
234
+ statement.requiresDefine = false;
235
+ }
236
+
237
+ // process results
238
+ const result = {};
239
+ if (message.warning) {
240
+ result.warning = message.warning;
241
+ }
242
+ if (statement.numQueryVars > 0) {
243
+ result.resultSet = message.resultSet;
244
+ } else {
245
+ statement.bufferRowIndex = 0;
246
+ const outBinds = thinUtil.getOutBinds(statement, numIters,
247
+ executeManyFlag);
248
+ if (outBinds) {
249
+ result.outBinds = outBinds;
250
+ }
251
+ if (executeManyFlag) {
252
+ if (!statement.isPlSql) {
253
+ result.rowsAffected = statement.rowCount;
254
+ delete statement.rowCount;
255
+ }
256
+ if (options.dmlRowCounts) {
257
+ result.dmlRowCounts = options.dmlRowCounts;
258
+ }
259
+ if (options.batchErrors) {
260
+ result.batchErrors = options.batchErrors;
261
+ }
262
+ } else {
263
+ if (statement.isPlSql && options.implicitResultSet) {
264
+ result.implicitResults = options.implicitResultSet;
265
+ }
266
+ if (statement.lastRowid) {
267
+ result.lastRowid = statement.lastRowid;
268
+ delete statement.lastRowid;
269
+ }
270
+ if (statement.isPlSql) {
271
+ if (statement.rowCount) {
272
+ result.rowsAffected = statement.rowCount;
273
+ }
274
+ } else {
275
+ result.rowsAffected = statement.rowCount || 0;
276
+ }
277
+ if (statement.rowCount) {
278
+ delete statement.rowCount;
279
+ }
280
+ }
281
+ this._returnStatement(statement);
282
+ }
283
+
284
+ return result;
285
+ }
286
+
287
+ //---------------------------------------------------------------------------
288
+ // _parseTDSAttr()
289
+ //
290
+ // Returns the DB type and fills metadata from the TDS buffer.
291
+ //---------------------------------------------------------------------------
292
+ _parseTDSAttr(buf, metaData) {
293
+ let oraTypeNum, csfrm, attrType;
294
+
295
+ // skip until a type code that is of interest
296
+ for (;;) {
297
+ attrType = buf.readUInt8();
298
+ if (attrType === constants.TNS_OBJ_TDS_TYPE_EMBED_ADT_INFO) {
299
+ buf.skipBytes(1); // flags
300
+ } else if (attrType !== constants.TNS_OBJ_TDS_TYPE_SUBTYPE_MARKER) {
301
+ break;
302
+ }
303
+ }
304
+
305
+ // process the type code.
306
+ let tempPrecision, tempScale;
307
+ switch (attrType) {
308
+ case constants.TNS_OBJ_TDS_TYPE_NUMBER:
309
+ tempPrecision = buf.readInt8();
310
+ tempScale = buf.readInt8();
311
+ if (tempPrecision || tempScale) {
312
+ metaData.precision = tempPrecision;
313
+ metaData.scale = tempScale;
314
+ }
315
+ return types.DB_TYPE_NUMBER;
316
+ case constants.TNS_OBJ_TDS_TYPE_FLOAT:
317
+ tempPrecision = buf.readInt8();
318
+ if (tempPrecision)
319
+ metaData.precision = tempPrecision;
320
+ return types.DB_TYPE_NUMBER;
321
+ case constants.TNS_OBJ_TDS_TYPE_VARCHAR:
322
+ case constants.TNS_OBJ_TDS_TYPE_CHAR:
323
+ metaData.maxSize = buf.readUInt16BE(); // maximum length
324
+ oraTypeNum = (attrType === constants.TNS_OBJ_TDS_TYPE_VARCHAR) ?
325
+ constants.TNS_DATA_TYPE_VARCHAR : constants.TNS_DATA_TYPE_CHAR;
326
+ csfrm = buf.readUInt8();
327
+ csfrm = csfrm & 0x7f;
328
+ buf.skipBytes(2); // character set
329
+ return types.getTypeByOraTypeNum(oraTypeNum, csfrm);
330
+ case constants.TNS_OBJ_TDS_TYPE_RAW:
331
+ metaData.maxSize = buf.readUInt16BE(); // maximum length
332
+ return types.DB_TYPE_RAW;
333
+ case constants.TNS_OBJ_TDS_TYPE_BINARY_FLOAT:
334
+ return types.DB_TYPE_BINARY_FLOAT;
335
+ case constants.TNS_OBJ_TDS_TYPE_BINARY_DOUBLE:
336
+ return types.DB_TYPE_BINARY_DOUBLE;
337
+ case constants.TNS_OBJ_TDS_TYPE_DATE:
338
+ return types.DB_TYPE_DATE;
339
+ case constants.TNS_OBJ_TDS_TYPE_TIMESTAMP:
340
+ buf.skipBytes(1); // precision
341
+ return types.DB_TYPE_TIMESTAMP;
342
+ case constants.TNS_OBJ_TDS_TYPE_TIMESTAMP_LTZ:
343
+ buf.skipBytes(1); // precision
344
+ return types.DB_TYPE_TIMESTAMP_LTZ;
345
+ case constants.TNS_OBJ_TDS_TYPE_TIMESTAMP_TZ:
346
+ buf.skipBytes(1); // precision
347
+ return types.DB_TYPE_TIMESTAMP_TZ;
348
+ case constants.TNS_OBJ_TDS_TYPE_BOOLEAN:
349
+ return types.DB_TYPE_BOOLEAN;
350
+ case constants.TNS_OBJ_TDS_TYPE_CLOB:
351
+ return types.DB_TYPE_CLOB;
352
+ case constants.TNS_OBJ_TDS_TYPE_BLOB:
353
+ return types.DB_TYPE_BLOB;
354
+ case constants.TNS_OBJ_TDS_TYPE_OBJ:
355
+ buf.skipBytes(5);
356
+ return types.DB_TYPE_OBJECT;
357
+ case constants.TNS_OBJ_TDS_TYPE_START_EMBED_ADT:
358
+ // loop until end type, TNS_OBJ_TDS_TYPE_END_EMBED_ADT
359
+ // is received.
360
+ while (this._parseTDSAttr(buf, {}) !== 0) {
361
+ continue;
362
+ }
363
+ return types.DB_TYPE_OBJECT;
364
+ case constants.TNS_OBJ_TDS_TYPE_END_EMBED_ADT:
365
+ return 0;
366
+ default:
367
+ errors.throwErr(errors.ERR_TDS_TYPE_NOT_SUPPORTED, attrType);
368
+ }
369
+ }
370
+
371
+ //---------------------------------------------------------------------------
372
+ // _parseTDS()
373
+ //
374
+ // Parses the TDS (type descriptor segment) for the type.
375
+ //---------------------------------------------------------------------------
376
+ async _parseTDS(tds, info) {
377
+ // parse initial TDS bytes
378
+ const buf = new TDSBuffer(tds);
379
+ buf.skipBytes(4); // end offset
380
+ buf.skipBytes(2); // version op code and version
381
+ buf.skipBytes(2); // unknown
382
+
383
+ // if the number of attributes exceeds 1, the type cannot refer to a
384
+ // collection, so nothing further needs to be done
385
+ const numAttrs = buf.readUInt16BE();
386
+
387
+ // continue parsing TDS bytes to discover if type refers to a collection
388
+ buf.skipBytes(1); // TDS attributes?
389
+ buf.skipBytes(1); // start ADT op code
390
+ buf.skipBytes(2); // ADT number (always zero)
391
+ buf.skipBytes(4); // offset to index table
392
+
393
+ // check to see if type refers to a collection (only one attribute is
394
+ // present in that case).
395
+ info.isCollection = false;
396
+ if (numAttrs === 1) {
397
+ const pos = buf.pos;
398
+ const attrType = buf.readUInt8();
399
+ if (attrType === constants.TNS_OBJ_TDS_TYPE_COLL) {
400
+ info.isCollection = true;
401
+ } else {
402
+ buf.pos = pos;
403
+ }
404
+ }
405
+
406
+ // Handle collections
407
+ if (info.isCollection) {
408
+ // continue parsing TDS to determine element type
409
+ const elementPos = buf.readUInt32BE();
410
+ info.maxNumElements = buf.readUInt32BE();
411
+ info.collectionType = buf.readUInt8();
412
+ if (info.collectionType === constants.TNS_OBJ_PLSQL_INDEX_TABLE) {
413
+ info.collectionFlags = constants.TNS_OBJ_HAS_INDEXES;
414
+ }
415
+ buf.pos = elementPos;
416
+ info.elementTypeInfo = {};
417
+ info.elementType = this._parseTDSAttr(buf, info.elementTypeInfo);
418
+ if (info.elementType === types.DB_TYPE_OBJECT) {
419
+ await this._getElementTypeObj(info);
420
+ if (info.elementTypeClass.isXmlType) {
421
+ info.elementType = types.DB_TYPE_XMLTYPE;
422
+ }
423
+ }
424
+ } else {
425
+ if (info.attributes) { // skip for XML type as it has no attributes.
426
+ for (const attr of info.attributes) {
427
+ this._parseTDSAttr(buf, attr);
428
+ }
429
+ }
430
+ }
431
+ }
432
+
433
+ //---------------------------------------------------------------------------
434
+ // _populateRowTypeInfo()
435
+ //
436
+ // Get column and datatype information in case of %ROWTYPE handling.
437
+ //---------------------------------------------------------------------------
438
+ async _populateRowTypeInfo(info, options, result) {
439
+ const getColumnsSQL = `
440
+ SELECT
441
+ column_name,
442
+ data_type,
443
+ data_type_owner,
444
+ case
445
+ when data_type in
446
+ ('CHAR', 'NCHAR', 'VARCHAR2', 'NVARCHAR2', 'RAW')
447
+ then data_length
448
+ else 0
449
+ end,
450
+ case
451
+ when data_precision is null and data_scale is null
452
+ then 0
453
+ when data_precision is null
454
+ then 38
455
+ else data_precision
456
+ end,
457
+ case
458
+ when data_precision is null and data_scale is null
459
+ and data_type = 'NUMBER'
460
+ then -127
461
+ when data_scale is null
462
+ then 0
463
+ else data_scale
464
+ end
465
+ from all_tab_cols
466
+ where owner = :owner
467
+ and table_name = :name
468
+ and hidden_column != 'YES'
469
+ order by column_id`;
470
+
471
+ const bindVal = [
472
+ {
473
+ name: "owner",
474
+ type: types.DB_TYPE_VARCHAR,
475
+ maxSize: 128,
476
+ dir: constants.BIND_IN,
477
+ values: [result.outBinds.schema],
478
+ },
479
+ {
480
+ name: "name",
481
+ type: types.DB_TYPE_VARCHAR,
482
+ maxSize: 128,
483
+ dir: constants.BIND_IN,
484
+ values: [info.name.substring(0, info.name.length - 8)]
485
+ }
486
+ ];
487
+ const val = await this.execute(
488
+ getColumnsSQL, 1, bindVal, options, false
489
+ );
490
+ try {
491
+ const attrRows = await val.resultSet._getAllRows();
492
+ info.attributes = [];
493
+ for (const row of attrRows) {
494
+ const metaData = {
495
+ name: row[0],
496
+ dataType: row[1],
497
+ dataTypeOwner: row[2],
498
+ maxSize: row[3],
499
+ dataPrecision: row[4],
500
+ dataScale: row[5],
501
+ };
502
+ if (!metaData.dataTypeOwner) {
503
+ const startPos = row[1].indexOf('(');
504
+ const endPos = row[1].indexOf(')');
505
+ if (endPos > startPos) {
506
+ metaData.dataType = metaData.dataType.substring(0, startPos) +
507
+ metaData.dataType.substring(
508
+ endPos + 1, metaData.dataType.length
509
+ );
510
+ }
511
+ }
512
+ this._addAttr(info.attributes, metaData);
513
+ }
514
+ } finally {
515
+ val.resultSet.close();
516
+ }
517
+ }
518
+
519
+ //---------------------------------------------------------------------------
520
+ // _populateDbObjectTypeInfo()
521
+ //
522
+ // Poplates type information given the name of the type.
523
+ //---------------------------------------------------------------------------
524
+ async _populateDbObjectTypeInfo(name) {
525
+
526
+ // get type information from the database
527
+ const sql = `
528
+ declare
529
+ t_Instantiable varchar2(3);
530
+ t_SuperTypeOwner varchar2(128);
531
+ t_SuperTypeName varchar2(128);
532
+ t_SubTypeRefCursor sys_refcursor;
533
+ t_Pos pls_integer;
534
+ begin
535
+ :ret_val := dbms_pickler.get_type_shape(:full_name, :oid,
536
+ :version, :tds, t_Instantiable, t_SuperTypeOwner,
537
+ t_SuperTypeName, :attrs_rc, t_SubTypeRefCursor);
538
+ :package_name := null;
539
+ if substr(:full_name, length(:full_name) - 7) = '%ROWTYPE' then
540
+ t_Pos := instr(:full_name, '.');
541
+ :schema := substr(:full_name, 1, t_Pos - 1);
542
+ :name := substr(:full_name, t_Pos + 1);
543
+ else
544
+ begin
545
+ select owner, type_name
546
+ into :schema, :name
547
+ from all_types
548
+ where type_oid = :oid;
549
+ exception
550
+ when no_data_found then
551
+ begin
552
+ select owner, package_name, type_name
553
+ into :schema, :package_name, :name
554
+ from all_plsql_types
555
+ where type_oid = :oid;
556
+ exception
557
+ when no_data_found then
558
+ null;
559
+ end;
560
+ end;
561
+ end if;
562
+ end;`;
563
+
564
+ const binds = [
565
+ {
566
+ name: "full_name",
567
+ type: types.DB_TYPE_VARCHAR,
568
+ dir: constants.BIND_INOUT,
569
+ maxSize: 500,
570
+ values: [name]
571
+ },
572
+ {
573
+ name: "ret_val",
574
+ type: types.DB_TYPE_BINARY_INTEGER,
575
+ dir: constants.BIND_OUT,
576
+ values: []
577
+ },
578
+ {
579
+ name: "oid",
580
+ type: types.DB_TYPE_RAW,
581
+ maxSize: 16,
582
+ dir: constants.BIND_OUT,
583
+ values: []
584
+ },
585
+ {
586
+ name: "version",
587
+ type: types.DB_TYPE_BINARY_INTEGER,
588
+ dir: constants.BIND_OUT,
589
+ values: []
590
+ },
591
+ {
592
+ name: "tds",
593
+ type: types.DB_TYPE_RAW,
594
+ maxSize: 2000,
595
+ dir: constants.BIND_OUT,
596
+ values: []
597
+ },
598
+ {
599
+ name: "attrs_rc",
600
+ type: types.DB_TYPE_CURSOR,
601
+ dir: constants.BIND_OUT,
602
+ values: []
603
+ },
604
+ {
605
+ name: "package_name",
606
+ type: types.DB_TYPE_VARCHAR,
607
+ maxSize: 128,
608
+ dir: constants.BIND_OUT,
609
+ values: []
610
+ },
611
+ {
612
+ name: "schema",
613
+ type: types.DB_TYPE_VARCHAR,
614
+ maxSize: 128,
615
+ dir: constants.BIND_OUT,
616
+ values: []
617
+ },
618
+ {
619
+ name: "name",
620
+ type: types.DB_TYPE_VARCHAR,
621
+ maxSize: 128,
622
+ dir: constants.BIND_OUT,
623
+ values: []
624
+ }
625
+ ];
626
+ const options = {
627
+ connection: { _impl: this },
628
+ nullifyInvalidCursor: true
629
+ };
630
+ const result = await this.execute(sql, 1, binds, options, false);
631
+ if (result.outBinds.ret_val !== 0) {
632
+ errors.throwErr(errors.ERR_INVALID_OBJECT_TYPE_NAME, name);
633
+ }
634
+
635
+ try {
636
+ // check cache; if already present, nothing more to do!
637
+ const info = this._getDbObjectType(result.outBinds.schema,
638
+ result.outBinds.name, result.outBinds.package_name, result.outBinds.oid);
639
+ if (!info.partial) {
640
+ return info;
641
+ }
642
+
643
+ // process TDS and attributes cursor
644
+ if (info.name.endsWith('%ROWTYPE')) {
645
+ await this._populateRowTypeInfo(info, options, result);
646
+ } else {
647
+ info.version = result.outBinds.version;
648
+ const attrRows = await result.outBinds.attrs_rc._getAllRows();
649
+ if (attrRows.length > 0) {
650
+ // Its an object not a collection.
651
+ info.attributes = [];
652
+ for (const row of attrRows) {
653
+ const metaData = {
654
+ name: row[1],
655
+ dataType: row[3],
656
+ dataTypeOwner: row[4],
657
+ packageName: row[5],
658
+ oid: row[6]
659
+ };
660
+ this._addAttr(info.attributes, metaData);
661
+ }
662
+
663
+ }
664
+ await this._parseTDS(result.outBinds.tds, info);
665
+ }
666
+ info.partial = false;
667
+ return info;
668
+ } finally {
669
+ result.outBinds.attrs_rc.close();
670
+ }
671
+
672
+ }
673
+
674
+ //---------------------------------------------------------------------------
675
+ // _addAttr()
676
+ //
677
+ // Populates "attributes" object present in "attrList".
678
+ //---------------------------------------------------------------------------
679
+ _addAttr(attributes, attrInfo) {
680
+ const attr = { name: attrInfo.name };
681
+ if (attrInfo.dataTypeOwner) {
682
+ attr.type = types.DB_TYPE_OBJECT;
683
+ attr.typeClass = this._getDbObjectType(
684
+ attrInfo.dataTypeOwner,
685
+ attrInfo.dataType,
686
+ attrInfo.packageName,
687
+ attrInfo.oid
688
+ );
689
+
690
+ if (attr.typeClass.isXmlType) {
691
+ attr.type = types.DB_TYPE_XMLTYPE;
692
+ }
693
+ if (attr.typeClass.partial) {
694
+ this._partialDbObjectTypes.push(attr.typeClass);
695
+ }
696
+ } else {
697
+ if (attrInfo.dataType === 'INTEGER' || attrInfo.dataType === 'SMALLINT') {
698
+ attr.type = types.DB_TYPE_NUMBER;
699
+ attr.precision = 38;
700
+ attr.scale = 0;
701
+ } else if (attrInfo.dataType === 'REAL') {
702
+ attr.type = types.DB_TYPE_NUMBER;
703
+ attr.precision = 63;
704
+ attr.scale = -127;
705
+ } else if (attrInfo.dataType === 'DOUBLE PRECISION' || attrInfo.dataType === 'FLOAT') {
706
+ attr.type = types.DB_TYPE_NUMBER;
707
+ // the database sends type name "FLOAT" instead of type name "REAL"
708
+ // when looking at table metadata but not when examining database
709
+ // object attribute metadata so account for that here
710
+ if (attrInfo.dataPrecision != null || attrInfo.dataPrecision != undefined)
711
+ attr.precision = Number(attrInfo.dataPrecision);
712
+ else
713
+ attr.precision = 126;
714
+ attr.scale = -127;
715
+ } else {
716
+ attr.type = types.getTypeByColumnTypeName(attrInfo.dataType);
717
+ if (attrInfo.maxSize != null || attrInfo.maxSize != undefined) {
718
+ const tempMaxSize = Number(attrInfo.maxSize);
719
+ if (tempMaxSize)
720
+ attr.maxSize = tempMaxSize;
721
+ }
722
+ if (attr.type === types.DB_TYPE_NUMBER) {
723
+ attr.precision = Number(attrInfo.dataPrecision);
724
+ attr.scale = Number(attrInfo.dataScale);
725
+ }
726
+ }
727
+ }
728
+ attributes.push(attr);
729
+ }
730
+
731
+ //---------------------------------------------------------------------------
732
+ // _populatePartialDbObjectTypes()
733
+ //
734
+ // Populates partial types that were discovered earlier. Since populating an
735
+ // object type might result in additional object types being discovered,
736
+ // object types are popped from the partial types list until the list is
737
+ // empty.
738
+ //---------------------------------------------------------------------------
739
+ async _populatePartialDbObjectTypes() {
740
+ while (this._partialDbObjectTypes.length > 0) {
741
+ const info = this._partialDbObjectTypes.pop();
742
+ let suffix = "%ROWTYPE";
743
+ let name = info.name;
744
+ if (name.endsWith(suffix)) {
745
+ name = name.substring(0, name.length - suffix.length);
746
+ } else {
747
+ suffix = "";
748
+ }
749
+ let fullName;
750
+ if (info.packageName) {
751
+ fullName = `"${info.schema}"."${info.packageName}"."${name}"${suffix}`;
752
+ } else {
753
+ fullName = `"${info.schema}"."${name}"${suffix}`;
754
+ }
755
+ await this._populateDbObjectTypeInfo(fullName);
756
+ }
757
+ }
758
+
759
+ async commit() {
760
+ const message = new messages.CommitMessage(this);
761
+ await this._protocol._processMessage(message);
762
+ }
763
+
764
+ async breakExecution() {
765
+ await this._protocol.breakMessage();
766
+ }
767
+
768
+ isCompressionEnabled() {
769
+ return this.nscon.compressionEnabled;
770
+ }
771
+ isHealthy() {
772
+ try {
773
+ if (this.nscon.recvInbandNotif() === 0)
774
+ return true;
775
+ return false;
776
+ } catch {
777
+ return false;
778
+ }
779
+ }
780
+
781
+ isPooled() {
782
+ return (this._pool) ? true : false;
783
+ }
784
+
785
+ _postConnect(authMessage) {
786
+ let releaseNum;
787
+ let updateNum;
788
+ let portReleaseNum;
789
+ let portUpdateNum;
790
+
791
+ this.dbDomain = authMessage.sessionData['AUTH_SC_DB_DOMAIN'];
792
+ this.dbName = authMessage.sessionData['AUTH_DBNAME'];
793
+ this.maxOpenCursors = Number(authMessage.sessionData['AUTH_MAX_OPEN_CURSORS'] || 0);
794
+ this.serviceName = authMessage.sessionData['AUTH_SC_SERVICE_NAME'];
795
+ this.instanceName = authMessage.sessionData['AUTH_INSTANCENAME'];
796
+ this.maxIdentifierLength = Number(authMessage.sessionData['AUTH_MAX_IDEN_LENGTH'] || 30);
797
+ const fullVersionNum = Number(authMessage.sessionData['AUTH_VERSION_NO']);
798
+ const versionNum = (fullVersionNum >> 24) & 0xFF;
799
+ this.warning = authMessage.warning;
800
+ if (this._protocol.caps.ttcFieldVersion >= constants.TNS_CCAP_FIELD_VERSION_18_1_EXT_1) {
801
+ releaseNum = (fullVersionNum >> 16) & 0xFF;
802
+ updateNum = (fullVersionNum >> 12) & 0x0F;
803
+ portReleaseNum = (fullVersionNum >> 4) & 0xFF;
804
+ portUpdateNum = fullVersionNum & 0x0F;
805
+ } else {
806
+ releaseNum = (fullVersionNum >> 20) & 0x0F;
807
+ updateNum = (fullVersionNum >> 12) & 0xFF;
808
+ portReleaseNum = (fullVersionNum >> 8) & 0x0F;
809
+ portUpdateNum = fullVersionNum & 0xFF;
810
+ }
811
+ this.serverVersionString = versionNum + '.' + releaseNum + '.' + updateNum + '.' + portReleaseNum + '.' + portUpdateNum;
812
+ this.serverVersion = versionNum * 100000000 + releaseNum * 1000000 + updateNum * 10000 + portReleaseNum * 100 + portUpdateNum * 1;
813
+ }
814
+
815
+ /**
816
+ *
817
+ * @param {object} params Configuration of the connection
818
+ *
819
+ * @return {Promise}
820
+ */
821
+ async connect(params) {
822
+ if (!params.connectString) {
823
+ errors.throwErr(errors.ERR_EMPTY_CONNECT_STRING);
824
+ }
825
+ thinUtil.checkCredentials(params);
826
+
827
+ this.sessionID = 0;
828
+ this.serialNum = 0;
829
+ this.autoCommit = false;
830
+ this.serverVersion = "";
831
+ this.statementCache = null;
832
+ this.currentSchema = "";
833
+ this.invokeSessionCallback = true;
834
+ this.statementCacheSize = params.stmtCacheSize;
835
+ this._currentSchemaModified = false;
836
+ this._tempLobsToClose = [];
837
+ this._tempLobsTotalSize = 0;
838
+ this._drcpEstablishSession = false;
839
+ this._cclass = null;
840
+ this._clientIdentifier = "";
841
+ this._clientIdentifierModified = false;
842
+ this._action = "";
843
+ this._actionModified = false;
844
+ this._dbOp = "";
845
+ this._dbOpModified = false;
846
+ this._clientInfo = "";
847
+ this._clientInfoModified = false;
848
+ this._module = "";
849
+ this._moduleModified = false;
850
+ this._drcpEnabled = false;
851
+ this.serviceName = '';
852
+ this.remoteAddress = '';
853
+ this.comboKey = null; // used in changePassword API
854
+ this.tpcContext = null;
855
+ this._sessionlessData = null;
856
+
857
+ this.nscon = new nsi();
858
+ finalizationRegistry.register(this, this.nscon);
859
+ await this.nscon.connect(params);
860
+
861
+ let serverType;
862
+ if (this.isPooled()) {
863
+ serverType = params._connInfo[0];
864
+ this.serviceName = params._connInfo[2];
865
+ this.purity = params._connInfo[3] | constants.PURITY_DEFAULT;
866
+ this.sid = params._connInfo[4];
867
+ } else {
868
+ serverType = this.nscon.getOption(sqlNetConstants.SERVERTYPE);
869
+ this.serviceName = this.nscon.getOption(sqlNetConstants.SVCNAME);
870
+ this.sid = this.nscon.getOption(sqlNetConstants.SID);
871
+ this.purity = this.nscon.getOption(sqlNetConstants.PURITY) | constants.PURITY_DEFAULT;
872
+ }
873
+ if (serverType) {
874
+ this._drcpEnabled = serverType.toLowerCase() === 'pooled';
875
+ }
876
+ this.remoteAddress = this.nscon.getOption(sqlNetConstants.REMOTEADDR);
877
+ this.connectionClass = params.connectionClass;
878
+
879
+ /*
880
+ * if drcp is used, use purity = NEW as the default purity for
881
+ * standalone connections and purity = SELF for connections that belong
882
+ * to a pool
883
+ */
884
+ if (this.purity === constants.PURITY_DEFAULT && this._drcpEnabled) {
885
+ if (this.isPooled()) {
886
+ this.purity = constants.PURITY_SELF;
887
+ } else {
888
+ this.purity = constants.PURITY_NEW;
889
+ }
890
+ }
891
+
892
+ this._protocol = new Protocol(this);
893
+
894
+ // check if the protocol version supported by the database is high
895
+ // enough; if not, reject the connection immediately
896
+ if (this._protocol.caps.protocolVersion < constants.TNS_VERSION_MIN_ACCEPTED) {
897
+ errors.throwErr(errors.ERR_SERVER_VERSION_NOT_SUPPORTED);
898
+ }
899
+
900
+ try {
901
+ const protocolMessage = new messages.ProtocolMessage(this);
902
+ const dataTypeMessage = new messages.DataTypeMessage(this);
903
+ const authMessage = new messages.AuthMessage(this, params);
904
+ if (this.nscon.supportsFastAuth) {
905
+ const fastAuthMessage = new messages.FastAuthMessage(this);
906
+ fastAuthMessage.protocolMessage = protocolMessage;
907
+ fastAuthMessage.dataTypeMessage = dataTypeMessage;
908
+ fastAuthMessage.authMessage = authMessage;
909
+ await this._protocol._processMessage(fastAuthMessage);
910
+ if (fastAuthMessage.reNegotiate) {
911
+ // Fast Authentication failed.
912
+ await this._protocol._processMessage(dataTypeMessage);
913
+ await this._protocol._processMessage(authMessage);
914
+ }
915
+ } else {
916
+ // When Fast Auth is explicitly disabled on servers > 23ai,
917
+ // we dont rely on message type TNS_MSG_TYPE_END_OF_REQUEST too
918
+ // for protocolMessage and dataTypeMessage.
919
+ const endOfRequestSupport = this.nscon.endOfRequestSupport;
920
+ this.nscon.endOfRequestSupport = false;
921
+ await this._protocol._processMessage(protocolMessage);
922
+ await this._protocol._processMessage(dataTypeMessage);
923
+ this.nscon.endOfRequestSupport = endOfRequestSupport;
924
+ await this._protocol._processMessage(authMessage);
925
+ }
926
+ if (!params.externalAuth) { // non-token Authentication
927
+ await this._protocol._processMessage(authMessage); // OAUTH
928
+ }
929
+ this._postConnect(authMessage);
930
+ } catch (err) {
931
+ this.nscon.disconnect();
932
+ throw err;
933
+ }
934
+
935
+ this.statementCache = new StatementCache(this.statementCacheSize);
936
+ // maintain a list of partially populated database object types
937
+ this._partialDbObjectTypes = [];
938
+
939
+ if (params.debugJDWP) {
940
+ this.jdwpData = Buffer.from(params.debugJDWP);
941
+ } else if (process.env.ORA_DEBUG_JDWP) {
942
+ this.jdwpData = Buffer.from(process.env.ORA_DEBUG_JDWP);
943
+ }
944
+ this._protocol.connInProgress = false;
945
+ }
946
+
947
+ //---------------------------------------------------------------------------
948
+ // Return the statement to the statement cache, if applicable
949
+ //---------------------------------------------------------------------------
950
+ _returnStatement(statement) {
951
+ this.statementCache.returnStatement(statement);
952
+ }
953
+
954
+ //---------------------------------------------------------------------------
955
+ // Parses the sql statement and puts it into cache if keepInStmtCache
956
+ // option is true
957
+ //---------------------------------------------------------------------------
958
+ _prepare(sql, options) {
959
+ const statement = this._getStatement(sql, options.keepInStmtCache);
960
+ statement.bufferRowIndex = 0;
961
+ statement.bufferRowCount = 0;
962
+ statement.lastRowIndex = 0;
963
+ statement.moreRowsToFetch = true;
964
+ return statement;
965
+ }
966
+
967
+ //---------------------------------------------------------------------------
968
+ // Binds the values by user to the statement object
969
+ //---------------------------------------------------------------------------
970
+ async _bind(stmt, variable, pos = 0, internalTempLobs = []) {
971
+ const bindInfoDict = stmt.bindInfoDict;
972
+ const bindInfoList = stmt.bindInfoList;
973
+
974
+ /*
975
+ * For PL/SQL blocks, if the size of a string or bytes object exceeds
976
+ * 32,767 bytes it is converted to a BLOB/CLOB; and conversion
977
+ * needs to be established as well to return the string in the way that
978
+ * the user expects to get it
979
+ */
980
+ if (stmt.isPlSql && variable.maxSize > 32767) {
981
+ if (variable.type === types.DB_TYPE_RAW ||
982
+ variable.type === types.DB_TYPE_LONG_RAW) {
983
+ variable.type = types.DB_TYPE_BLOB;
984
+ } else if (variable.type._csfrm === constants.CSFRM_NCHAR) {
985
+ variable.type = types.DB_TYPE_NCLOB;
986
+ } else {
987
+ variable.type = types.DB_TYPE_CLOB;
988
+ }
989
+ const maxSize = variable.maxSize;
990
+ delete variable.maxSize;
991
+ variable.outConverter = async function(val) {
992
+ if (val === null) {
993
+ return null;
994
+ }
995
+ const data = await val.getData();
996
+ const len = val._length;
997
+ if (data && len > maxSize) {
998
+ errors.throwErr(errors.ERR_INSUFFICIENT_BUFFER_FOR_BINDS);
999
+ }
1000
+ return data;
1001
+ };
1002
+ }
1003
+
1004
+ if (variable.type === types.DB_TYPE_CLOB ||
1005
+ variable.type === types.DB_TYPE_NCLOB ||
1006
+ variable.type === types.DB_TYPE_BLOB) {
1007
+ for (const [index, val] of variable.values.entries()) {
1008
+ if (!(val instanceof ThinLobImpl)) {
1009
+ if (val && val.length > 0) {
1010
+ const lobImpl = new ThinLobImpl();
1011
+ await lobImpl.create(this, variable.type);
1012
+ internalTempLobs.push(lobImpl);
1013
+ await lobImpl.write(1, val);
1014
+ variable.values[index] = lobImpl;
1015
+ } else {
1016
+ variable.values[index] = null;
1017
+ }
1018
+ }
1019
+ }
1020
+ }
1021
+
1022
+ if (variable.name) {
1023
+ let normalizedName;
1024
+ if (variable.name.startsWith('"') && variable.name.endsWith('"')) {
1025
+ normalizedName = variable.name.substring(1, variable.name.length - 1);
1026
+ } else {
1027
+ normalizedName = variable.name.toUpperCase();
1028
+ }
1029
+ if (normalizedName.startsWith(':')) {
1030
+ normalizedName = variable.name.substring(1);
1031
+ }
1032
+ if (!bindInfoDict.has(normalizedName)) {
1033
+ errors.throwErr(errors.ERR_INVALID_BIND_NAME, normalizedName);
1034
+ }
1035
+ bindInfoDict.get(normalizedName).forEach((bindInfo) => {
1036
+ stmt._setVariable(bindInfo, variable);
1037
+ });
1038
+ } else {
1039
+ const bindInfo = bindInfoList[pos - 1];
1040
+ stmt._setVariable(bindInfo, variable);
1041
+ }
1042
+ }
1043
+
1044
+ //---------------------------------------------------------------------------
1045
+ // _createResultSet()
1046
+ //
1047
+ // Creates a result set and performs any necessary initialization.
1048
+ //---------------------------------------------------------------------------
1049
+ _createResultSet(options, statement) {
1050
+ const resultSet = new ThinResultSetImpl();
1051
+ if (!statement) {
1052
+ statement = new Statement();
1053
+ }
1054
+ resultSet._resultSetNew(this, statement, options);
1055
+ if (statement.queryVars.length > 0) {
1056
+ const metadata = thinUtil.getMetadataMany(statement.queryVars);
1057
+ resultSet._setup(options, metadata);
1058
+ }
1059
+ return resultSet;
1060
+ }
1061
+
1062
+ //---------------------------------------------------------------------------
1063
+ // getDbObjectClass()
1064
+ //
1065
+ // Returns a database object class given its name.
1066
+ //---------------------------------------------------------------------------
1067
+ async getDbObjectClass(name) {
1068
+ const info = await this._populateDbObjectTypeInfo(name);
1069
+ await this._populatePartialDbObjectTypes();
1070
+ return info;
1071
+ }
1072
+
1073
+ //---------------------------------------------------------------------------
1074
+ // getStatementInfo()
1075
+ //
1076
+ // Parses the SQL statement and returns information about the statement.
1077
+ //---------------------------------------------------------------------------
1078
+ async getStatementInfo(sql) {
1079
+ const options = {};
1080
+ const result = {};
1081
+ const statement = this._prepare(sql, options);
1082
+ options.connection = this;
1083
+ try {
1084
+ if (!statement.isDdl) {
1085
+ const message = new messages.ExecuteMessage(this, statement, options);
1086
+ message.parseOnly = true;
1087
+ await this._protocol._processMessage(message);
1088
+ }
1089
+ if (statement.numQueryVars > 0) {
1090
+ result.metaData = thinUtil.getMetadataMany(statement.queryVars);
1091
+ }
1092
+ result.bindNames = Array.from(statement.bindInfoDict.keys());
1093
+ result.statementType = statement.statementType;
1094
+ return result;
1095
+ } finally {
1096
+ this._returnStatement(statement);
1097
+ }
1098
+ }
1099
+
1100
+ //---------------------------------------------------------------------------
1101
+ // execute()
1102
+ //
1103
+ // Calls the RPC that executes a SQL statement and returns the results.
1104
+ //---------------------------------------------------------------------------
1105
+ async execute(sql, numIters, binds, options, executeManyFlag) {
1106
+ const statement = this._prepare(sql, options);
1107
+ const internalTempLobs = [];
1108
+ try {
1109
+ return await this._execute(statement, numIters, binds, options,
1110
+ executeManyFlag, internalTempLobs);
1111
+ } catch (err) {
1112
+ this._returnStatement(statement);
1113
+ throw err;
1114
+ } finally {
1115
+ // Add to freelist which will be sent in piggyback fashion
1116
+ for (const lob of internalTempLobs) {
1117
+ this._tempLobsToClose.push(lob._locator);
1118
+ this._tempLobsTotalSize += lob._locator.length;
1119
+ }
1120
+ }
1121
+ }
1122
+
1123
+ //---------------------------------------------------------------------------
1124
+ // Get the statement object from the statement cache for the SQL if it exists
1125
+ // else prepare a new statement object for the SQL. If a statement is already
1126
+ // in use a copy will be made and returned (and will not be returned to the
1127
+ // cache). If a statement is being executed for the first time after releasing
1128
+ // a DRCP session, a copy will also be made (and will not be returned to the
1129
+ // cache) since it is unknown at this point whether the original session or a
1130
+ // new session is going to be used.
1131
+ //---------------------------------------------------------------------------
1132
+ _getStatement(sql, cacheStatement = false) {
1133
+ return this.statementCache.getStatement(sql, cacheStatement,
1134
+ this._drcpEstablishSession);
1135
+ }
1136
+
1137
+ //---------------------------------------------------------------------------
1138
+ // Calls the ping RPC for Oracle Database
1139
+ //---------------------------------------------------------------------------
1140
+ async ping() {
1141
+ const message = new messages.PingMessage(this);
1142
+ await this._protocol._processMessage(message);
1143
+ }
1144
+
1145
+ //---------------------------------------------------------------------------
1146
+ // Calls the Rollback RPC for Oracle Database
1147
+ //---------------------------------------------------------------------------
1148
+ async rollback() {
1149
+ const message = new messages.RollbackMessage(this);
1150
+ await this._protocol._processMessage(message);
1151
+ }
1152
+
1153
+ //---------------------------------------------------------------------------
1154
+ // Returns the Oracle Server version
1155
+ //---------------------------------------------------------------------------
1156
+ getOracleServerVersion() {
1157
+ return this.serverVersion;
1158
+ }
1159
+
1160
+ //---------------------------------------------------------------------------
1161
+ // Returns the Oracle Server version string
1162
+ //---------------------------------------------------------------------------
1163
+ getOracleServerVersionString() {
1164
+ return this.serverVersionString;
1165
+ }
1166
+
1167
+ setCurrentSchema(schema) {
1168
+ this._currentSchemaModified = true;
1169
+ this.currentSchema = schema;
1170
+ }
1171
+
1172
+ getCurrentSchema() {
1173
+ return this.currentSchema;
1174
+ }
1175
+
1176
+ setClientId(clientId) {
1177
+ this._clientIdentifierModified = true;
1178
+ this._clientIdentifier = clientId;
1179
+ }
1180
+
1181
+ setDbOp(dbOp) {
1182
+ this._dbOpModified = true;
1183
+ this._dbOp = dbOp;
1184
+ }
1185
+
1186
+ setExternalName(value) {
1187
+ this.externalName = value;
1188
+ }
1189
+
1190
+ setInternalName(value) {
1191
+ this.internalName = value;
1192
+ }
1193
+
1194
+ setClientInfo(clientInfo) {
1195
+ this._clientInfoModified = true;
1196
+ this._clientInfo = clientInfo;
1197
+ }
1198
+
1199
+ setModule(module) {
1200
+ this._moduleModified = true;
1201
+ this._module = module;
1202
+
1203
+ /*
1204
+ * setting the module by itself results in an error so always force
1205
+ * action to be set as well (which eliminates this error)
1206
+ */
1207
+ this._actionModified = true;
1208
+ }
1209
+
1210
+ setAction(action) {
1211
+ this._actionModified = true;
1212
+ this._action = action;
1213
+ }
1214
+
1215
+ async changePassword(user, password, newPassword) {
1216
+ const config = {
1217
+ user: user,
1218
+ newPassword: newPassword,
1219
+ password: password,
1220
+ changePassword: true
1221
+ };
1222
+ const message = new messages.AuthMessage(this, config);
1223
+ await this._protocol._processMessage(message); // OAUTH
1224
+ }
1225
+
1226
+ async createLob(dbType) {
1227
+ const lobImpl = new ThinLobImpl();
1228
+ await lobImpl.create(this, dbType);
1229
+ return lobImpl;
1230
+ }
1231
+
1232
+ // Check the state returned by the tpcCommit() call.
1233
+ checkTpcCommitState(state, onePhase) {
1234
+ if ((onePhase && state !== constants.TNS_TPC_TXN_STATE_READ_ONLY
1235
+ && state !== constants.TNS_TPC_TXN_STATE_COMMITTED) ||
1236
+ (!onePhase && state !== constants.TNS_TPC_TXN_STATE_FORGOTTEN)) {
1237
+ errors.throwErr(errors.ERR_UNKNOWN_TRANSACTION_STATE, state);
1238
+ }
1239
+ }
1240
+
1241
+ // Creates a two-phase commit message suitable for committing a transaction.
1242
+ createTpcCommitMessage(xid, onePhase) {
1243
+ const message = new messages.TransactionChangeStateMessage(this);
1244
+ message.operation = constants.TNS_TPC_TXN_COMMIT;
1245
+ message.state = (onePhase == 0) ? constants.TNS_TPC_TXN_STATE_COMMITTED :
1246
+ constants.TNS_TPC_TXN_STATE_READ_ONLY;
1247
+ message.xid = xid;
1248
+ message.context = this.tpcContext;
1249
+ return message;
1250
+ }
1251
+
1252
+ // Creates a two-phase commit rollback message suitable for use in both
1253
+ // the close() method and explicitly by the user.
1254
+ createTpcRollbackMessage(xid = null) {
1255
+ const message = new messages.TransactionChangeStateMessage(this);
1256
+ message.operation = constants.TNS_TPC_TXN_ABORT;
1257
+ message.state = constants.TNS_TPC_TXN_STATE_ABORTED;
1258
+ message.xid = xid;
1259
+ message.context = this.tpcContext;
1260
+ return message;
1261
+ }
1262
+
1263
+ //---------------------------------------------------------------------------
1264
+ // tpcBegin()
1265
+ //---------------------------------------------------------------------------
1266
+ async tpcBegin(xid, flags, timeout) {
1267
+ const message = new messages.TransactionSwitchMessage(this);
1268
+ message.operation = constants.TNS_TPC_TXN_START;
1269
+ message.xid = xid;
1270
+ message.flags = flags;
1271
+ message.timeout = timeout;
1272
+ await this._protocol._processMessage(message);
1273
+ this.tpcContext = message.context;
1274
+ }
1275
+
1276
+ //---------------------------------------------------------------------------
1277
+ // tpcCommit()
1278
+ //---------------------------------------------------------------------------
1279
+ async tpcCommit(xid, onePhase) {
1280
+ const message = this.createTpcCommitMessage(xid, onePhase);
1281
+ await this._protocol._processMessage(message);
1282
+ this.checkTpcCommitState(message.state, onePhase);
1283
+ }
1284
+
1285
+ //---------------------------------------------------------------------------
1286
+ // tpcEnd()
1287
+ //---------------------------------------------------------------------------
1288
+ async tpcEnd(xid, flags) {
1289
+ const message = new messages.TransactionSwitchMessage(this);
1290
+ message.operation = constants.TNS_TPC_TXN_DETACH;
1291
+ message.xid = xid;
1292
+ message.context = this.tpcContext;
1293
+ message.flags = flags;
1294
+ await this._protocol._processMessage(message);
1295
+ this.tpcContext = null;
1296
+ }
1297
+
1298
+ //---------------------------------------------------------------------------
1299
+ // tpcPrepare()
1300
+ //---------------------------------------------------------------------------
1301
+ async tpcPrepare(xid) {
1302
+ const message = new messages.TransactionChangeStateMessage(this);
1303
+ message.operation = constants.TNS_TPC_TXN_PREPARE;
1304
+ message.xid = xid;
1305
+ message.context = this.tpcContext;
1306
+ await this._protocol._processMessage(message);
1307
+ if (message.state === constants.TNS_TPC_TXN_STATE_REQUIRES_COMMIT) {
1308
+ return true;
1309
+ } else if (message.state === constants.TNS_TPC_TXN_STATE_READ_ONLY) {
1310
+ return false;
1311
+ }
1312
+
1313
+ errors.throwErr(errors.ERR_UNKNOWN_TRANSACTION_STATE, message.state);
1314
+ }
1315
+
1316
+ //---------------------------------------------------------------------------
1317
+ // tpcRollback()
1318
+ //---------------------------------------------------------------------------
1319
+ async tpcRollback(xid) {
1320
+ const message = this.createTpcRollbackMessage(xid);
1321
+ await this._protocol._processMessage(message);
1322
+ if (message.state !== constants.TNS_TPC_TXN_STATE_ABORTED) {
1323
+ errors.throwErr(errors.ERR_UNKNOWN_TRANSACTION_STATE, message.state);
1324
+ }
1325
+ }
1326
+ //---------------------------------------------------------------------------
1327
+ // Ensure no sessionless transaction was started through server procedure
1328
+ //---------------------------------------------------------------------------
1329
+ _validateSessionlessState() {
1330
+ if (this._sessionlessData?.startedOnServer) {
1331
+ errors.throwErr(errors.ERR_SESSIONLESS_DIFFERING_METHODS);
1332
+ }
1333
+ }
1334
+
1335
+ //---------------------------------------------------------------------------
1336
+ // Begin/Resume a sessionless transaction with provided transactionId
1337
+ //---------------------------------------------------------------------------
1338
+ async startSessionlessTransaction(transactionId, timeout, flags,
1339
+ deferRoundTrip) {
1340
+ this._validateSessionlessState();
1341
+ if (this._sessionlessData)
1342
+ errors.throwErr(errors.ERR_SESSIONLESS_ALREADY_ACTIVE);
1343
+ const message = new messages.TransactionSwitchMessage(this);
1344
+ message.xid = {
1345
+ globalTransactionId: transactionId,
1346
+ branchQualifier: "",
1347
+ formatId: constants.TNS_TPC_TRANS_SESSIONLESS_FORMAT
1348
+ };
1349
+ message.timeout = timeout;
1350
+ message.operation = constants.TNS_TPC_TXN_START;
1351
+ message.flags = constants.TNS_TPC_TRANS_SESSIONLESS | flags;
1352
+ if (deferRoundTrip) {
1353
+ message.messageType = constants.TNS_MSG_TYPE_PIGGYBACK;
1354
+ this._sessionlessData = {
1355
+ piggyback: message,
1356
+ pending: true
1357
+ };
1358
+ } else {
1359
+ await this._protocol._processMessage(message);
1360
+ }
1361
+ }
1362
+
1363
+ //---------------------------------------------------------------------------
1364
+ // Suspend the active sessionless transaction
1365
+ //---------------------------------------------------------------------------
1366
+ async suspendSessionlessTransaction() {
1367
+ this._validateSessionlessState();
1368
+ if (!this._sessionlessData)
1369
+ errors.throwErr(errors.ERR_SESSIONLESS_INACTIVE);
1370
+ const message = new messages.TransactionSwitchMessage(this);
1371
+ message.operation = constants.TNS_TPC_TXN_DETACH;
1372
+ message.flags = constants.TNS_TPC_TRANS_SESSIONLESS;
1373
+ await this._protocol._processMessage(message);
1374
+ }
1375
+
1376
+
1377
+ //---------------------------------------------------------------------------
1378
+ // Returns the statement cache size for the statement cache maintained by
1379
+ // the connection object
1380
+ //---------------------------------------------------------------------------
1381
+ getStmtCacheSize() {
1382
+ return this.statementCache._maxSize;
1383
+ }
1384
+
1385
+ setCallTimeout(timeout) {
1386
+ this._protocol.callTimeout = timeout;
1387
+ }
1388
+
1389
+ getCallTimeout() {
1390
+ return this._protocol.callTimeout;
1391
+ }
1392
+
1393
+ //---------------------------------------------------------------------------
1394
+ // Returns getTag. Actual tag returned by db must be a string.
1395
+ //---------------------------------------------------------------------------
1396
+ getTag() {
1397
+ return '';
1398
+ }
1399
+
1400
+ getExternalName() {
1401
+ return this.externalName;
1402
+ }
1403
+
1404
+ //---------------------------------------------------------------------------
1405
+ // Returns the Oracle Database instance name associated with the connection.
1406
+ //---------------------------------------------------------------------------
1407
+ getInstanceName() {
1408
+ return this.instanceName;
1409
+ }
1410
+
1411
+ getInternalName() {
1412
+ return this.internalName;
1413
+ }
1414
+
1415
+ //---------------------------------------------------------------------------
1416
+ // Returns the Logical Transaction ID (ltxid) associated with the connection.
1417
+ // Used with Oracle Database Transaction Guard feature.
1418
+ //---------------------------------------------------------------------------
1419
+ getLTXID() {
1420
+ return this._ltxid;
1421
+ }
1422
+
1423
+ //---------------------------------------------------------------------------
1424
+ // Returns the Oracle Database domain name associated with the connection.
1425
+ //---------------------------------------------------------------------------
1426
+ getDbDomain() {
1427
+ return this.dbDomain;
1428
+ }
1429
+
1430
+ //---------------------------------------------------------------------------
1431
+ // Returns the Oracle Database host name associated with the connection.
1432
+ //---------------------------------------------------------------------------
1433
+ getHostName() {
1434
+ return this.nscon.ntAdapter.hostName;
1435
+ }
1436
+
1437
+ //---------------------------------------------------------------------------
1438
+ // Returns the Oracle Database port number associated with the connection.
1439
+ //---------------------------------------------------------------------------
1440
+ getPort() {
1441
+ return this.nscon.ntAdapter.port;
1442
+ }
1443
+
1444
+ //---------------------------------------------------------------------------
1445
+ // Returns the protocol associated with the connection.
1446
+ //---------------------------------------------------------------------------
1447
+ getProtocol() {
1448
+ return (this.nscon.ntAdapter.secure) ? 'TCPS' : 'TCP';
1449
+ }
1450
+
1451
+ //---------------------------------------------------------------------------
1452
+ // Returns the Oracle Database name associated with the connection.
1453
+ //---------------------------------------------------------------------------
1454
+ getDbName() {
1455
+ return this.dbName;
1456
+ }
1457
+
1458
+ //---------------------------------------------------------------------------
1459
+ // Returns maximum number of cursors that can be opened in one session.
1460
+ //---------------------------------------------------------------------------
1461
+ getMaxOpenCursors() {
1462
+ return this.maxOpenCursors;
1463
+ }
1464
+
1465
+ //---------------------------------------------------------------------------
1466
+ // Returns the maximum length of identifiers supported by the database to
1467
+ // which this connection has been established.
1468
+ //---------------------------------------------------------------------------
1469
+ getMaxIdentifierLength() {
1470
+ return this.maxIdentifierLength;
1471
+ }
1472
+
1473
+ //---------------------------------------------------------------------------
1474
+ // Returns the Oracle Database service name associated with the connection.
1475
+ //---------------------------------------------------------------------------
1476
+ getServiceName() {
1477
+ return this.serviceName;
1478
+ }
1479
+
1480
+ //---------------------------------------------------------------------------
1481
+ // Returns boolean based on this._protocol.txnInProgress value.
1482
+ //---------------------------------------------------------------------------
1483
+ getTransactionInProgress() {
1484
+ return this._protocol.txnInProgress;
1485
+ }
1486
+
1487
+ //---------------------------------------------------------------------------
1488
+ // Returns the warning object.
1489
+ //---------------------------------------------------------------------------
1490
+ getWarning() {
1491
+ return this.warning;
1492
+ }
1493
+
1494
+ //---------------------------------------------------------------------------
1495
+ // getQueue()
1496
+ //
1497
+ // Returns a queue for use with advanced queuing.
1498
+ //---------------------------------------------------------------------------
1499
+ getQueue(name, payloadTypeClass, payloadType) {
1500
+ return new ThinQueueImpl(this, name, payloadTypeClass, payloadType);
1501
+ }
1502
+ }
1503
+
1504
+ module.exports = ThinConnectionImpl;