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.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/4by6-f6q.js +982 -0
- package/.output/public/_nuxt/8Ppmjv9D.js +1 -0
- package/.output/public/_nuxt/B1qjkRVO.js +1 -0
- package/.output/public/_nuxt/B3KEisfc.js +1 -0
- package/.output/public/_nuxt/B4ebLeWY.js +9 -0
- package/.output/public/_nuxt/{IitECNfD.js → B6hH0qos.js} +1 -1
- package/.output/public/_nuxt/{BUDtG__q.js → B7HEMfgt.js} +1 -1
- package/.output/public/_nuxt/B84SvUzr.js +1 -0
- package/.output/public/_nuxt/BDXvbRNW.js +1 -0
- package/.output/public/_nuxt/BGRcizqy.js +1 -0
- package/.output/public/_nuxt/{ClYziJpO.js → BGVGiigU.js} +1 -1
- package/.output/public/_nuxt/{ZdjmUBoX.js → BJYf67_H.js} +1 -1
- package/.output/public/_nuxt/BOK5ZFNK.js +1 -0
- package/.output/public/_nuxt/BPY2ud8g.js +1 -0
- package/.output/public/_nuxt/BSONoRG4.js +2 -0
- package/.output/public/_nuxt/BT53m-su.js +1 -0
- package/.output/public/_nuxt/BTJSh8in.js +2 -0
- package/.output/public/_nuxt/BVpt8J3a.js +1 -0
- package/.output/public/_nuxt/{BhUkpIlA.js → BdDEVolW.js} +1 -1
- package/.output/public/_nuxt/{C27bL9Es.js → BeNILdbT.js} +1 -1
- package/.output/public/_nuxt/{Dnx67EG9.js → BmU9CNkM.js} +1 -1
- package/.output/public/_nuxt/{DLHYqHwF.js → BnFDcr74.js} +1 -1
- package/.output/public/_nuxt/{sE-55p4e.js → BprXyYdv.js} +1 -1
- package/.output/public/_nuxt/{BCcTASq_.js → Bq7otXBA.js} +1 -1
- package/.output/public/_nuxt/{B_PBOfFN.js → BqyO8OjC.js} +93 -93
- package/.output/public/_nuxt/Bs1og3h1.js +10 -0
- package/.output/public/_nuxt/Bs2DgR_z.js +1 -0
- package/.output/public/_nuxt/{BsoQBloB.js → BvUhrUEH.js} +1 -1
- package/.output/public/_nuxt/{DkggUtNN.js → BxDrCsPf.js} +1 -1
- package/.output/public/_nuxt/BxrwrGYE.js +1 -0
- package/.output/public/_nuxt/By0aUn7N.js +1 -0
- package/.output/public/_nuxt/{C07rlnlv.js → ByOuUnNS.js} +1 -1
- package/.output/public/_nuxt/C177_GoB.js +1 -0
- package/.output/public/_nuxt/{DcfsxCxL.js → C1jMZ4hc.js} +1 -1
- package/.output/public/_nuxt/C5bgdIOp.js +1 -0
- package/.output/public/_nuxt/C69a9jD3.js +67 -0
- package/.output/public/_nuxt/C8AyZ3_X.js +2 -0
- package/.output/public/_nuxt/C8KplD68.js +1 -0
- package/.output/public/_nuxt/CA99KAte.js +3 -0
- package/.output/public/_nuxt/{CvTHaPAO.js → CE8aasoy.js} +1 -1
- package/.output/public/_nuxt/{DkY69STm.js → CEvNlevo.js} +1 -1
- package/.output/public/_nuxt/{B8JnYxjr.js → CKqvNpN3.js} +1 -1
- package/.output/public/_nuxt/CNF1h1lI.js +1 -0
- package/.output/public/_nuxt/COAycMg4.js +1 -0
- package/.output/public/_nuxt/CR6_eO9a.js +6 -0
- package/.output/public/_nuxt/{D4jn2f-6.js → CREZ9f0O.js} +4 -4
- package/.output/public/_nuxt/CS5ItJPR.js +39 -0
- package/.output/public/_nuxt/CcK14gfI.js +1 -0
- package/.output/public/_nuxt/{DnxDSFih.js → Ci43mke5.js} +3 -3
- package/.output/public/_nuxt/CjouDEjz.js +1 -0
- package/.output/public/_nuxt/Cp5lMcfd.js +1 -0
- package/.output/public/_nuxt/CpYiq1Wv.js +1 -0
- package/.output/public/_nuxt/{DVxTxYP4.js → CrLqg4B0.js} +1 -1
- package/.output/public/_nuxt/{BJxYuvXF.js → CvcedJeQ.js} +1 -1
- package/.output/public/_nuxt/{FIJP2AmN.js → Cvq07PgE.js} +1 -1
- package/.output/public/_nuxt/CwmbX4-U.js +1 -0
- package/.output/public/_nuxt/{B27ECqWz.js → Cx6s86aR.js} +1 -1
- package/.output/public/_nuxt/{DDYV6jDr.js → CybtvDjH.js} +1 -1
- package/.output/public/_nuxt/CzB2y8br.js +18 -0
- package/.output/public/_nuxt/{-p9JbKy8.js → D-YUpbah.js} +3 -3
- package/.output/public/_nuxt/D60Pzl_V.js +1 -0
- package/.output/public/_nuxt/D9BYd7AV.js +1 -0
- package/.output/public/_nuxt/D9dEqMyH.js +152 -0
- package/.output/public/_nuxt/DCJ49Fnq.js +1 -0
- package/.output/public/_nuxt/{gO22NLpn.js → DESYlybj.js} +1 -1
- package/.output/public/_nuxt/DFM-aCBX.js +1 -0
- package/.output/public/_nuxt/{DRKnK1N_.js → DHnNoguE.js} +1 -1
- package/.output/public/_nuxt/{ChkFTcxr.js → DJqZzQsX.js} +1 -1
- package/.output/public/_nuxt/DNNdcUH4.js +1 -0
- package/.output/public/_nuxt/{LFK46Fls.js → DNdM2ZyK.js} +1 -1
- package/.output/public/_nuxt/{CVliJ52o.js → DQT4eICL.js} +1 -1
- package/.output/public/_nuxt/{CffFK_qY.js → DWBoXz89.js} +1 -1
- package/.output/public/_nuxt/DXp9fCib.js +20 -0
- package/.output/public/_nuxt/{ACOLmAuq.js → DaKikgWm.js} +1 -1
- package/.output/public/_nuxt/{B9zSkyFO.js → DaMyovpr.js} +1 -1
- package/.output/public/_nuxt/DeBdxlx0.js +1 -0
- package/.output/public/_nuxt/{trZyeId5.js → DhKwXzSk.js} +1 -1
- package/.output/public/_nuxt/{C6Vqzp-9.js → DkadXn5U.js} +1 -1
- package/.output/public/_nuxt/Dkikh2OC.js +22 -0
- package/.output/public/_nuxt/DlOyXrKK.js +1 -0
- package/.output/public/_nuxt/{UqWhjgOc.js → Dpl6-lqE.js} +1 -1
- package/.output/public/_nuxt/DqA_edEU.js +1 -0
- package/.output/public/_nuxt/DqxL2Lpl.js +1 -0
- package/.output/public/_nuxt/Dt3rfvTn.js +1 -0
- package/.output/public/_nuxt/Dt5h0Tys.js +1 -0
- package/.output/public/_nuxt/DwrSZ8Vj.js +1 -0
- package/.output/public/_nuxt/DwyFZZT6.js +1 -0
- package/.output/public/_nuxt/EM8J-XL1.js +7 -0
- package/.output/public/_nuxt/ESKvsKwc.js +1 -0
- package/.output/public/_nuxt/{CWGdTiOD.js → F5lCgNdb.js} +1 -1
- package/.output/public/_nuxt/H5m89x1B.js +1 -0
- package/.output/public/_nuxt/{CwdIiq6J.js → PUe8M07P.js} +2 -2
- package/.output/public/_nuxt/{Cjgqfl1g.js → TEF-nDfP.js} +1 -1
- package/.output/public/_nuxt/{DNZpxuwM.js → TuKV3Ilv.js} +1 -1
- package/.output/public/_nuxt/V5LvXMJl.js +1 -0
- package/.output/public/_nuxt/{c_huf6xz.js → YJvNy3iu.js} +27 -27
- package/.output/public/_nuxt/{C7C8tPlA.js → ZObQcd0X.js} +1 -1
- package/.output/public/_nuxt/{CHOD7i6O.js → b_MfGg1c.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/455d4da4-6357-4478-8703-78a79ccbbc0f.json +1 -0
- package/.output/public/_nuxt/entry.qdzR7QFr.css +1 -0
- package/.output/public/_nuxt/fpuEgQ7C.js +12 -0
- package/.output/public/_nuxt/jU7fkvuR.js +1 -0
- package/.output/public/_nuxt/{CSTzT9hP.js → lHkFwi3L.js} +1 -1
- package/.output/public/_nuxt/{BQOaPJzs.js → minLMBmY.js} +1 -1
- package/.output/public/_nuxt/pQ8l8BR2.js +1 -0
- package/.output/public/_nuxt/xYXqL1eV.js +1 -0
- package/.output/public/_nuxt/xxfb8w7n.js +1 -0
- package/.output/server/chunks/_/create-adapter.mjs +36 -7
- package/.output/server/chunks/_/create-adapter.mjs.map +1 -1
- package/.output/server/chunks/_/database-error.mjs +10 -0
- package/.output/server/chunks/_/database-error.mjs.map +1 -1
- package/.output/server/chunks/_/database-roles.factory.mjs +126 -22
- package/.output/server/chunks/_/database-roles.factory.mjs.map +1 -1
- package/.output/server/chunks/_/db-connection.mjs +721 -81
- package/.output/server/chunks/_/db-connection.mjs.map +1 -1
- package/.output/server/chunks/_/functions.factory.mjs +97 -6
- package/.output/server/chunks/_/functions.factory.mjs.map +1 -1
- package/.output/server/chunks/_/instance-insights.factory.mjs +106 -7
- package/.output/server/chunks/_/instance-insights.factory.mjs.map +1 -1
- package/.output/server/chunks/_/metadata.factory.mjs +912 -43
- package/.output/server/chunks/_/metadata.factory.mjs.map +1 -1
- package/.output/server/chunks/_/native-backup-jobs.mjs +1302 -0
- package/.output/server/chunks/_/native-backup-jobs.mjs.map +1 -0
- package/.output/server/chunks/_/query.factory.mjs +536 -14
- package/.output/server/chunks/_/query.factory.mjs.map +1 -1
- package/.output/server/chunks/_/schemaMeta.type.mjs +13 -0
- package/.output/server/chunks/_/schemaMeta.type.mjs.map +1 -0
- package/.output/server/chunks/_/tables.factory.mjs +905 -37
- package/.output/server/chunks/_/tables.factory.mjs.map +1 -1
- package/.output/server/chunks/_/type-alias.constants.mjs +242 -0
- package/.output/server/chunks/_/type-alias.constants.mjs.map +1 -0
- package/.output/server/chunks/_/views.factory.mjs +106 -8
- package/.output/server/chunks/_/views.factory.mjs.map +1 -1
- package/.output/server/chunks/build/client.manifest.mjs +676 -672
- package/.output/server/chunks/build/client.manifest.mjs.map +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +1046 -751
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/ai/agent.mjs +30 -79
- package/.output/server/chunks/routes/api/ai/agent.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-export/export-database.mjs +26 -124
- package/.output/server/chunks/routes/api/database-export/export-database.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-export/jobs/_jobId/download.get.mjs +52 -0
- package/.output/server/chunks/routes/api/database-export/jobs/_jobId/download.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/database-export/jobs/_jobId_.get.mjs +43 -0
- package/.output/server/chunks/routes/api/database-export/jobs/_jobId_.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/database-import/import-database.mjs +69 -134
- package/.output/server/chunks/routes/api/database-import/import-database.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-import/jobs/_jobId_.get.mjs +43 -0
- package/.output/server/chunks/routes/api/database-import/jobs/_jobId_.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/database-roles/create-role.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/create-role.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/delete-role.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/delete-role.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/get-databases-with-permissions.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/get-databases-with-permissions.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/get-databases.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/get-databases.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/get-permissions.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/get-permissions.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/get-role-inheritance.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/get-role-inheritance.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/get-role.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/get-role.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/get-roles.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/get-roles.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/get-schema-objects.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/get-schema-objects.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/get-schemas.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/get-schemas.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/grant-bulk-permissions.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/grant-bulk-permissions.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/grant-permission.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/grant-permission.mjs.map +1 -1
- package/.output/server/chunks/routes/api/database-roles/revoke-permission.mjs +2 -0
- package/.output/server/chunks/routes/api/database-roles/revoke-permission.mjs.map +1 -1
- package/.output/server/chunks/routes/api/functions/definition.post.mjs +3 -1
- package/.output/server/chunks/routes/api/functions/definition.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/functions/delete.post.mjs +3 -1
- package/.output/server/chunks/routes/api/functions/delete.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/functions/overview.post.mjs +3 -1
- package/.output/server/chunks/routes/api/functions/overview.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/functions/rename.post.mjs +3 -1
- package/.output/server/chunks/routes/api/functions/rename.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/functions/signature.post.mjs +3 -1
- package/.output/server/chunks/routes/api/functions/signature.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/functions/update.post.mjs +24 -6
- package/.output/server/chunks/routes/api/functions/update.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.post.mjs +63 -0
- package/.output/server/chunks/routes/api/index.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/instance-insights/cancel-query.post.mjs +2 -0
- package/.output/server/chunks/routes/api/instance-insights/cancel-query.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/instance-insights/configuration.post.mjs +2 -0
- package/.output/server/chunks/routes/api/instance-insights/configuration.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/instance-insights/dashboard.post.mjs +2 -0
- package/.output/server/chunks/routes/api/instance-insights/dashboard.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/instance-insights/drop-slot.post.mjs +2 -0
- package/.output/server/chunks/routes/api/instance-insights/drop-slot.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/instance-insights/replication.post.mjs +2 -0
- package/.output/server/chunks/routes/api/instance-insights/replication.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/instance-insights/state.post.mjs +2 -0
- package/.output/server/chunks/routes/api/instance-insights/state.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/instance-insights/terminate-connection.post.mjs +2 -0
- package/.output/server/chunks/routes/api/instance-insights/terminate-connection.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/instance-insights/toggle-slot-status.post.mjs +2 -0
- package/.output/server/chunks/routes/api/instance-insights/toggle-slot-status.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/managment-connection/health-check.mjs +10 -4
- package/.output/server/chunks/routes/api/managment-connection/health-check.mjs.map +1 -1
- package/.output/server/chunks/routes/api/metadata/erd.post.mjs +4 -0
- package/.output/server/chunks/routes/api/metadata/erd.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/metadata/meta-data.post.mjs +4 -0
- package/.output/server/chunks/routes/api/metadata/meta-data.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/metadata/reverse-schemas.post.mjs +4 -0
- package/.output/server/chunks/routes/api/metadata/reverse-schemas.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/metrics/monitor.post.mjs +80 -7
- package/.output/server/chunks/routes/api/metrics/monitor.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/query/execute.post.mjs +3 -1
- package/.output/server/chunks/routes/api/query/execute.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/query/raw-execute-stream.post.mjs +3 -1
- package/.output/server/chunks/routes/api/query/raw-execute-stream.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/query/raw-execute.post.mjs +3 -1
- package/.output/server/chunks/routes/api/query/raw-execute.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/bulk-delete.post.mjs +3 -1
- package/.output/server/chunks/routes/api/tables/bulk-delete.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/bulk-update.post.mjs +3 -1
- package/.output/server/chunks/routes/api/tables/bulk-update.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/ddl.post.mjs +3 -1
- package/.output/server/chunks/routes/api/tables/ddl.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/export.post.mjs +4 -2
- package/.output/server/chunks/routes/api/tables/export.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/indexes.post.mjs +3 -1
- package/.output/server/chunks/routes/api/tables/indexes.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/meta.post.mjs +3 -1
- package/.output/server/chunks/routes/api/tables/meta.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/overview.post.mjs +3 -1
- package/.output/server/chunks/routes/api/tables/overview.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/rls.post.mjs +3 -1
- package/.output/server/chunks/routes/api/tables/rls.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/rules.post.mjs +3 -1
- package/.output/server/chunks/routes/api/tables/rules.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/size.post.mjs +3 -1
- package/.output/server/chunks/routes/api/tables/size.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/structure.post.mjs +3 -1
- package/.output/server/chunks/routes/api/tables/structure.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tables/triggers.post.mjs +3 -1
- package/.output/server/chunks/routes/api/tables/triggers.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/views/definition.post.mjs +2 -0
- package/.output/server/chunks/routes/api/views/definition.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/views/dependencies.post.mjs +2 -0
- package/.output/server/chunks/routes/api/views/dependencies.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/views/explain.post.mjs +2 -0
- package/.output/server/chunks/routes/api/views/explain.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/views/indexes.post.mjs +2 -0
- package/.output/server/chunks/routes/api/views/indexes.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/views/meta.post.mjs +2 -0
- package/.output/server/chunks/routes/api/views/meta.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/views/overview.post.mjs +2 -0
- package/.output/server/chunks/routes/api/views/overview.post.mjs.map +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/node_modules/aws-ssl-profiles/lib/index.js +13 -0
- package/.output/server/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.js +2888 -0
- package/.output/server/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.js +111 -0
- package/.output/server/node_modules/aws-ssl-profiles/package.json +52 -0
- package/.output/server/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/.output/server/node_modules/better-sqlite3/lib/database.js +90 -0
- package/.output/server/node_modules/better-sqlite3/lib/index.js +3 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/function.js +31 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/table.js +189 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
- package/.output/server/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
- package/.output/server/node_modules/better-sqlite3/lib/util.js +12 -0
- package/.output/server/node_modules/better-sqlite3/package.json +59 -0
- package/.output/server/node_modules/cpu-features/build/Release/cpufeatures.node +0 -0
- package/.output/server/node_modules/cpu-features/lib/index.js +5 -0
- package/.output/server/node_modules/cpu-features/package.json +40 -0
- package/.output/server/node_modules/denque/index.js +481 -0
- package/.output/server/node_modules/denque/package.json +58 -0
- package/.output/server/node_modules/generate-function/index.js +181 -0
- package/.output/server/node_modules/generate-function/package.json +32 -0
- package/.output/server/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
- package/.output/server/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
- package/.output/server/node_modules/iconv-lite/encodings/index.js +23 -0
- package/.output/server/node_modules/iconv-lite/encodings/internal.js +218 -0
- package/.output/server/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
- package/.output/server/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/.output/server/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
- package/.output/server/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/.output/server/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/.output/server/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/.output/server/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/.output/server/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/.output/server/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/.output/server/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/.output/server/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/.output/server/node_modules/iconv-lite/encodings/utf16.js +187 -0
- package/.output/server/node_modules/iconv-lite/encodings/utf32.js +307 -0
- package/.output/server/node_modules/iconv-lite/encodings/utf7.js +283 -0
- package/.output/server/node_modules/iconv-lite/lib/bom-handling.js +48 -0
- package/.output/server/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
- package/.output/server/node_modules/iconv-lite/lib/index.js +182 -0
- package/.output/server/node_modules/iconv-lite/lib/streams.js +105 -0
- package/.output/server/node_modules/iconv-lite/package.json +70 -0
- package/.output/server/node_modules/is-property/is-property.js +5 -0
- package/.output/server/node_modules/is-property/package.json +36 -0
- package/.output/server/node_modules/long/package.json +58 -0
- package/.output/server/node_modules/long/umd/index.js +1622 -0
- package/.output/server/node_modules/long/umd/package.json +3 -0
- package/.output/server/node_modules/lru.min/lib/index.js +248 -0
- package/.output/server/node_modules/lru.min/package.json +87 -0
- package/.output/server/node_modules/mysql2/index.js +77 -0
- package/.output/server/node_modules/mysql2/lib/auth_41.js +95 -0
- package/.output/server/node_modules/mysql2/lib/auth_plugins/caching_sha2_password.js +115 -0
- package/.output/server/node_modules/mysql2/lib/auth_plugins/index.js +8 -0
- package/.output/server/node_modules/mysql2/lib/auth_plugins/mysql_clear_password.js +17 -0
- package/.output/server/node_modules/mysql2/lib/auth_plugins/mysql_native_password.js +34 -0
- package/.output/server/node_modules/mysql2/lib/auth_plugins/sha256_password.js +74 -0
- package/.output/server/node_modules/mysql2/lib/base/connection.js +1139 -0
- package/.output/server/node_modules/mysql2/lib/base/pool.js +343 -0
- package/.output/server/node_modules/mysql2/lib/commands/auth_switch.js +151 -0
- package/.output/server/node_modules/mysql2/lib/commands/binlog_dump.js +109 -0
- package/.output/server/node_modules/mysql2/lib/commands/change_user.js +68 -0
- package/.output/server/node_modules/mysql2/lib/commands/client_handshake.js +386 -0
- package/.output/server/node_modules/mysql2/lib/commands/close_statement.js +18 -0
- package/.output/server/node_modules/mysql2/lib/commands/command.js +54 -0
- package/.output/server/node_modules/mysql2/lib/commands/execute.js +116 -0
- package/.output/server/node_modules/mysql2/lib/commands/index.js +29 -0
- package/.output/server/node_modules/mysql2/lib/commands/ping.js +36 -0
- package/.output/server/node_modules/mysql2/lib/commands/prepare.js +143 -0
- package/.output/server/node_modules/mysql2/lib/commands/query.js +365 -0
- package/.output/server/node_modules/mysql2/lib/commands/quit.js +29 -0
- package/.output/server/node_modules/mysql2/lib/commands/register_slave.js +27 -0
- package/.output/server/node_modules/mysql2/lib/commands/reset_connection.js +29 -0
- package/.output/server/node_modules/mysql2/lib/commands/server_handshake.js +205 -0
- package/.output/server/node_modules/mysql2/lib/compressed_protocol.js +153 -0
- package/.output/server/node_modules/mysql2/lib/connection.js +12 -0
- package/.output/server/node_modules/mysql2/lib/connection_config.js +299 -0
- package/.output/server/node_modules/mysql2/lib/constants/charset_encodings.js +317 -0
- package/.output/server/node_modules/mysql2/lib/constants/charsets.js +317 -0
- package/.output/server/node_modules/mysql2/lib/constants/client.js +39 -0
- package/.output/server/node_modules/mysql2/lib/constants/commands.js +37 -0
- package/.output/server/node_modules/mysql2/lib/constants/cursor.js +9 -0
- package/.output/server/node_modules/mysql2/lib/constants/encoding_charset.js +50 -0
- package/.output/server/node_modules/mysql2/lib/constants/errors.js +3973 -0
- package/.output/server/node_modules/mysql2/lib/constants/field_flags.js +20 -0
- package/.output/server/node_modules/mysql2/lib/constants/server_status.js +44 -0
- package/.output/server/node_modules/mysql2/lib/constants/session_track.js +11 -0
- package/.output/server/node_modules/mysql2/lib/constants/ssl_profiles.js +11 -0
- package/.output/server/node_modules/mysql2/lib/constants/types.js +64 -0
- package/.output/server/node_modules/mysql2/lib/create_connection.js +10 -0
- package/.output/server/node_modules/mysql2/lib/create_pool.js +10 -0
- package/.output/server/node_modules/mysql2/lib/create_pool_cluster.js +9 -0
- package/.output/server/node_modules/mysql2/lib/helpers.js +83 -0
- package/.output/server/node_modules/mysql2/lib/packet_parser.js +195 -0
- package/.output/server/node_modules/mysql2/lib/packets/auth_next_factor.js +35 -0
- package/.output/server/node_modules/mysql2/lib/packets/auth_switch_request.js +38 -0
- package/.output/server/node_modules/mysql2/lib/packets/auth_switch_request_more_data.js +33 -0
- package/.output/server/node_modules/mysql2/lib/packets/auth_switch_response.js +30 -0
- package/.output/server/node_modules/mysql2/lib/packets/binary_row.js +95 -0
- package/.output/server/node_modules/mysql2/lib/packets/binlog_dump.js +33 -0
- package/.output/server/node_modules/mysql2/lib/packets/binlog_query_statusvars.js +115 -0
- package/.output/server/node_modules/mysql2/lib/packets/change_user.js +97 -0
- package/.output/server/node_modules/mysql2/lib/packets/close_statement.js +21 -0
- package/.output/server/node_modules/mysql2/lib/packets/column_definition.js +291 -0
- package/.output/server/node_modules/mysql2/lib/packets/encode_parameter.js +69 -0
- package/.output/server/node_modules/mysql2/lib/packets/execute.js +177 -0
- package/.output/server/node_modules/mysql2/lib/packets/handshake.js +112 -0
- package/.output/server/node_modules/mysql2/lib/packets/handshake_response.js +173 -0
- package/.output/server/node_modules/mysql2/lib/packets/index.js +154 -0
- package/.output/server/node_modules/mysql2/lib/packets/packet.js +978 -0
- package/.output/server/node_modules/mysql2/lib/packets/prepare_statement.js +27 -0
- package/.output/server/node_modules/mysql2/lib/packets/prepared_statement_header.js +16 -0
- package/.output/server/node_modules/mysql2/lib/packets/query.js +102 -0
- package/.output/server/node_modules/mysql2/lib/packets/register_slave.js +46 -0
- package/.output/server/node_modules/mysql2/lib/packets/reset_connection.js +17 -0
- package/.output/server/node_modules/mysql2/lib/packets/resultset_header.js +124 -0
- package/.output/server/node_modules/mysql2/lib/packets/ssl_request.js +25 -0
- package/.output/server/node_modules/mysql2/lib/packets/text_row.js +47 -0
- package/.output/server/node_modules/mysql2/lib/parsers/binary_parser.js +235 -0
- package/.output/server/node_modules/mysql2/lib/parsers/parser_cache.js +68 -0
- package/.output/server/node_modules/mysql2/lib/parsers/static_binary_parser.js +213 -0
- package/.output/server/node_modules/mysql2/lib/parsers/static_text_parser.js +152 -0
- package/.output/server/node_modules/mysql2/lib/parsers/string.js +50 -0
- package/.output/server/node_modules/mysql2/lib/parsers/text_parser.js +214 -0
- package/.output/server/node_modules/mysql2/lib/pool.js +12 -0
- package/.output/server/node_modules/mysql2/lib/pool_cluster.js +375 -0
- package/.output/server/node_modules/mysql2/lib/pool_config.js +34 -0
- package/.output/server/node_modules/mysql2/lib/pool_connection.js +81 -0
- package/.output/server/node_modules/mysql2/lib/promise/capture_local_err.js +25 -0
- package/.output/server/node_modules/mysql2/lib/promise/connection.js +237 -0
- package/.output/server/node_modules/mysql2/lib/promise/inherit_events.js +27 -0
- package/.output/server/node_modules/mysql2/lib/promise/make_done_cb.js +16 -0
- package/.output/server/node_modules/mysql2/lib/promise/pool.js +118 -0
- package/.output/server/node_modules/mysql2/lib/promise/pool_cluster.js +59 -0
- package/.output/server/node_modules/mysql2/lib/promise/pool_connection.js +19 -0
- package/.output/server/node_modules/mysql2/lib/promise/prepared_statement_info.js +35 -0
- package/.output/server/node_modules/mysql2/lib/server.js +37 -0
- package/.output/server/node_modules/mysql2/lib/tracing.js +81 -0
- package/.output/server/node_modules/mysql2/package.json +95 -0
- package/.output/server/node_modules/mysql2/promise.js +209 -0
- package/.output/server/node_modules/named-placeholders/index.js +179 -0
- package/.output/server/node_modules/named-placeholders/package.json +36 -0
- package/.output/server/node_modules/oracledb/index.js +27 -0
- package/.output/server/node_modules/oracledb/lib/aqDeqOptions.js +186 -0
- package/.output/server/node_modules/oracledb/lib/aqEnqOptions.js +81 -0
- package/.output/server/node_modules/oracledb/lib/aqMessage.js +149 -0
- package/.output/server/node_modules/oracledb/lib/aqQueue.js +293 -0
- package/.output/server/node_modules/oracledb/lib/connection.js +1842 -0
- package/.output/server/node_modules/oracledb/lib/constants.js +210 -0
- package/.output/server/node_modules/oracledb/lib/dbObject.js +606 -0
- package/.output/server/node_modules/oracledb/lib/errors.js +1046 -0
- package/.output/server/node_modules/oracledb/lib/future.js +53 -0
- package/.output/server/node_modules/oracledb/lib/impl/aqDeqOptions.js +206 -0
- package/.output/server/node_modules/oracledb/lib/impl/aqEnqOptions.js +89 -0
- package/.output/server/node_modules/oracledb/lib/impl/aqMessage.js +134 -0
- package/.output/server/node_modules/oracledb/lib/impl/aqQueue.js +82 -0
- package/.output/server/node_modules/oracledb/lib/impl/base.js +45 -0
- package/.output/server/node_modules/oracledb/lib/impl/connection.js +671 -0
- package/.output/server/node_modules/oracledb/lib/impl/datahandlers/buffer.js +1214 -0
- package/.output/server/node_modules/oracledb/lib/impl/datahandlers/constants.js +110 -0
- package/.output/server/node_modules/oracledb/lib/impl/datahandlers/oson.js +852 -0
- package/.output/server/node_modules/oracledb/lib/impl/datahandlers/vector.js +197 -0
- package/.output/server/node_modules/oracledb/lib/impl/dbObject.js +159 -0
- package/.output/server/node_modules/oracledb/lib/impl/index.js +59 -0
- package/.output/server/node_modules/oracledb/lib/impl/lob.js +113 -0
- package/.output/server/node_modules/oracledb/lib/impl/pool.js +230 -0
- package/.output/server/node_modules/oracledb/lib/impl/resultset.js +307 -0
- package/.output/server/node_modules/oracledb/lib/impl/sodaCollection.js +175 -0
- package/.output/server/node_modules/oracledb/lib/impl/sodaDatabase.js +82 -0
- package/.output/server/node_modules/oracledb/lib/impl/sodaDocCursor.js +64 -0
- package/.output/server/node_modules/oracledb/lib/impl/sodaDocument.js +89 -0
- package/.output/server/node_modules/oracledb/lib/impl/sodaOperation.js +110 -0
- package/.output/server/node_modules/oracledb/lib/lob.js +315 -0
- package/.output/server/node_modules/oracledb/lib/oracledb.js +1716 -0
- package/.output/server/node_modules/oracledb/lib/pool.js +873 -0
- package/.output/server/node_modules/oracledb/lib/poolStatistics.js +143 -0
- package/.output/server/node_modules/oracledb/lib/queryStream.js +119 -0
- package/.output/server/node_modules/oracledb/lib/resultset.js +368 -0
- package/.output/server/node_modules/oracledb/lib/settings.js +221 -0
- package/.output/server/node_modules/oracledb/lib/sodaCollection.js +284 -0
- package/.output/server/node_modules/oracledb/lib/sodaDatabase.js +176 -0
- package/.output/server/node_modules/oracledb/lib/sodaDocCursor.js +82 -0
- package/.output/server/node_modules/oracledb/lib/sodaDocument.js +125 -0
- package/.output/server/node_modules/oracledb/lib/sodaOperation.js +236 -0
- package/.output/server/node_modules/oracledb/lib/thin/aq.js +475 -0
- package/.output/server/node_modules/oracledb/lib/thin/connection.js +1504 -0
- package/.output/server/node_modules/oracledb/lib/thin/dbObject.js +737 -0
- package/.output/server/node_modules/oracledb/lib/thin/index.js +40 -0
- package/.output/server/node_modules/oracledb/lib/thin/lob.js +380 -0
- package/.output/server/node_modules/oracledb/lib/thin/pool.js +738 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/capabilities.js +145 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/constants.js +872 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/encryptDecrypt.js +197 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqArray.js +238 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqBase.js +305 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqDeq.js +164 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqEnq.js +135 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/auth.js +376 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/base.js +568 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/commit.js +56 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/dataType.js +401 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/execute.js +358 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/fastAuth.js +83 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/fetch.js +64 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/index.js +59 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/lobOp.js +195 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/logOff.js +52 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/ping.js +56 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/protocol.js +97 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/rollback.js +56 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/sessionRelease.js +60 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/transactionChangeState.js +99 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/transactionSwitch.js +147 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/withData.js +920 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/packet.js +631 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/protocol.js +240 -0
- package/.output/server/node_modules/oracledb/lib/thin/protocol/utils.js +82 -0
- package/.output/server/node_modules/oracledb/lib/thin/resultSet.js +122 -0
- package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ANO.js +438 -0
- package/.output/server/node_modules/oracledb/lib/thin/sqlnet/connStrategy.js +316 -0
- package/.output/server/node_modules/oracledb/lib/thin/sqlnet/constants.js +210 -0
- package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ezConnectResolver.js +466 -0
- package/.output/server/node_modules/oracledb/lib/thin/sqlnet/navNodes.js +904 -0
- package/.output/server/node_modules/oracledb/lib/thin/sqlnet/networkSession.js +733 -0
- package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js +609 -0
- package/.output/server/node_modules/oracledb/lib/thin/sqlnet/nvStrToNvPair.js +780 -0
- package/.output/server/node_modules/oracledb/lib/thin/sqlnet/packet.js +439 -0
- package/.output/server/node_modules/oracledb/lib/thin/sqlnet/paramParser.js +239 -0
- package/.output/server/node_modules/oracledb/lib/thin/sqlnet/sessionAtts.js +198 -0
- package/.output/server/node_modules/oracledb/lib/thin/statement.js +573 -0
- package/.output/server/node_modules/oracledb/lib/thin/statementCache.js +195 -0
- package/.output/server/node_modules/oracledb/lib/thin/util.js +254 -0
- package/.output/server/node_modules/oracledb/lib/traceHandler.js +133 -0
- package/.output/server/node_modules/oracledb/lib/transformer.js +279 -0
- package/.output/server/node_modules/oracledb/lib/types.js +592 -0
- package/.output/server/node_modules/oracledb/lib/util.js +648 -0
- package/.output/server/node_modules/oracledb/lib/version.js +36 -0
- package/.output/server/node_modules/oracledb/package.json +48 -0
- package/.output/server/node_modules/sql-escaper/lib/index.js +398 -0
- package/.output/server/node_modules/sql-escaper/package.json +81 -0
- package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node +0 -0
- package/.output/server/node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
- package/.output/server/package.json +14 -18
- package/package.json +2 -2
- package/.output/public/_nuxt/019vQzZn.js +0 -1
- package/.output/public/_nuxt/0lRW_xjL.js +0 -1
- package/.output/public/_nuxt/B6EI6PpE.js +0 -1
- package/.output/public/_nuxt/B9Mt45db.js +0 -1
- package/.output/public/_nuxt/BKltSiU0.js +0 -1
- package/.output/public/_nuxt/BM4vnZvX.js +0 -732
- package/.output/public/_nuxt/BNYR501z.js +0 -1
- package/.output/public/_nuxt/BVLVn__t.js +0 -9
- package/.output/public/_nuxt/BY1l0S_M.js +0 -1
- package/.output/public/_nuxt/BaseCodeEditor.SAr2eD8R.css +0 -1
- package/.output/public/_nuxt/BcvJQkv0.js +0 -1
- package/.output/public/_nuxt/BdN9B2_l.js +0 -160
- package/.output/public/_nuxt/BflvengI.js +0 -1
- package/.output/public/_nuxt/BgolbRTO.js +0 -1
- package/.output/public/_nuxt/BwISH3M4.js +0 -1
- package/.output/public/_nuxt/C-M4q4KX.js +0 -1
- package/.output/public/_nuxt/C2Ziircr.js +0 -1
- package/.output/public/_nuxt/C3NWXcpd.js +0 -39
- package/.output/public/_nuxt/C5p44jKD.js +0 -1
- package/.output/public/_nuxt/C617vhDd.js +0 -1
- package/.output/public/_nuxt/C8S0o4Gy.js +0 -1
- package/.output/public/_nuxt/CNlsVoWh.js +0 -1
- package/.output/public/_nuxt/CWkPMmwS.js +0 -2
- package/.output/public/_nuxt/Cgy4ijjN.js +0 -67
- package/.output/public/_nuxt/ClBBUcFW.js +0 -1
- package/.output/public/_nuxt/CuRyxljq.js +0 -1
- package/.output/public/_nuxt/Cx4Bnfq1.js +0 -2
- package/.output/public/_nuxt/D-H6_V16.js +0 -1
- package/.output/public/_nuxt/D-SDqguC.js +0 -1
- package/.output/public/_nuxt/D-XwprNU.js +0 -6
- package/.output/public/_nuxt/D3G5Xy_-.js +0 -1
- package/.output/public/_nuxt/D9o5Pdvp.js +0 -1
- package/.output/public/_nuxt/DFArp87o.js +0 -1
- package/.output/public/_nuxt/DFZIXzfU.js +0 -1
- package/.output/public/_nuxt/DHRNt0p9.js +0 -1
- package/.output/public/_nuxt/DLKku6fV.js +0 -1
- package/.output/public/_nuxt/DWgjNKGq.js +0 -152
- package/.output/public/_nuxt/DYm57BZk.js +0 -2
- package/.output/public/_nuxt/DaQw8gVp.js +0 -1
- package/.output/public/_nuxt/DgnsV5Qb.js +0 -1
- package/.output/public/_nuxt/Do5Fyo7J.js +0 -1
- package/.output/public/_nuxt/Dqirx7MF.js +0 -1
- package/.output/public/_nuxt/GoTwJjoS.js +0 -39
- package/.output/public/_nuxt/Hs25HoUO.js +0 -22
- package/.output/public/_nuxt/J2CvNR3L.js +0 -1
- package/.output/public/_nuxt/LK6Q8l0D.js +0 -1
- package/.output/public/_nuxt/Oh9SO2qg.js +0 -1
- package/.output/public/_nuxt/P_8UoGnr.js +0 -72
- package/.output/public/_nuxt/V5yaR3hv.js +0 -2
- package/.output/public/_nuxt/XWTuAj6n.js +0 -1
- package/.output/public/_nuxt/XqwbcqcW.js +0 -1
- package/.output/public/_nuxt/Yzrsuije.js +0 -1
- package/.output/public/_nuxt/_8UrUcVF.js +0 -1
- package/.output/public/_nuxt/builds/meta/27a307c3-bfc5-4ccd-94b8-387eb94981bb.json +0 -1
- package/.output/public/_nuxt/cKBf5-av.js +0 -1
- package/.output/public/_nuxt/entry.DeK5kcSi.css +0 -1
- package/.output/public/_nuxt/kc-op4gz.js +0 -12
- package/.output/public/_nuxt/kehy-5uo.js +0 -1
- package/.output/public/_nuxt/lSaGvORn.js +0 -10
- package/.output/public/_nuxt/lY3EyFEK.js +0 -1
- package/.output/public/_nuxt/tMhdAKU2.js +0 -3
- package/.output/public/_nuxt/uyCIL8xw.js +0 -1
- package/.output/server/node_modules/cross-spawn/index.js +0 -39
- package/.output/server/node_modules/cross-spawn/lib/enoent.js +0 -59
- package/.output/server/node_modules/cross-spawn/lib/parse.js +0 -91
- package/.output/server/node_modules/cross-spawn/lib/util/escape.js +0 -47
- package/.output/server/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
- package/.output/server/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
- package/.output/server/node_modules/cross-spawn/package.json +0 -73
- package/.output/server/node_modules/execa/index.js +0 -268
- package/.output/server/node_modules/execa/lib/command.js +0 -52
- package/.output/server/node_modules/execa/lib/error.js +0 -88
- package/.output/server/node_modules/execa/lib/kill.js +0 -115
- package/.output/server/node_modules/execa/lib/promise.js +0 -46
- package/.output/server/node_modules/execa/lib/stdio.js +0 -52
- package/.output/server/node_modules/execa/lib/stream.js +0 -97
- package/.output/server/node_modules/execa/package.json +0 -74
- package/.output/server/node_modules/get-stream/buffer-stream.js +0 -52
- package/.output/server/node_modules/get-stream/index.js +0 -61
- package/.output/server/node_modules/get-stream/package.json +0 -47
- package/.output/server/node_modules/human-signals/build/src/core.js +0 -273
- package/.output/server/node_modules/human-signals/build/src/main.js +0 -71
- package/.output/server/node_modules/human-signals/build/src/realtime.js +0 -19
- package/.output/server/node_modules/human-signals/build/src/signals.js +0 -35
- package/.output/server/node_modules/human-signals/package.json +0 -64
- package/.output/server/node_modules/is-stream/index.js +0 -28
- package/.output/server/node_modules/is-stream/package.json +0 -42
- package/.output/server/node_modules/isexe/index.js +0 -57
- package/.output/server/node_modules/isexe/mode.js +0 -41
- package/.output/server/node_modules/isexe/package.json +0 -31
- package/.output/server/node_modules/isexe/windows.js +0 -42
- package/.output/server/node_modules/merge-stream/index.js +0 -41
- package/.output/server/node_modules/merge-stream/package.json +0 -19
- package/.output/server/node_modules/mimic-fn/index.js +0 -13
- package/.output/server/node_modules/mimic-fn/package.json +0 -42
- package/.output/server/node_modules/npm-run-path/index.js +0 -47
- package/.output/server/node_modules/npm-run-path/package.json +0 -44
- package/.output/server/node_modules/onetime/index.js +0 -44
- package/.output/server/node_modules/onetime/package.json +0 -43
- package/.output/server/node_modules/path-key/index.js +0 -16
- package/.output/server/node_modules/path-key/package.json +0 -39
- package/.output/server/node_modules/pg-dump-restore/lib/common.js +0 -33
- package/.output/server/node_modules/pg-dump-restore/lib/index.js +0 -9
- package/.output/server/node_modules/pg-dump-restore/lib/pg-dump.js +0 -95
- package/.output/server/node_modules/pg-dump-restore/lib/pg-restore.js +0 -87
- package/.output/server/node_modules/pg-dump-restore/package.json +0 -66
- package/.output/server/node_modules/shebang-command/index.js +0 -19
- package/.output/server/node_modules/shebang-command/package.json +0 -34
- package/.output/server/node_modules/shebang-regex/index.js +0 -2
- package/.output/server/node_modules/shebang-regex/package.json +0 -35
- package/.output/server/node_modules/signal-exit/index.js +0 -202
- package/.output/server/node_modules/signal-exit/package.json +0 -38
- package/.output/server/node_modules/signal-exit/signals.js +0 -53
- package/.output/server/node_modules/strip-final-newline/index.js +0 -16
- package/.output/server/node_modules/strip-final-newline/package.json +0 -40
- package/.output/server/node_modules/which/package.json +0 -43
- package/.output/server/node_modules/which/which.js +0 -125
|
@@ -0,0 +1,852 @@
|
|
|
1
|
+
// Copyright (c) 2023, 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 { BaseBuffer, GrowableBuffer } = require('./buffer.js');
|
|
30
|
+
const { Buffer } = require('buffer');
|
|
31
|
+
const constants = require("./constants.js");
|
|
32
|
+
const errors = require("../../errors.js");
|
|
33
|
+
const types = require("../../types.js");
|
|
34
|
+
const util = require("util");
|
|
35
|
+
const vector = require("./vector.js");
|
|
36
|
+
const nodbUtil = require("../../util.js");
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Class used for decoding
|
|
40
|
+
*/
|
|
41
|
+
class OsonDecoder extends BaseBuffer {
|
|
42
|
+
|
|
43
|
+
//---------------------------------------------------------------------------
|
|
44
|
+
// _decodeContainerNode()
|
|
45
|
+
//
|
|
46
|
+
// Decodes a container node (object or array) from the tree segment and
|
|
47
|
+
// returns the JavaScript equivalent.
|
|
48
|
+
//---------------------------------------------------------------------------
|
|
49
|
+
_decodeContainerNode(nodeType) {
|
|
50
|
+
|
|
51
|
+
// determine the number of children by examining the 4th and 5th most
|
|
52
|
+
// significant bits of the node type; determine the offsets in the tree
|
|
53
|
+
// segment to the field ids array and the value offsets array
|
|
54
|
+
let container, offsetsPos, fieldIdsPos;
|
|
55
|
+
const containerOffset = this.pos - this.treeSegPos - 1;
|
|
56
|
+
let numChildren = this._getNumChildren(nodeType);
|
|
57
|
+
const isObject = ((nodeType & 0x40) === 0);
|
|
58
|
+
if (numChildren === undefined) {
|
|
59
|
+
const offset = this._getOffset(nodeType);
|
|
60
|
+
offsetsPos = this.pos;
|
|
61
|
+
this.pos = this.treeSegPos + offset;
|
|
62
|
+
const sharedNodeType = this.readUInt8();
|
|
63
|
+
numChildren = this._getNumChildren(sharedNodeType);
|
|
64
|
+
container = (isObject) ? {} : new Array(numChildren);
|
|
65
|
+
fieldIdsPos = this.pos;
|
|
66
|
+
} else if (isObject) {
|
|
67
|
+
container = {};
|
|
68
|
+
fieldIdsPos = this.pos;
|
|
69
|
+
offsetsPos = this.pos + this.fieldIdLength * numChildren;
|
|
70
|
+
} else {
|
|
71
|
+
container = new Array(numChildren);
|
|
72
|
+
offsetsPos = this.pos;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
for (let i = 0; i < numChildren; i++) {
|
|
76
|
+
let name;
|
|
77
|
+
if (isObject) {
|
|
78
|
+
let fieldId;
|
|
79
|
+
if (this.fieldIdLength === 1) {
|
|
80
|
+
fieldId = this.buf[fieldIdsPos];
|
|
81
|
+
} else if (this.fieldIdLength == 2) {
|
|
82
|
+
fieldId = this.buf.readUInt16BE(fieldIdsPos);
|
|
83
|
+
} else {
|
|
84
|
+
fieldId = this.buf.readUInt32BE(fieldIdsPos);
|
|
85
|
+
}
|
|
86
|
+
name = this.fieldNames[fieldId - 1];
|
|
87
|
+
fieldIdsPos += this.fieldIdLength;
|
|
88
|
+
}
|
|
89
|
+
this.pos = offsetsPos;
|
|
90
|
+
let offset = this._getOffset(nodeType);
|
|
91
|
+
if (this.relativeOffsets) {
|
|
92
|
+
offset += containerOffset;
|
|
93
|
+
}
|
|
94
|
+
offsetsPos = this.pos;
|
|
95
|
+
this.pos = this.treeSegPos + offset;
|
|
96
|
+
if (isObject) {
|
|
97
|
+
container[name] = this._decodeNode();
|
|
98
|
+
} else {
|
|
99
|
+
container[i] = this._decodeNode();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return container;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
//---------------------------------------------------------------------------
|
|
107
|
+
// _decodeNode()
|
|
108
|
+
//
|
|
109
|
+
// Decodes a node from the tree segment and returns the JavaScript
|
|
110
|
+
// equivalent.
|
|
111
|
+
//---------------------------------------------------------------------------
|
|
112
|
+
_decodeNode() {
|
|
113
|
+
|
|
114
|
+
// if the most significant bit is set the node refers to a container
|
|
115
|
+
let nodeType = this.readUInt8();
|
|
116
|
+
if (nodeType & 0x80) {
|
|
117
|
+
return this._decodeContainerNode(nodeType);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// handle simple scalars
|
|
121
|
+
if (nodeType === constants.TNS_JSON_TYPE_NULL) {
|
|
122
|
+
return null;
|
|
123
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_TRUE) {
|
|
124
|
+
return true;
|
|
125
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_FALSE) {
|
|
126
|
+
return false;
|
|
127
|
+
|
|
128
|
+
// handle fixed length scalars
|
|
129
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_DATE ||
|
|
130
|
+
nodeType === constants.TNS_JSON_TYPE_TIMESTAMP7) {
|
|
131
|
+
return this.parseOracleDate(this.readBytes(7));
|
|
132
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_TIMESTAMP) {
|
|
133
|
+
return this.parseOracleDate(this.readBytes(11));
|
|
134
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_TIMESTAMP_TZ) {
|
|
135
|
+
return this.parseOracleDate(this.readBytes(13));
|
|
136
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_BINARY_FLOAT) {
|
|
137
|
+
return this.parseBinaryFloat(this.readBytes(4));
|
|
138
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_BINARY_DOUBLE) {
|
|
139
|
+
return this.parseBinaryDouble(this.readBytes(8));
|
|
140
|
+
|
|
141
|
+
// handle interval datatypes
|
|
142
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_INTERVAL_YM) {
|
|
143
|
+
return this.parseOracleIntervalYM(this.readBytes(5));
|
|
144
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_INTERVAL_DS) {
|
|
145
|
+
return this.parseOracleIntervalDS(this.readBytes(11));
|
|
146
|
+
|
|
147
|
+
// handle scalars with lengths stored outside the node itself
|
|
148
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_STRING_LENGTH_UINT8) {
|
|
149
|
+
return this.readBytes(this.readUInt8()).toString();
|
|
150
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_STRING_LENGTH_UINT16) {
|
|
151
|
+
return this.readBytes(this.readUInt16BE()).toString();
|
|
152
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_STRING_LENGTH_UINT32) {
|
|
153
|
+
return this.readBytes(this.readUInt32BE()).toString();
|
|
154
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8) {
|
|
155
|
+
return parseFloat(this.readOracleNumber());
|
|
156
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_ID) {
|
|
157
|
+
const buf = this.readBytes(this.readUInt8());
|
|
158
|
+
const jsonId = new types.JsonId(buf.length);
|
|
159
|
+
buf.copy(jsonId);
|
|
160
|
+
return jsonId;
|
|
161
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_BINARY_LENGTH_UINT16) {
|
|
162
|
+
return Buffer.from(this.readBytes(this.readUInt16BE()));
|
|
163
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_BINARY_LENGTH_UINT32) {
|
|
164
|
+
return Buffer.from(this.readBytes(this.readUInt32BE()));
|
|
165
|
+
} else if (nodeType === constants.TNS_JSON_TYPE_EXTENDED) {
|
|
166
|
+
nodeType = this.readUInt8();
|
|
167
|
+
if (nodeType === constants.TNS_JSON_TYPE_VECTOR) {
|
|
168
|
+
const vecImage = this.readBytes(this.readUInt32BE());
|
|
169
|
+
const decoder = new vector.VectorDecoder(vecImage);
|
|
170
|
+
return decoder.decode();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// handle number/decimal with length stored inside the node itself
|
|
175
|
+
const typeBits = nodeType & 0xf0;
|
|
176
|
+
if (typeBits === 0x20 || typeBits === 0x60) {
|
|
177
|
+
const len = nodeType & 0x0f;
|
|
178
|
+
return parseFloat(this.parseOracleNumber(this.readBytes(len + 1)));
|
|
179
|
+
|
|
180
|
+
// handle integer with length stored inside the node itself
|
|
181
|
+
} else if (typeBits === 0x40 || typeBits === 0x50) {
|
|
182
|
+
const len = nodeType & 0x0f;
|
|
183
|
+
return parseFloat(this.parseOracleNumber(this.readBytes(len)));
|
|
184
|
+
|
|
185
|
+
// handle string with length stored inside the node itself
|
|
186
|
+
} else if ((nodeType & 0xe0) == 0) {
|
|
187
|
+
if (nodeType === 0)
|
|
188
|
+
return '';
|
|
189
|
+
return this.readBytes(nodeType).toString();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
errors.throwErr(errors.ERR_UNSUPPORTED_DATA_TYPE_IN_JSON, nodeType);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
//---------------------------------------------------------------------------
|
|
196
|
+
// _getNumChildren()
|
|
197
|
+
//
|
|
198
|
+
// Returns the number of children a container has. This is determined by
|
|
199
|
+
// looking at the 4th and 5th most significant bits of the node type.
|
|
200
|
+
//
|
|
201
|
+
// 00 - number of children is uint8_t
|
|
202
|
+
// 01 - number of children is uint16_t
|
|
203
|
+
// 10 - number of children is uint32_t
|
|
204
|
+
// 11 - field ids are shared with another object whose offset follows
|
|
205
|
+
//
|
|
206
|
+
// In the latter case the value undefined is returned and the number of
|
|
207
|
+
// children must be read from the shared object at the specified offset.
|
|
208
|
+
//---------------------------------------------------------------------------
|
|
209
|
+
_getNumChildren(nodeType) {
|
|
210
|
+
const childrenBits = (nodeType & 0x18);
|
|
211
|
+
if (childrenBits === 0) {
|
|
212
|
+
return this.readUInt8();
|
|
213
|
+
} else if (childrenBits === 0x08) {
|
|
214
|
+
return this.readUInt16BE();
|
|
215
|
+
} else if (childrenBits === 0x10) {
|
|
216
|
+
return this.readUInt32BE();
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
//---------------------------------------------------------------------------
|
|
221
|
+
// _getOffset()
|
|
222
|
+
//
|
|
223
|
+
// Returns an offset. The offset will be either a 16-bit or 32-bit value
|
|
224
|
+
// depending on the value of the 3rd significant bit of the node type.
|
|
225
|
+
//---------------------------------------------------------------------------
|
|
226
|
+
_getOffset(nodeType) {
|
|
227
|
+
if (nodeType & 0x20) {
|
|
228
|
+
return this.readUInt32BE();
|
|
229
|
+
} else {
|
|
230
|
+
return this.readUInt16BE();
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
//---------------------------------------------------------------------------
|
|
235
|
+
// _getFieldNames
|
|
236
|
+
//
|
|
237
|
+
// Reads the field names from the buffer.
|
|
238
|
+
//---------------------------------------------------------------------------
|
|
239
|
+
_getFieldNames(arrStartPos, numFields, offsetsSize, fieldNamesSegSize, fieldNamesSize) {
|
|
240
|
+
|
|
241
|
+
// skip the hash id array (1 byte * fieldNamesSize for each field)
|
|
242
|
+
this.skipBytes(numFields * fieldNamesSize);
|
|
243
|
+
|
|
244
|
+
// skip the field name offsets array for now
|
|
245
|
+
const offsetsPos = this.pos;
|
|
246
|
+
this.skipBytes(numFields * offsetsSize);
|
|
247
|
+
const ptr = this.readBytes(fieldNamesSegSize);
|
|
248
|
+
const finalPos = this.pos;
|
|
249
|
+
|
|
250
|
+
// determine the names of the fields
|
|
251
|
+
this.pos = offsetsPos;
|
|
252
|
+
let offset;
|
|
253
|
+
for (let i = arrStartPos; i < arrStartPos + numFields; i++) {
|
|
254
|
+
if (offsetsSize === 2) {
|
|
255
|
+
offset = this.readUInt16BE();
|
|
256
|
+
} else {
|
|
257
|
+
offset = this.readUInt32BE();
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// get the field name object
|
|
261
|
+
let temp;
|
|
262
|
+
if (fieldNamesSize === 1) {
|
|
263
|
+
// Short Field Name
|
|
264
|
+
temp = ptr.readUInt8(offset);
|
|
265
|
+
} else {
|
|
266
|
+
// Long Field Name
|
|
267
|
+
temp = ptr.readUInt16BE(offset);
|
|
268
|
+
}
|
|
269
|
+
this.fieldNames[i] = ptr.subarray(offset + fieldNamesSize, offset + temp + fieldNamesSize).toString();
|
|
270
|
+
}
|
|
271
|
+
this.pos = finalPos;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
//---------------------------------------------------------------------------
|
|
275
|
+
// decode()
|
|
276
|
+
//
|
|
277
|
+
// Decodes the OSON and returns a JavaScript object corresponding to its
|
|
278
|
+
// contents.
|
|
279
|
+
//---------------------------------------------------------------------------
|
|
280
|
+
decode() {
|
|
281
|
+
|
|
282
|
+
// parse root header
|
|
283
|
+
const magic = this.readBytes(3);
|
|
284
|
+
if (magic[0] !== constants.TNS_JSON_MAGIC_BYTE_1 ||
|
|
285
|
+
magic[1] !== constants.TNS_JSON_MAGIC_BYTE_2 ||
|
|
286
|
+
magic[2] !== constants.TNS_JSON_MAGIC_BYTE_3) {
|
|
287
|
+
errors.throwErr(errors.ERR_UNEXPECTED_DATA, magic.toString('hex'));
|
|
288
|
+
}
|
|
289
|
+
const version = this.readUInt8();
|
|
290
|
+
if (version !== constants.TNS_JSON_VERSION_MAX_FNAME_255 &&
|
|
291
|
+
version !== constants.TNS_JSON_VERSION_MAX_FNAME_65535) {
|
|
292
|
+
errors.throwErr(errors.ERR_OSON_VERSION_NOT_SUPPORTED, version);
|
|
293
|
+
}
|
|
294
|
+
const primaryFlags = this.readUInt16BE();
|
|
295
|
+
this.relativeOffsets = primaryFlags & constants.TNS_JSON_FLAG_REL_OFFSET_MODE;
|
|
296
|
+
|
|
297
|
+
// scalar values are much simpler
|
|
298
|
+
if (primaryFlags & constants.TNS_JSON_FLAG_IS_SCALAR) {
|
|
299
|
+
if (primaryFlags & constants.TNS_JSON_FLAG_TREE_SEG_UINT32) {
|
|
300
|
+
this.skipBytes(4);
|
|
301
|
+
} else {
|
|
302
|
+
this.skipBytes(2);
|
|
303
|
+
}
|
|
304
|
+
return this._decodeNode();
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// determine the number of short field names
|
|
308
|
+
let numShortFieldNames;
|
|
309
|
+
if (primaryFlags & constants.TNS_JSON_FLAG_NUM_FNAMES_UINT32) {
|
|
310
|
+
numShortFieldNames = this.readUInt32BE();
|
|
311
|
+
this.fieldIdLength = 4;
|
|
312
|
+
} else if (primaryFlags & constants.TNS_JSON_FLAG_NUM_FNAMES_UINT16) {
|
|
313
|
+
numShortFieldNames = this.readUInt16BE();
|
|
314
|
+
this.fieldIdLength = 2;
|
|
315
|
+
} else {
|
|
316
|
+
numShortFieldNames = this.readUInt8();
|
|
317
|
+
this.fieldIdLength = 1;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// determine the size of the short field names segment
|
|
321
|
+
let shortFieldNameOffsetsSize, shortFieldNamesSegSize;
|
|
322
|
+
if (primaryFlags & constants.TNS_JSON_FLAG_FNAMES_SEG_UINT32) {
|
|
323
|
+
shortFieldNameOffsetsSize = 4;
|
|
324
|
+
shortFieldNamesSegSize = this.readUInt32BE();
|
|
325
|
+
} else {
|
|
326
|
+
shortFieldNameOffsetsSize = 2;
|
|
327
|
+
shortFieldNamesSegSize = this.readUInt16BE();
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// if the version indicates that field names > 255 bytes exist, parse
|
|
331
|
+
// the information about that segment
|
|
332
|
+
let longFieldNameOffsetsSize, longFieldNamesSegSize;
|
|
333
|
+
let numLongFieldNames = 0;
|
|
334
|
+
if (version === constants.TNS_JSON_VERSION_MAX_FNAME_65535) {
|
|
335
|
+
const secondaryFlags = this.readUInt16BE();
|
|
336
|
+
if (secondaryFlags & constants.TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16) {
|
|
337
|
+
longFieldNameOffsetsSize = 2;
|
|
338
|
+
} else {
|
|
339
|
+
longFieldNameOffsetsSize = 4;
|
|
340
|
+
}
|
|
341
|
+
numLongFieldNames = this.readUInt32BE();
|
|
342
|
+
longFieldNamesSegSize = this.readUInt32BE();
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// skip the size of the tree segment
|
|
346
|
+
if (primaryFlags & constants.TNS_JSON_FLAG_TREE_SEG_UINT32) {
|
|
347
|
+
this.skipBytes(4);
|
|
348
|
+
} else {
|
|
349
|
+
this.skipBytes(2);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// skip the number of "tiny" nodes
|
|
353
|
+
this.skipBytes(2);
|
|
354
|
+
|
|
355
|
+
this.fieldNames = new Array(numShortFieldNames + numLongFieldNames);
|
|
356
|
+
|
|
357
|
+
// if there are any short names, read them now
|
|
358
|
+
if (numShortFieldNames > 0) {
|
|
359
|
+
this._getFieldNames(0, numShortFieldNames,
|
|
360
|
+
shortFieldNameOffsetsSize, shortFieldNamesSegSize, 1);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// if there are any long names, read them now
|
|
364
|
+
if (numLongFieldNames > 0) {
|
|
365
|
+
this._getFieldNames(numShortFieldNames, numLongFieldNames,
|
|
366
|
+
longFieldNameOffsetsSize, longFieldNamesSegSize, 2);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// determine tree segment position in the buffer
|
|
370
|
+
this.treeSegPos = this.pos;
|
|
371
|
+
|
|
372
|
+
// decode the root node
|
|
373
|
+
return this._decodeNode();
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
class OsonFieldName {
|
|
379
|
+
|
|
380
|
+
constructor(name, maxFieldNameSize) {
|
|
381
|
+
this.name = name;
|
|
382
|
+
this.nameBytes = Buffer.from(name);
|
|
383
|
+
if (this.nameBytes.length > maxFieldNameSize) {
|
|
384
|
+
errors.throwErr(errors.ERR_OSON_FIELD_NAME_LIMITATION, maxFieldNameSize);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// BigInt constants for calculating Hash ID for the OSON Field Name
|
|
388
|
+
const INITIAL_HASHID = 0x811C9DC5n;
|
|
389
|
+
const HASH_MULTIPLIER = 16777619n;
|
|
390
|
+
const HASH_MASK = 0xffffffffn;
|
|
391
|
+
|
|
392
|
+
this.hashId = INITIAL_HASHID;
|
|
393
|
+
for (let i = 0; i < this.nameBytes.length; i++) {
|
|
394
|
+
const c = BigInt(this.nameBytes[i]);
|
|
395
|
+
this.hashId = ((this.hashId ^ c) * HASH_MULTIPLIER) & HASH_MASK;
|
|
396
|
+
}
|
|
397
|
+
this.hashId = Number(this.hashId) & 0xff;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
class OsonFieldNamesSegment extends GrowableBuffer {
|
|
403
|
+
|
|
404
|
+
constructor() {
|
|
405
|
+
super();
|
|
406
|
+
this.fieldNames = [];
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
//---------------------------------------------------------------------------
|
|
410
|
+
// addName()
|
|
411
|
+
//
|
|
412
|
+
// Adds a name to the field names segment.
|
|
413
|
+
//---------------------------------------------------------------------------
|
|
414
|
+
addName(fieldName) {
|
|
415
|
+
fieldName.offset = this.pos;
|
|
416
|
+
if (fieldName.nameBytes.length <= 255) {
|
|
417
|
+
this.writeUInt8(fieldName.nameBytes.length);
|
|
418
|
+
} else {
|
|
419
|
+
this.writeUInt16BE(fieldName.nameBytes.length);
|
|
420
|
+
}
|
|
421
|
+
this.writeBytes(fieldName.nameBytes);
|
|
422
|
+
this.fieldNames.push(fieldName);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
//---------------------------------------------------------------------------
|
|
426
|
+
// _processFieldNames()
|
|
427
|
+
//
|
|
428
|
+
// Processes the field names in preparation for encoding within OSON.
|
|
429
|
+
//---------------------------------------------------------------------------
|
|
430
|
+
_processFieldNames(fieldIdOffset) {
|
|
431
|
+
this.fieldNames.sort((a, b) => {
|
|
432
|
+
if (a.hashId < b.hashId)
|
|
433
|
+
return -1;
|
|
434
|
+
if (a.hashId > b.hashId)
|
|
435
|
+
return 1;
|
|
436
|
+
if (a.nameBytes.length < b.nameBytes.length)
|
|
437
|
+
return -1;
|
|
438
|
+
if (a.nameBytes.length > b.nameBytes.length)
|
|
439
|
+
return 1;
|
|
440
|
+
if (a.name < b.name)
|
|
441
|
+
return -1;
|
|
442
|
+
if (a.name > b.name)
|
|
443
|
+
return 1;
|
|
444
|
+
return 0;
|
|
445
|
+
});
|
|
446
|
+
for (let i = 0; i < this.fieldNames.length; i++) {
|
|
447
|
+
this.fieldNames[i].fieldId = fieldIdOffset + i + 1;
|
|
448
|
+
}
|
|
449
|
+
if (this.fieldNames.length < 256) {
|
|
450
|
+
this.fieldIdSize = 1;
|
|
451
|
+
} else if (this.fieldNames.length < 65536) {
|
|
452
|
+
this.fieldIdSize = 2;
|
|
453
|
+
} else {
|
|
454
|
+
this.fieldIdSize = 4;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
class OsonTreeSegment extends GrowableBuffer {
|
|
461
|
+
|
|
462
|
+
//---------------------------------------------------------------------------
|
|
463
|
+
// _encodeArray()
|
|
464
|
+
//
|
|
465
|
+
// Encodes an array in the OSON tree segment.
|
|
466
|
+
//---------------------------------------------------------------------------
|
|
467
|
+
_encodeArray(value, encoder) {
|
|
468
|
+
this._encodeContainer(constants.TNS_JSON_TYPE_ARRAY, value.length);
|
|
469
|
+
const len = value.length * 4;
|
|
470
|
+
const pos = this.reserveBytes(len);
|
|
471
|
+
let offsetsBufPos = pos;
|
|
472
|
+
for (const element of value) {
|
|
473
|
+
this.buf.writeUInt32BE(this.pos, offsetsBufPos);
|
|
474
|
+
offsetsBufPos += 4;
|
|
475
|
+
this.encodeNode(element, encoder);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
//---------------------------------------------------------------------------
|
|
480
|
+
// _encodeContainer()
|
|
481
|
+
//
|
|
482
|
+
// Encodes the first part of a container (array or object) in the OSON tree
|
|
483
|
+
// segment.
|
|
484
|
+
//---------------------------------------------------------------------------
|
|
485
|
+
_encodeContainer(nodeType, numChildren) {
|
|
486
|
+
nodeType |= 0x20; // use uint32_t for offsets
|
|
487
|
+
if (numChildren > 65535) {
|
|
488
|
+
nodeType |= 0x10; // num children is uint32_t
|
|
489
|
+
} else if (numChildren > 255) {
|
|
490
|
+
nodeType |= 0x08; // num children is uint16_t
|
|
491
|
+
}
|
|
492
|
+
this.writeUInt8(nodeType);
|
|
493
|
+
if (numChildren < 256) {
|
|
494
|
+
this.writeUInt8(numChildren);
|
|
495
|
+
} else if (numChildren < 65536) {
|
|
496
|
+
this.writeUInt16BE(numChildren);
|
|
497
|
+
} else {
|
|
498
|
+
this.writeUInt32BE(numChildren);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
//---------------------------------------------------------------------------
|
|
503
|
+
// _encodeObject()
|
|
504
|
+
//
|
|
505
|
+
// Encodes an object in the OSON tree segment.
|
|
506
|
+
//---------------------------------------------------------------------------
|
|
507
|
+
_encodeObject(value, encoder) {
|
|
508
|
+
const numChildren = value.values.length;
|
|
509
|
+
this._encodeContainer(constants.TNS_JSON_TYPE_OBJECT, numChildren);
|
|
510
|
+
let fieldIdOffset = this.pos;
|
|
511
|
+
let valueOffset = this.pos + (numChildren * encoder.fieldIdSize);
|
|
512
|
+
const finalOffset = valueOffset + numChildren * 4;
|
|
513
|
+
this.reserveBytes(finalOffset - this.pos);
|
|
514
|
+
|
|
515
|
+
for (let i = 0; i < value.fields.length; i++) {
|
|
516
|
+
const fieldName = encoder.fieldNamesMap.get(value.fields[i]);
|
|
517
|
+
if (encoder.fieldIdSize == 1) {
|
|
518
|
+
this.buf[fieldIdOffset] = fieldName.fieldId;
|
|
519
|
+
} else if (encoder.fieldIdSize == 2) {
|
|
520
|
+
this.buf.writeUInt16BE(fieldName.fieldId, fieldIdOffset);
|
|
521
|
+
} else {
|
|
522
|
+
this.buf.writeUInt32BE(fieldName.fieldId, fieldIdOffset);
|
|
523
|
+
}
|
|
524
|
+
this.buf.writeUInt32BE(this.pos, valueOffset);
|
|
525
|
+
fieldIdOffset += encoder.fieldIdSize;
|
|
526
|
+
valueOffset += 4;
|
|
527
|
+
this.encodeNode(value.values[i], encoder);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
//---------------------------------------------------------------------------
|
|
532
|
+
// encodeNode()
|
|
533
|
+
//
|
|
534
|
+
// Encodes a value (node) in the OSON tree segment.
|
|
535
|
+
//---------------------------------------------------------------------------
|
|
536
|
+
encodeNode(value, encoder) {
|
|
537
|
+
|
|
538
|
+
// handle null
|
|
539
|
+
if (value === undefined || value === null) {
|
|
540
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_NULL);
|
|
541
|
+
|
|
542
|
+
// handle booleans
|
|
543
|
+
} else if (typeof value === 'boolean') {
|
|
544
|
+
if (value) {
|
|
545
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_TRUE);
|
|
546
|
+
} else {
|
|
547
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_FALSE);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// handle numbers
|
|
551
|
+
} else if (typeof value === 'number') {
|
|
552
|
+
if (Number.isNaN(value)) {
|
|
553
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_BINARY_DOUBLE);
|
|
554
|
+
this.writeBinaryDouble(value);
|
|
555
|
+
} else {
|
|
556
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8);
|
|
557
|
+
this.writeOracleNumber(value.toString());
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
// handle strings
|
|
561
|
+
} else if (typeof value === 'string') {
|
|
562
|
+
const buf = Buffer.from(value);
|
|
563
|
+
if (buf.length < 256) {
|
|
564
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_STRING_LENGTH_UINT8);
|
|
565
|
+
this.writeUInt8(buf.length);
|
|
566
|
+
} else if (buf.length < 65536) {
|
|
567
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_STRING_LENGTH_UINT16);
|
|
568
|
+
this.writeUInt16BE(buf.length);
|
|
569
|
+
} else {
|
|
570
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_STRING_LENGTH_UINT32);
|
|
571
|
+
this.writeUInt32BE(buf.length);
|
|
572
|
+
}
|
|
573
|
+
if (buf.length > 0) {
|
|
574
|
+
this.writeBytes(buf);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
// handle dates
|
|
578
|
+
} else if (util.types.isDate(value)) {
|
|
579
|
+
if (value.getUTCMilliseconds() === 0) {
|
|
580
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_TIMESTAMP7);
|
|
581
|
+
this.writeOracleDate(value, types.DB_TYPE_DATE, false);
|
|
582
|
+
} else {
|
|
583
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_TIMESTAMP);
|
|
584
|
+
this.writeOracleDate(value, types.DB_TYPE_TIMESTAMP, false);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// handle interval data types
|
|
588
|
+
} else if (value instanceof types.IntervalYM) {
|
|
589
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_INTERVAL_YM);
|
|
590
|
+
this.writeOracleIntervalYM(value, false);
|
|
591
|
+
} else if (value instanceof types.IntervalDS) {
|
|
592
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_INTERVAL_DS);
|
|
593
|
+
this.writeOracleIntervalDS(value, false);
|
|
594
|
+
|
|
595
|
+
// handle buffers
|
|
596
|
+
} else if (Buffer.isBuffer(value)) {
|
|
597
|
+
if (value.length < 65536) {
|
|
598
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_BINARY_LENGTH_UINT16);
|
|
599
|
+
this.writeUInt16BE(value.length);
|
|
600
|
+
} else {
|
|
601
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_BINARY_LENGTH_UINT32);
|
|
602
|
+
this.writeUInt32BE(value.length);
|
|
603
|
+
}
|
|
604
|
+
this.writeBytes(value);
|
|
605
|
+
|
|
606
|
+
// handle arrays
|
|
607
|
+
} else if (Array.isArray(value)) {
|
|
608
|
+
this._encodeArray(value, encoder);
|
|
609
|
+
|
|
610
|
+
// handle vectors
|
|
611
|
+
} else if (nodbUtil.isVectorValue(value)) {
|
|
612
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_EXTENDED);
|
|
613
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_VECTOR);
|
|
614
|
+
const encoder = new vector.VectorEncoder();
|
|
615
|
+
const buf = encoder.encode(value);
|
|
616
|
+
this.writeUInt32BE(buf.length);
|
|
617
|
+
this.writeBytes(buf);
|
|
618
|
+
|
|
619
|
+
} else if (value instanceof types.JsonId) {
|
|
620
|
+
this.writeUInt8(constants.TNS_JSON_TYPE_ID);
|
|
621
|
+
this.writeUInt8(value.length);
|
|
622
|
+
this.writeBytes(Buffer.from(value.buffer));
|
|
623
|
+
|
|
624
|
+
// handle objects
|
|
625
|
+
} else {
|
|
626
|
+
this._encodeObject(value, encoder);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* Class used for encoding
|
|
635
|
+
*/
|
|
636
|
+
|
|
637
|
+
class OsonEncoder extends GrowableBuffer {
|
|
638
|
+
|
|
639
|
+
//---------------------------------------------------------------------------
|
|
640
|
+
// _addFieldName()
|
|
641
|
+
//
|
|
642
|
+
// Add a field with the given name.
|
|
643
|
+
//---------------------------------------------------------------------------
|
|
644
|
+
_addFieldName(name) {
|
|
645
|
+
const fieldName = new OsonFieldName(name, this.maxFieldNameSize);
|
|
646
|
+
this.fieldNamesMap.set(name, fieldName);
|
|
647
|
+
if (fieldName.nameBytes.length <= 255) {
|
|
648
|
+
this.shortFieldNamesSeg.addName(fieldName);
|
|
649
|
+
} else {
|
|
650
|
+
if (!this.longFieldNamesSeg) {
|
|
651
|
+
this.longFieldNamesSeg = new OsonFieldNamesSegment();
|
|
652
|
+
}
|
|
653
|
+
this.longFieldNamesSeg.addName(fieldName);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
//---------------------------------------------------------------------------
|
|
658
|
+
// _examineNode()
|
|
659
|
+
//
|
|
660
|
+
// Examines the value. If it contains fields, unique names are retained. The
|
|
661
|
+
// values are then examined to see if they also contain fields. Arrays are
|
|
662
|
+
// examined to determine they contain elements that contain fields.
|
|
663
|
+
//---------------------------------------------------------------------------
|
|
664
|
+
_examineNode(value) {
|
|
665
|
+
if (Array.isArray(value)) {
|
|
666
|
+
for (const element of value) {
|
|
667
|
+
this._examineNode(element);
|
|
668
|
+
}
|
|
669
|
+
} else if (value && Array.isArray(value.fields)) {
|
|
670
|
+
for (let i = 0; i < value.fields.length; i++) {
|
|
671
|
+
const name = value.fields[i];
|
|
672
|
+
const element = value.values[i];
|
|
673
|
+
if (!this.fieldNamesMap.has(name)) {
|
|
674
|
+
this._addFieldName(name);
|
|
675
|
+
}
|
|
676
|
+
this._examineNode(element);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
//---------------------------------------------------------------------------
|
|
682
|
+
// _writeExtendedHeader()
|
|
683
|
+
//
|
|
684
|
+
// Write the extended header containing information about the short and long
|
|
685
|
+
// field name segments.
|
|
686
|
+
//---------------------------------------------------------------------------
|
|
687
|
+
_writeExtendedHeader() {
|
|
688
|
+
// write number of short field names
|
|
689
|
+
if (this.fieldIdSize === 1) {
|
|
690
|
+
this.writeUInt8(this.shortFieldNamesSeg.fieldNames.length);
|
|
691
|
+
} else if (this.fieldIdSize === 2) {
|
|
692
|
+
this.writeUInt16BE(this.shortFieldNamesSeg.fieldNames.length);
|
|
693
|
+
} else {
|
|
694
|
+
this.writeUInt32BE(this.shortFieldNamesSeg.fieldNames.length);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
// write size of short field names segment
|
|
698
|
+
if (this.shortFieldNamesSeg.pos < 65536) {
|
|
699
|
+
this.writeUInt16BE(this.shortFieldNamesSeg.pos);
|
|
700
|
+
} else {
|
|
701
|
+
this.writeUInt32BE(this.shortFieldNamesSeg.pos);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
// write fields for long field names segment, if applicable
|
|
705
|
+
if (this.longFieldNamesSeg) {
|
|
706
|
+
let secondaryFlags = 0;
|
|
707
|
+
if (this.longFieldNamesSeg.pos < 65536) {
|
|
708
|
+
secondaryFlags = constants.TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16;
|
|
709
|
+
}
|
|
710
|
+
this.writeUInt16BE(secondaryFlags);
|
|
711
|
+
this.writeUInt32BE(this.longFieldNamesSeg.fieldNames.length);
|
|
712
|
+
this.writeUInt32BE(this.longFieldNamesSeg.pos);
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
//---------------------------------------------------------------------------
|
|
717
|
+
// _writeFieldNamesSeg()
|
|
718
|
+
//
|
|
719
|
+
// Write the contents of the field names segment to the buffer.
|
|
720
|
+
//---------------------------------------------------------------------------
|
|
721
|
+
_writeFieldNamesSeg(fieldNamesSeg) {
|
|
722
|
+
// write array of hash ids
|
|
723
|
+
for (const fieldName of fieldNamesSeg.fieldNames) {
|
|
724
|
+
if (fieldName.nameBytes.length <= 255) {
|
|
725
|
+
this.writeUInt8(fieldName.hashId);
|
|
726
|
+
} else {
|
|
727
|
+
this.writeUInt16BE(fieldName.hashId);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
// write array of field name offsets for the short field names
|
|
732
|
+
for (const fieldName of fieldNamesSeg.fieldNames) {
|
|
733
|
+
if (fieldNamesSeg.pos < 65536) {
|
|
734
|
+
this.writeUInt16BE(fieldName.offset);
|
|
735
|
+
} else {
|
|
736
|
+
this.writeUInt32BE(fieldName.offset);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
// write field names
|
|
741
|
+
if (fieldNamesSeg.pos > 0) {
|
|
742
|
+
this.writeBytes(fieldNamesSeg.buf.subarray(0, fieldNamesSeg.pos));
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
//---------------------------------------------------------------------------
|
|
748
|
+
// encode()
|
|
749
|
+
//
|
|
750
|
+
// Encodes the value as OSON and returns a buffer containing the OSON bytes.
|
|
751
|
+
//---------------------------------------------------------------------------
|
|
752
|
+
encode(value, maxFieldNameSize) {
|
|
753
|
+
|
|
754
|
+
this.maxFieldNameSize = maxFieldNameSize;
|
|
755
|
+
|
|
756
|
+
// determine the flags to use
|
|
757
|
+
let flags = constants.TNS_JSON_FLAG_INLINE_LEAF;
|
|
758
|
+
if (Array.isArray(value) || (value && Array.isArray(value.fields))) {
|
|
759
|
+
// examine all values recursively to determine the unique set of field
|
|
760
|
+
// names and whether they need to be added to the long field names
|
|
761
|
+
// segment (> 255 bytes) or short field names segment (<= 255 bytes)
|
|
762
|
+
this.fieldNamesMap = new Map();
|
|
763
|
+
this.shortFieldNamesSeg = new OsonFieldNamesSegment();
|
|
764
|
+
this._examineNode(value);
|
|
765
|
+
|
|
766
|
+
// perform processing of field names segments and determine the total
|
|
767
|
+
// number of unique field names in the value
|
|
768
|
+
let totalNumFieldNames = 0;
|
|
769
|
+
if (this.shortFieldNamesSeg) {
|
|
770
|
+
this.shortFieldNamesSeg._processFieldNames(0);
|
|
771
|
+
totalNumFieldNames += this.shortFieldNamesSeg.fieldNames.length;
|
|
772
|
+
}
|
|
773
|
+
if (this.longFieldNamesSeg) {
|
|
774
|
+
this.longFieldNamesSeg._processFieldNames(totalNumFieldNames);
|
|
775
|
+
totalNumFieldNames += this.longFieldNamesSeg.fieldNames.length;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
// determine remaining flags and field id size
|
|
779
|
+
flags |= constants.TNS_JSON_FLAG_HASH_ID_UINT8 |
|
|
780
|
+
constants.TNS_JSON_FLAG_TINY_NODES_STAT;
|
|
781
|
+
if (totalNumFieldNames > 65535) {
|
|
782
|
+
flags |= constants.TNS_JSON_FLAG_NUM_FNAMES_UINT32;
|
|
783
|
+
this.fieldIdSize = 4;
|
|
784
|
+
} else if (totalNumFieldNames > 255) {
|
|
785
|
+
flags |= constants.TNS_JSON_FLAG_NUM_FNAMES_UINT16;
|
|
786
|
+
this.fieldIdSize = 2;
|
|
787
|
+
} else {
|
|
788
|
+
this.fieldIdSize = 1;
|
|
789
|
+
}
|
|
790
|
+
if (this.shortFieldNamesSeg.pos > 65535) {
|
|
791
|
+
flags |= constants.TNS_JSON_FLAG_FNAMES_SEG_UINT32;
|
|
792
|
+
}
|
|
793
|
+
} else {
|
|
794
|
+
// if the value is a simple scalar
|
|
795
|
+
flags |= constants.TNS_JSON_FLAG_IS_SCALAR;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
// encode values into the OSON tree segment
|
|
799
|
+
const treeSeg = new OsonTreeSegment();
|
|
800
|
+
treeSeg.encodeNode(value, this);
|
|
801
|
+
if (treeSeg.pos > 65535) {
|
|
802
|
+
flags |= constants.TNS_JSON_FLAG_TREE_SEG_UINT32;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
// write initial header
|
|
806
|
+
this.writeUInt8(constants.TNS_JSON_MAGIC_BYTE_1);
|
|
807
|
+
this.writeUInt8(constants.TNS_JSON_MAGIC_BYTE_2);
|
|
808
|
+
this.writeUInt8(constants.TNS_JSON_MAGIC_BYTE_3);
|
|
809
|
+
if (this.longFieldNamesSeg) {
|
|
810
|
+
this.writeUInt8(constants.TNS_JSON_VERSION_MAX_FNAME_65535);
|
|
811
|
+
} else {
|
|
812
|
+
this.writeUInt8(constants.TNS_JSON_VERSION_MAX_FNAME_255);
|
|
813
|
+
}
|
|
814
|
+
this.writeUInt16BE(flags);
|
|
815
|
+
|
|
816
|
+
// write extended header (when value is not scalar)
|
|
817
|
+
if (this.shortFieldNamesSeg) {
|
|
818
|
+
this._writeExtendedHeader();
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
// write size of tree segment
|
|
822
|
+
if (treeSeg.pos < 65536) {
|
|
823
|
+
this.writeUInt16BE(treeSeg.pos);
|
|
824
|
+
} else {
|
|
825
|
+
this.writeUInt32BE(treeSeg.pos);
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
// write remainder of header and any data (when value is not scalar)
|
|
829
|
+
if (this.shortFieldNamesSeg) {
|
|
830
|
+
|
|
831
|
+
// write number of "tiny" nodes (always zero)
|
|
832
|
+
this.writeUInt16BE(0);
|
|
833
|
+
|
|
834
|
+
// write the field names segments
|
|
835
|
+
this._writeFieldNamesSeg(this.shortFieldNamesSeg);
|
|
836
|
+
if (this.longFieldNamesSeg) {
|
|
837
|
+
this._writeFieldNamesSeg(this.longFieldNamesSeg);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
// write tree segment data
|
|
842
|
+
this.writeBytes(treeSeg.buf.subarray(0, treeSeg.pos));
|
|
843
|
+
|
|
844
|
+
return this.buf.subarray(0, this.pos);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
module.exports = {
|
|
850
|
+
OsonDecoder,
|
|
851
|
+
OsonEncoder
|
|
852
|
+
};
|