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
|
@@ -1,5 +1,650 @@
|
|
|
1
1
|
import { D as DatabaseClientType } from './db-connection.mjs';
|
|
2
|
+
import { r as resolveMetadataTypeAlias } from './type-alias.constants.mjs';
|
|
2
3
|
import { B as BaseDomainAdapter, c as createDomainAdapter } from './create-adapter.mjs';
|
|
4
|
+
import { V as ViewSchemaEnum, F as FunctionSchemaEnum } from './schemaMeta.type.mjs';
|
|
5
|
+
|
|
6
|
+
var __defProp$3 = Object.defineProperty;
|
|
7
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField$3 = (obj, key, value) => __defNormalProp$3(obj, key + "" , value);
|
|
9
|
+
const EXCLUDED_SCHEMAS = [
|
|
10
|
+
"information_schema",
|
|
11
|
+
"mysql",
|
|
12
|
+
"performance_schema",
|
|
13
|
+
"sys"
|
|
14
|
+
];
|
|
15
|
+
const EXCLUDED_SCHEMA_PLACEHOLDERS = EXCLUDED_SCHEMAS.map(() => "?").join(", ");
|
|
16
|
+
class MysqlMetadataAdapter extends BaseDomainAdapter {
|
|
17
|
+
constructor(adapter, dbType) {
|
|
18
|
+
super(adapter);
|
|
19
|
+
__publicField$3(this, "dbType");
|
|
20
|
+
this.dbType = dbType;
|
|
21
|
+
}
|
|
22
|
+
static async create(params, dbType = DatabaseClientType.MYSQL) {
|
|
23
|
+
const adapter = await MysqlMetadataAdapter.resolveAdapter(params, dbType);
|
|
24
|
+
return new MysqlMetadataAdapter(adapter, dbType);
|
|
25
|
+
}
|
|
26
|
+
async loadMetadataRows() {
|
|
27
|
+
const [schemas, tables, columns, primaryKeys, foreignKeys, routines] = await Promise.all([
|
|
28
|
+
this.adapter.rawQuery(
|
|
29
|
+
`
|
|
30
|
+
SELECT schema_name
|
|
31
|
+
FROM information_schema.schemata
|
|
32
|
+
WHERE schema_name NOT IN (${EXCLUDED_SCHEMA_PLACEHOLDERS})
|
|
33
|
+
ORDER BY schema_name
|
|
34
|
+
`,
|
|
35
|
+
EXCLUDED_SCHEMAS
|
|
36
|
+
),
|
|
37
|
+
this.adapter.rawQuery(
|
|
38
|
+
`
|
|
39
|
+
SELECT table_schema, table_name, table_type, table_rows, table_comment
|
|
40
|
+
FROM information_schema.tables
|
|
41
|
+
WHERE table_schema NOT IN (${EXCLUDED_SCHEMA_PLACEHOLDERS})
|
|
42
|
+
ORDER BY table_schema, table_name
|
|
43
|
+
`,
|
|
44
|
+
EXCLUDED_SCHEMAS
|
|
45
|
+
),
|
|
46
|
+
this.adapter.rawQuery(
|
|
47
|
+
`
|
|
48
|
+
SELECT
|
|
49
|
+
table_schema,
|
|
50
|
+
table_name,
|
|
51
|
+
column_name,
|
|
52
|
+
ordinal_position,
|
|
53
|
+
column_type,
|
|
54
|
+
data_type,
|
|
55
|
+
is_nullable,
|
|
56
|
+
column_default
|
|
57
|
+
FROM information_schema.columns
|
|
58
|
+
WHERE table_schema NOT IN (${EXCLUDED_SCHEMA_PLACEHOLDERS})
|
|
59
|
+
ORDER BY table_schema, table_name, ordinal_position
|
|
60
|
+
`,
|
|
61
|
+
EXCLUDED_SCHEMAS
|
|
62
|
+
),
|
|
63
|
+
this.adapter.rawQuery(
|
|
64
|
+
`
|
|
65
|
+
SELECT table_schema, table_name, column_name
|
|
66
|
+
FROM information_schema.key_column_usage
|
|
67
|
+
WHERE constraint_name = 'PRIMARY'
|
|
68
|
+
AND table_schema NOT IN (${EXCLUDED_SCHEMA_PLACEHOLDERS})
|
|
69
|
+
ORDER BY table_schema, table_name, ordinal_position
|
|
70
|
+
`,
|
|
71
|
+
EXCLUDED_SCHEMAS
|
|
72
|
+
),
|
|
73
|
+
this.adapter.rawQuery(
|
|
74
|
+
`
|
|
75
|
+
SELECT
|
|
76
|
+
table_schema,
|
|
77
|
+
table_name,
|
|
78
|
+
column_name,
|
|
79
|
+
referenced_table_schema,
|
|
80
|
+
referenced_table_name,
|
|
81
|
+
referenced_column_name
|
|
82
|
+
FROM information_schema.key_column_usage
|
|
83
|
+
WHERE referenced_table_name IS NOT NULL
|
|
84
|
+
AND table_schema NOT IN (${EXCLUDED_SCHEMA_PLACEHOLDERS})
|
|
85
|
+
ORDER BY table_schema, table_name, ordinal_position
|
|
86
|
+
`,
|
|
87
|
+
EXCLUDED_SCHEMAS
|
|
88
|
+
),
|
|
89
|
+
this.adapter.rawQuery(
|
|
90
|
+
`
|
|
91
|
+
SELECT routine_schema, routine_name, routine_type
|
|
92
|
+
FROM information_schema.routines
|
|
93
|
+
WHERE routine_schema NOT IN (${EXCLUDED_SCHEMA_PLACEHOLDERS})
|
|
94
|
+
ORDER BY routine_schema, routine_name
|
|
95
|
+
`,
|
|
96
|
+
EXCLUDED_SCHEMAS
|
|
97
|
+
)
|
|
98
|
+
]);
|
|
99
|
+
return {
|
|
100
|
+
schemas,
|
|
101
|
+
tables,
|
|
102
|
+
columns,
|
|
103
|
+
primaryKeys,
|
|
104
|
+
foreignKeys,
|
|
105
|
+
routines
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
async getSchemaMetaData() {
|
|
109
|
+
const { schemas, tables, columns, primaryKeys, foreignKeys, routines } = await this.loadMetadataRows();
|
|
110
|
+
return schemas.map(({ schema_name }) => {
|
|
111
|
+
const schemaTables = tables.filter(
|
|
112
|
+
(table) => table.table_schema === schema_name
|
|
113
|
+
);
|
|
114
|
+
const baseTables = schemaTables.filter(
|
|
115
|
+
(table) => table.table_type === "BASE TABLE"
|
|
116
|
+
);
|
|
117
|
+
const schemaViews = schemaTables.filter(
|
|
118
|
+
(table) => table.table_type === "VIEW"
|
|
119
|
+
);
|
|
120
|
+
const table_details = Object.fromEntries(
|
|
121
|
+
baseTables.map((table) => {
|
|
122
|
+
const tableColumns = columns.filter(
|
|
123
|
+
(column) => column.table_schema === schema_name && column.table_name === table.table_name
|
|
124
|
+
).map((column) => ({
|
|
125
|
+
raw_type_name: column.column_type,
|
|
126
|
+
name: column.column_name,
|
|
127
|
+
ordinal_position: column.ordinal_position,
|
|
128
|
+
type: column.column_type,
|
|
129
|
+
short_type_name: resolveMetadataTypeAlias(
|
|
130
|
+
this.dbType,
|
|
131
|
+
column.column_type
|
|
132
|
+
),
|
|
133
|
+
is_nullable: column.is_nullable === "YES",
|
|
134
|
+
default_value: column.column_default
|
|
135
|
+
}));
|
|
136
|
+
const tablePrimaryKeys = primaryKeys.filter(
|
|
137
|
+
(primaryKey) => primaryKey.table_schema === schema_name && primaryKey.table_name === table.table_name
|
|
138
|
+
).map((primaryKey) => ({ column: primaryKey.column_name }));
|
|
139
|
+
const tableForeignKeys = foreignKeys.filter(
|
|
140
|
+
(foreignKey) => foreignKey.table_schema === schema_name && foreignKey.table_name === table.table_name
|
|
141
|
+
).map((foreignKey) => ({
|
|
142
|
+
column: foreignKey.column_name,
|
|
143
|
+
referenced_column: foreignKey.referenced_column_name,
|
|
144
|
+
referenced_table: foreignKey.referenced_table_name,
|
|
145
|
+
referenced_table_schema: foreignKey.referenced_table_schema
|
|
146
|
+
}));
|
|
147
|
+
return [
|
|
148
|
+
table.table_name,
|
|
149
|
+
{
|
|
150
|
+
columns: tableColumns,
|
|
151
|
+
foreign_keys: tableForeignKeys,
|
|
152
|
+
primary_keys: tablePrimaryKeys,
|
|
153
|
+
table_id: `${schema_name}.${table.table_name}`
|
|
154
|
+
}
|
|
155
|
+
];
|
|
156
|
+
})
|
|
157
|
+
);
|
|
158
|
+
const view_details = Object.fromEntries(
|
|
159
|
+
schemaViews.map((view) => {
|
|
160
|
+
const viewColumns = columns.filter(
|
|
161
|
+
(column) => column.table_schema === schema_name && column.table_name === view.table_name
|
|
162
|
+
).map((column) => ({
|
|
163
|
+
raw_type_name: column.column_type,
|
|
164
|
+
name: column.column_name,
|
|
165
|
+
ordinal_position: column.ordinal_position,
|
|
166
|
+
type: column.column_type,
|
|
167
|
+
short_type_name: resolveMetadataTypeAlias(
|
|
168
|
+
this.dbType,
|
|
169
|
+
column.column_type
|
|
170
|
+
),
|
|
171
|
+
is_nullable: column.is_nullable === "YES",
|
|
172
|
+
default_value: column.column_default
|
|
173
|
+
}));
|
|
174
|
+
return [
|
|
175
|
+
view.table_name,
|
|
176
|
+
{
|
|
177
|
+
columns: viewColumns,
|
|
178
|
+
view_id: `${schema_name}.${view.table_name}`,
|
|
179
|
+
type: ViewSchemaEnum.View
|
|
180
|
+
}
|
|
181
|
+
];
|
|
182
|
+
})
|
|
183
|
+
);
|
|
184
|
+
const functions = routines.filter((routine) => routine.routine_schema === schema_name).map((routine) => ({
|
|
185
|
+
oId: `${schema_name}.${routine.routine_name}`,
|
|
186
|
+
name: routine.routine_name,
|
|
187
|
+
type: routine.routine_type === "PROCEDURE" ? FunctionSchemaEnum.Procedure : FunctionSchemaEnum.Function,
|
|
188
|
+
parameters: ""
|
|
189
|
+
}));
|
|
190
|
+
const views = schemaViews.map((view) => ({
|
|
191
|
+
name: view.table_name,
|
|
192
|
+
type: ViewSchemaEnum.View,
|
|
193
|
+
oid: `${schema_name}.${view.table_name}`
|
|
194
|
+
}));
|
|
195
|
+
return {
|
|
196
|
+
name: schema_name,
|
|
197
|
+
tables: baseTables.map((table) => table.table_name),
|
|
198
|
+
views,
|
|
199
|
+
functions,
|
|
200
|
+
table_details,
|
|
201
|
+
view_details
|
|
202
|
+
};
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
async getErdData() {
|
|
206
|
+
const [databaseInfo] = await this.adapter.rawQuery(
|
|
207
|
+
"SELECT DATABASE() AS database_name, VERSION() AS version"
|
|
208
|
+
);
|
|
209
|
+
const schemaMeta = await this.getSchemaMetaData();
|
|
210
|
+
const tables = schemaMeta.flatMap(
|
|
211
|
+
(schema) => (schema.tables || []).map((tableName) => {
|
|
212
|
+
var _a;
|
|
213
|
+
const detail = (_a = schema.table_details) == null ? void 0 : _a[tableName];
|
|
214
|
+
return {
|
|
215
|
+
id: (detail == null ? void 0 : detail.table_id) || `${schema.name}.${tableName}`,
|
|
216
|
+
schema: schema.name,
|
|
217
|
+
table: tableName,
|
|
218
|
+
rows: 0,
|
|
219
|
+
type: "TABLE",
|
|
220
|
+
comment: null,
|
|
221
|
+
columns: (detail == null ? void 0 : detail.columns.map((column) => ({
|
|
222
|
+
name: column.name,
|
|
223
|
+
ordinal_position: column.ordinal_position,
|
|
224
|
+
short_type_name: column.short_type_name,
|
|
225
|
+
type: column.type,
|
|
226
|
+
character_maximum_length: null,
|
|
227
|
+
precision: null,
|
|
228
|
+
nullable: column.is_nullable,
|
|
229
|
+
default: column.default_value,
|
|
230
|
+
collation: null,
|
|
231
|
+
comment: null
|
|
232
|
+
}))) || [],
|
|
233
|
+
foreign_keys: (detail == null ? void 0 : detail.foreign_keys.map((foreignKey) => ({
|
|
234
|
+
foreign_key_name: `${foreignKey.column}_fk`,
|
|
235
|
+
column: foreignKey.column,
|
|
236
|
+
reference_schema: foreignKey.referenced_table_schema,
|
|
237
|
+
reference_table: foreignKey.referenced_table,
|
|
238
|
+
reference_column: foreignKey.referenced_column,
|
|
239
|
+
fk_def: `${foreignKey.column} -> ${foreignKey.referenced_table}.${foreignKey.referenced_column}`
|
|
240
|
+
}))) || [],
|
|
241
|
+
primary_keys: (detail == null ? void 0 : detail.primary_keys.map((primaryKey) => ({
|
|
242
|
+
column: primaryKey.column,
|
|
243
|
+
pk_def: `PRIMARY KEY (${primaryKey.column})`
|
|
244
|
+
}))) || [],
|
|
245
|
+
indexes: []
|
|
246
|
+
};
|
|
247
|
+
})
|
|
248
|
+
);
|
|
249
|
+
const views = schemaMeta.flatMap(
|
|
250
|
+
(schema) => (schema.views || []).map((view) => ({
|
|
251
|
+
schema: schema.name,
|
|
252
|
+
view_name: view.name,
|
|
253
|
+
view_definition: ""
|
|
254
|
+
}))
|
|
255
|
+
);
|
|
256
|
+
return {
|
|
257
|
+
tables,
|
|
258
|
+
views,
|
|
259
|
+
databaseName: (databaseInfo == null ? void 0 : databaseInfo.database_name) || "",
|
|
260
|
+
version: (databaseInfo == null ? void 0 : databaseInfo.version) || "",
|
|
261
|
+
config: []
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
async getReverseSchemas() {
|
|
265
|
+
const { tables, primaryKeys, foreignKeys } = await this.loadMetadataRows();
|
|
266
|
+
return tables.filter((table) => table.table_type === "BASE TABLE").map((table) => ({
|
|
267
|
+
schema: table.table_schema,
|
|
268
|
+
table: table.table_name,
|
|
269
|
+
rows: table.table_rows || 0,
|
|
270
|
+
type: table.table_type,
|
|
271
|
+
primary_keys: primaryKeys.filter(
|
|
272
|
+
(primaryKey) => primaryKey.table_schema === table.table_schema && primaryKey.table_name === table.table_name
|
|
273
|
+
).map((primaryKey) => ({ column: primaryKey.column_name })),
|
|
274
|
+
used_by: foreignKeys.filter(
|
|
275
|
+
(foreignKey) => foreignKey.referenced_table_schema === table.table_schema && foreignKey.referenced_table_name === table.table_name
|
|
276
|
+
).map((foreignKey) => ({
|
|
277
|
+
referencing_schema: foreignKey.table_schema,
|
|
278
|
+
referencing_table: foreignKey.table_name,
|
|
279
|
+
foreign_key_name: `${foreignKey.table_name}.${foreignKey.column_name}`,
|
|
280
|
+
fk_column: foreignKey.column_name,
|
|
281
|
+
referenced_column: foreignKey.referenced_column_name
|
|
282
|
+
}))
|
|
283
|
+
}));
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
var __defProp$2 = Object.defineProperty;
|
|
288
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
289
|
+
var __publicField$2 = (obj, key, value) => __defNormalProp$2(obj, key + "" , value);
|
|
290
|
+
const SYSTEM_SCHEMAS = [
|
|
291
|
+
"ANONYMOUS",
|
|
292
|
+
"APPQOSSYS",
|
|
293
|
+
"AUDSYS",
|
|
294
|
+
"CTXSYS",
|
|
295
|
+
"DBSNMP",
|
|
296
|
+
"DVSYS",
|
|
297
|
+
"GSMADMIN_INTERNAL",
|
|
298
|
+
"LBACSYS",
|
|
299
|
+
"MDSYS",
|
|
300
|
+
"OJVMSYS",
|
|
301
|
+
"ORDSYS",
|
|
302
|
+
"OUTLN",
|
|
303
|
+
"SYS",
|
|
304
|
+
"SYSBACKUP",
|
|
305
|
+
"SYSDG",
|
|
306
|
+
"SYSKM",
|
|
307
|
+
"SYSTEM",
|
|
308
|
+
"WMSYS",
|
|
309
|
+
"XDB"
|
|
310
|
+
];
|
|
311
|
+
function buildBindPlaceholders(count, start = 1) {
|
|
312
|
+
return Array.from({ length: count }, (_, index) => `:${index + start}`).join(
|
|
313
|
+
", "
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
function formatOracleType(column) {
|
|
317
|
+
if (column.data_type === "NUMBER" && column.data_precision !== null) {
|
|
318
|
+
return column.data_scale !== null ? `NUMBER(${column.data_precision}, ${column.data_scale})` : `NUMBER(${column.data_precision})`;
|
|
319
|
+
}
|
|
320
|
+
if (["VARCHAR2", "NVARCHAR2", "CHAR", "NCHAR", "RAW"].includes(
|
|
321
|
+
column.data_type
|
|
322
|
+
) && column.data_length !== null) {
|
|
323
|
+
return `${column.data_type}(${column.data_length})`;
|
|
324
|
+
}
|
|
325
|
+
return column.data_type;
|
|
326
|
+
}
|
|
327
|
+
class OracleMetadataAdapter extends BaseDomainAdapter {
|
|
328
|
+
constructor() {
|
|
329
|
+
super(...arguments);
|
|
330
|
+
__publicField$2(this, "dbType", DatabaseClientType.ORACLE);
|
|
331
|
+
}
|
|
332
|
+
static async create(params) {
|
|
333
|
+
const adapter = await OracleMetadataAdapter.resolveAdapter(
|
|
334
|
+
params,
|
|
335
|
+
DatabaseClientType.ORACLE
|
|
336
|
+
);
|
|
337
|
+
return new OracleMetadataAdapter(adapter);
|
|
338
|
+
}
|
|
339
|
+
async loadMetadataRows() {
|
|
340
|
+
const schemaPlaceholders = buildBindPlaceholders(SYSTEM_SCHEMAS.length);
|
|
341
|
+
const [
|
|
342
|
+
schemas,
|
|
343
|
+
tables,
|
|
344
|
+
views,
|
|
345
|
+
columns,
|
|
346
|
+
primaryKeys,
|
|
347
|
+
foreignKeys,
|
|
348
|
+
routines
|
|
349
|
+
] = await Promise.all([
|
|
350
|
+
this.adapter.rawQuery(
|
|
351
|
+
`
|
|
352
|
+
SELECT username AS schema_name
|
|
353
|
+
FROM all_users
|
|
354
|
+
WHERE username NOT IN (${schemaPlaceholders})
|
|
355
|
+
ORDER BY username
|
|
356
|
+
`,
|
|
357
|
+
SYSTEM_SCHEMAS
|
|
358
|
+
),
|
|
359
|
+
this.adapter.rawQuery(
|
|
360
|
+
`
|
|
361
|
+
SELECT t.owner, t.table_name, t.num_rows, c.comments
|
|
362
|
+
FROM all_tables t
|
|
363
|
+
LEFT JOIN all_tab_comments c
|
|
364
|
+
ON c.owner = t.owner
|
|
365
|
+
AND c.table_name = t.table_name
|
|
366
|
+
WHERE t.owner NOT IN (${schemaPlaceholders})
|
|
367
|
+
ORDER BY t.owner, t.table_name
|
|
368
|
+
`,
|
|
369
|
+
SYSTEM_SCHEMAS
|
|
370
|
+
),
|
|
371
|
+
this.adapter.rawQuery(
|
|
372
|
+
`
|
|
373
|
+
SELECT owner, view_name
|
|
374
|
+
FROM all_views
|
|
375
|
+
WHERE owner NOT IN (${schemaPlaceholders})
|
|
376
|
+
ORDER BY owner, view_name
|
|
377
|
+
`,
|
|
378
|
+
SYSTEM_SCHEMAS
|
|
379
|
+
),
|
|
380
|
+
this.adapter.rawQuery(
|
|
381
|
+
`
|
|
382
|
+
SELECT
|
|
383
|
+
owner,
|
|
384
|
+
table_name,
|
|
385
|
+
column_name,
|
|
386
|
+
column_id,
|
|
387
|
+
data_type,
|
|
388
|
+
data_length,
|
|
389
|
+
data_precision,
|
|
390
|
+
data_scale,
|
|
391
|
+
nullable,
|
|
392
|
+
TRIM(data_default) AS data_default
|
|
393
|
+
FROM all_tab_columns
|
|
394
|
+
WHERE owner NOT IN (${schemaPlaceholders})
|
|
395
|
+
ORDER BY owner, table_name, column_id
|
|
396
|
+
`,
|
|
397
|
+
SYSTEM_SCHEMAS
|
|
398
|
+
),
|
|
399
|
+
this.adapter.rawQuery(
|
|
400
|
+
`
|
|
401
|
+
SELECT acc.owner, acc.table_name, acc.column_name
|
|
402
|
+
FROM all_constraints ac
|
|
403
|
+
JOIN all_cons_columns acc
|
|
404
|
+
ON acc.owner = ac.owner
|
|
405
|
+
AND acc.constraint_name = ac.constraint_name
|
|
406
|
+
WHERE ac.constraint_type = 'P'
|
|
407
|
+
AND ac.owner NOT IN (${schemaPlaceholders})
|
|
408
|
+
ORDER BY acc.owner, acc.table_name, acc.position
|
|
409
|
+
`,
|
|
410
|
+
SYSTEM_SCHEMAS
|
|
411
|
+
),
|
|
412
|
+
this.adapter.rawQuery(
|
|
413
|
+
`
|
|
414
|
+
SELECT
|
|
415
|
+
acc.owner,
|
|
416
|
+
acc.table_name,
|
|
417
|
+
acc.column_name,
|
|
418
|
+
r_acc.owner AS referenced_owner,
|
|
419
|
+
r_acc.table_name AS referenced_table_name,
|
|
420
|
+
r_acc.column_name AS referenced_column_name
|
|
421
|
+
FROM all_constraints ac
|
|
422
|
+
JOIN all_cons_columns acc
|
|
423
|
+
ON acc.owner = ac.owner
|
|
424
|
+
AND acc.constraint_name = ac.constraint_name
|
|
425
|
+
JOIN all_constraints r_ac
|
|
426
|
+
ON r_ac.owner = ac.r_owner
|
|
427
|
+
AND r_ac.constraint_name = ac.r_constraint_name
|
|
428
|
+
JOIN all_cons_columns r_acc
|
|
429
|
+
ON r_acc.owner = r_ac.owner
|
|
430
|
+
AND r_acc.constraint_name = r_ac.constraint_name
|
|
431
|
+
AND r_acc.position = acc.position
|
|
432
|
+
WHERE ac.constraint_type = 'R'
|
|
433
|
+
AND ac.owner NOT IN (${schemaPlaceholders})
|
|
434
|
+
ORDER BY acc.owner, acc.table_name, acc.position
|
|
435
|
+
`,
|
|
436
|
+
SYSTEM_SCHEMAS
|
|
437
|
+
),
|
|
438
|
+
this.adapter.rawQuery(
|
|
439
|
+
`
|
|
440
|
+
SELECT owner, object_name, object_type
|
|
441
|
+
FROM all_objects
|
|
442
|
+
WHERE object_type IN ('FUNCTION', 'PROCEDURE')
|
|
443
|
+
AND owner NOT IN (${schemaPlaceholders})
|
|
444
|
+
ORDER BY owner, object_name
|
|
445
|
+
`,
|
|
446
|
+
SYSTEM_SCHEMAS
|
|
447
|
+
)
|
|
448
|
+
]);
|
|
449
|
+
return {
|
|
450
|
+
schemas,
|
|
451
|
+
tables,
|
|
452
|
+
views,
|
|
453
|
+
columns,
|
|
454
|
+
primaryKeys,
|
|
455
|
+
foreignKeys,
|
|
456
|
+
routines
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
async getSchemaMetaData() {
|
|
460
|
+
const {
|
|
461
|
+
schemas,
|
|
462
|
+
tables,
|
|
463
|
+
views,
|
|
464
|
+
columns,
|
|
465
|
+
primaryKeys,
|
|
466
|
+
foreignKeys,
|
|
467
|
+
routines
|
|
468
|
+
} = await this.loadMetadataRows();
|
|
469
|
+
return schemas.map(({ schema_name }) => {
|
|
470
|
+
const schemaTables = tables.filter((table) => table.owner === schema_name);
|
|
471
|
+
const schemaViews = views.filter((view) => view.owner === schema_name);
|
|
472
|
+
const table_details = Object.fromEntries(
|
|
473
|
+
schemaTables.map((table) => {
|
|
474
|
+
const tableColumns = columns.filter(
|
|
475
|
+
(column) => column.owner === schema_name && column.table_name === table.table_name
|
|
476
|
+
).map((column) => ({
|
|
477
|
+
raw_type_name: formatOracleType(column),
|
|
478
|
+
name: column.column_name,
|
|
479
|
+
ordinal_position: column.column_id,
|
|
480
|
+
type: formatOracleType(column),
|
|
481
|
+
short_type_name: resolveMetadataTypeAlias(
|
|
482
|
+
this.dbType,
|
|
483
|
+
formatOracleType(column)
|
|
484
|
+
),
|
|
485
|
+
is_nullable: column.nullable === "Y",
|
|
486
|
+
default_value: column.data_default
|
|
487
|
+
}));
|
|
488
|
+
const tablePrimaryKeys = primaryKeys.filter(
|
|
489
|
+
(primaryKey) => primaryKey.owner === schema_name && primaryKey.table_name === table.table_name
|
|
490
|
+
).map((primaryKey) => ({ column: primaryKey.column_name }));
|
|
491
|
+
const tableForeignKeys = foreignKeys.filter(
|
|
492
|
+
(foreignKey) => foreignKey.owner === schema_name && foreignKey.table_name === table.table_name
|
|
493
|
+
).map((foreignKey) => ({
|
|
494
|
+
column: foreignKey.column_name,
|
|
495
|
+
referenced_column: foreignKey.referenced_column_name,
|
|
496
|
+
referenced_table: foreignKey.referenced_table_name,
|
|
497
|
+
referenced_table_schema: foreignKey.referenced_owner
|
|
498
|
+
}));
|
|
499
|
+
return [
|
|
500
|
+
table.table_name,
|
|
501
|
+
{
|
|
502
|
+
columns: tableColumns,
|
|
503
|
+
foreign_keys: tableForeignKeys,
|
|
504
|
+
primary_keys: tablePrimaryKeys,
|
|
505
|
+
table_id: `${schema_name}.${table.table_name}`
|
|
506
|
+
}
|
|
507
|
+
];
|
|
508
|
+
})
|
|
509
|
+
);
|
|
510
|
+
const view_details = Object.fromEntries(
|
|
511
|
+
schemaViews.map((view) => {
|
|
512
|
+
const viewColumns = columns.filter(
|
|
513
|
+
(column) => column.owner === schema_name && column.table_name === view.view_name
|
|
514
|
+
).map((column) => ({
|
|
515
|
+
raw_type_name: formatOracleType(column),
|
|
516
|
+
name: column.column_name,
|
|
517
|
+
ordinal_position: column.column_id,
|
|
518
|
+
type: formatOracleType(column),
|
|
519
|
+
short_type_name: resolveMetadataTypeAlias(
|
|
520
|
+
this.dbType,
|
|
521
|
+
formatOracleType(column)
|
|
522
|
+
),
|
|
523
|
+
is_nullable: column.nullable === "Y",
|
|
524
|
+
default_value: column.data_default
|
|
525
|
+
}));
|
|
526
|
+
return [
|
|
527
|
+
view.view_name,
|
|
528
|
+
{
|
|
529
|
+
columns: viewColumns,
|
|
530
|
+
view_id: `${schema_name}.${view.view_name}`,
|
|
531
|
+
type: ViewSchemaEnum.View
|
|
532
|
+
}
|
|
533
|
+
];
|
|
534
|
+
})
|
|
535
|
+
);
|
|
536
|
+
const functions = routines.filter((routine) => routine.owner === schema_name).map((routine) => ({
|
|
537
|
+
oId: `${schema_name}.${routine.object_name}`,
|
|
538
|
+
name: routine.object_name,
|
|
539
|
+
type: routine.object_type === "PROCEDURE" ? FunctionSchemaEnum.Procedure : FunctionSchemaEnum.Function,
|
|
540
|
+
parameters: ""
|
|
541
|
+
}));
|
|
542
|
+
const schemaViewsList = schemaViews.map((view) => ({
|
|
543
|
+
name: view.view_name,
|
|
544
|
+
type: ViewSchemaEnum.View,
|
|
545
|
+
oid: `${schema_name}.${view.view_name}`
|
|
546
|
+
}));
|
|
547
|
+
return {
|
|
548
|
+
name: schema_name,
|
|
549
|
+
tables: schemaTables.map((table) => table.table_name),
|
|
550
|
+
views: schemaViewsList,
|
|
551
|
+
functions,
|
|
552
|
+
table_details,
|
|
553
|
+
view_details
|
|
554
|
+
};
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
async getErdData() {
|
|
558
|
+
const [databaseInfo] = await this.adapter.rawQuery(
|
|
559
|
+
`
|
|
560
|
+
SELECT
|
|
561
|
+
SYS_CONTEXT('USERENV', 'DB_NAME') AS database_name,
|
|
562
|
+
(
|
|
563
|
+
SELECT version
|
|
564
|
+
FROM product_component_version
|
|
565
|
+
WHERE product LIKE 'Oracle Database%'
|
|
566
|
+
AND ROWNUM = 1
|
|
567
|
+
) AS version
|
|
568
|
+
FROM dual
|
|
569
|
+
`
|
|
570
|
+
);
|
|
571
|
+
const schemaMeta = await this.getSchemaMetaData();
|
|
572
|
+
const tables = schemaMeta.flatMap(
|
|
573
|
+
(schema) => (schema.tables || []).map((tableName) => {
|
|
574
|
+
var _a;
|
|
575
|
+
const detail = (_a = schema.table_details) == null ? void 0 : _a[tableName];
|
|
576
|
+
return {
|
|
577
|
+
id: (detail == null ? void 0 : detail.table_id) || `${schema.name}.${tableName}`,
|
|
578
|
+
schema: schema.name,
|
|
579
|
+
table: tableName,
|
|
580
|
+
rows: 0,
|
|
581
|
+
type: "TABLE",
|
|
582
|
+
comment: null,
|
|
583
|
+
columns: (detail == null ? void 0 : detail.columns.map((column) => ({
|
|
584
|
+
name: column.name,
|
|
585
|
+
ordinal_position: column.ordinal_position,
|
|
586
|
+
short_type_name: column.short_type_name,
|
|
587
|
+
type: column.type,
|
|
588
|
+
character_maximum_length: null,
|
|
589
|
+
precision: null,
|
|
590
|
+
nullable: column.is_nullable,
|
|
591
|
+
default: column.default_value,
|
|
592
|
+
collation: null,
|
|
593
|
+
comment: null
|
|
594
|
+
}))) || [],
|
|
595
|
+
foreign_keys: (detail == null ? void 0 : detail.foreign_keys.map((foreignKey) => ({
|
|
596
|
+
foreign_key_name: `${foreignKey.column}_fk`,
|
|
597
|
+
column: foreignKey.column,
|
|
598
|
+
reference_schema: foreignKey.referenced_table_schema,
|
|
599
|
+
reference_table: foreignKey.referenced_table,
|
|
600
|
+
reference_column: foreignKey.referenced_column,
|
|
601
|
+
fk_def: `${foreignKey.column} -> ${foreignKey.referenced_table}.${foreignKey.referenced_column}`
|
|
602
|
+
}))) || [],
|
|
603
|
+
primary_keys: (detail == null ? void 0 : detail.primary_keys.map((primaryKey) => ({
|
|
604
|
+
column: primaryKey.column,
|
|
605
|
+
pk_def: `PRIMARY KEY (${primaryKey.column})`
|
|
606
|
+
}))) || [],
|
|
607
|
+
indexes: []
|
|
608
|
+
};
|
|
609
|
+
})
|
|
610
|
+
);
|
|
611
|
+
const views = schemaMeta.flatMap(
|
|
612
|
+
(schema) => (schema.views || []).map((view) => ({
|
|
613
|
+
schema: schema.name,
|
|
614
|
+
view_name: view.name,
|
|
615
|
+
view_definition: ""
|
|
616
|
+
}))
|
|
617
|
+
);
|
|
618
|
+
return {
|
|
619
|
+
tables,
|
|
620
|
+
views,
|
|
621
|
+
databaseName: (databaseInfo == null ? void 0 : databaseInfo.database_name) || "",
|
|
622
|
+
version: (databaseInfo == null ? void 0 : databaseInfo.version) || "",
|
|
623
|
+
config: []
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
async getReverseSchemas() {
|
|
627
|
+
const { tables, primaryKeys, foreignKeys } = await this.loadMetadataRows();
|
|
628
|
+
return tables.map((table) => ({
|
|
629
|
+
schema: table.owner,
|
|
630
|
+
table: table.table_name,
|
|
631
|
+
rows: table.num_rows || 0,
|
|
632
|
+
type: "TABLE",
|
|
633
|
+
primary_keys: primaryKeys.filter(
|
|
634
|
+
(primaryKey) => primaryKey.owner === table.owner && primaryKey.table_name === table.table_name
|
|
635
|
+
).map((primaryKey) => ({ column: primaryKey.column_name })),
|
|
636
|
+
used_by: foreignKeys.filter(
|
|
637
|
+
(foreignKey) => foreignKey.referenced_owner === table.owner && foreignKey.referenced_table_name === table.table_name
|
|
638
|
+
).map((foreignKey) => ({
|
|
639
|
+
referencing_schema: foreignKey.owner,
|
|
640
|
+
referencing_table: foreignKey.table_name,
|
|
641
|
+
foreign_key_name: `${foreignKey.table_name}.${foreignKey.column_name}`,
|
|
642
|
+
fk_column: foreignKey.column_name,
|
|
643
|
+
referenced_column: foreignKey.referenced_column_name
|
|
644
|
+
}))
|
|
645
|
+
}));
|
|
646
|
+
}
|
|
647
|
+
}
|
|
3
648
|
|
|
4
649
|
const getSchemaMetaDataQuery = `
|
|
5
650
|
SELECT
|
|
@@ -47,20 +692,9 @@ const getSchemaMetaDataQuery = `
|
|
|
47
692
|
'name', a.attname,
|
|
48
693
|
'ordinal_position', a.attnum,
|
|
49
694
|
'type', format_type(a.atttypid, a.atttypmod),
|
|
695
|
+
'raw_type_name', format_type(a.atttypid, a.atttypmod),
|
|
50
696
|
'is_nullable', NOT a.attnotnull,
|
|
51
|
-
'short_type_name',
|
|
52
|
-
CASE
|
|
53
|
-
WHEN format_type(a.atttypid, a.atttypmod) LIKE 'character varying%'
|
|
54
|
-
THEN REPLACE(format_type(a.atttypid, a.atttypmod), 'character varying', 'varchar')
|
|
55
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'integer' THEN 'int4'
|
|
56
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'bigint' THEN 'int8'
|
|
57
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'boolean' THEN 'bool'
|
|
58
|
-
WHEN format_type(a.atttypid, a.atttypmod) LIKE 'numeric%'
|
|
59
|
-
THEN REPLACE(format_type(a.atttypid, a.atttypmod), 'numeric', 'decimal')
|
|
60
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'timestamp without time zone' THEN 'timestamp'
|
|
61
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'timestamp with time zone' THEN 'timestamptz'
|
|
62
|
-
ELSE format_type(a.atttypid, a.atttypmod)
|
|
63
|
-
END
|
|
697
|
+
'short_type_name', format_type(a.atttypid, a.atttypmod)
|
|
64
698
|
)
|
|
65
699
|
ORDER BY a.attnum
|
|
66
700
|
)
|
|
@@ -110,32 +744,10 @@ const getSchemaMetaDataQuery = `
|
|
|
110
744
|
'name', a.attname,
|
|
111
745
|
'ordinal_position', a.attnum,
|
|
112
746
|
'type', format_type(a.atttypid, a.atttypmod),
|
|
747
|
+
'raw_type_name', format_type(a.atttypid, a.atttypmod),
|
|
113
748
|
'is_nullable', NOT a.attnotnull,
|
|
114
749
|
'default_value', pg_get_expr(d.adbin, d.adrelid),
|
|
115
|
-
'short_type_name',
|
|
116
|
-
CASE
|
|
117
|
-
WHEN format_type(a.atttypid, a.atttypmod) LIKE 'character varying%'
|
|
118
|
-
THEN REPLACE(format_type(a.atttypid, a.atttypmod), 'character varying', 'varchar')
|
|
119
|
-
WHEN format_type(a.atttypid, a.atttypmod) LIKE 'character%'
|
|
120
|
-
THEN REPLACE(format_type(a.atttypid, a.atttypmod), 'character', 'char')
|
|
121
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'double precision' THEN 'float8'
|
|
122
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'integer' THEN 'int4'
|
|
123
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'smallint' THEN 'int2'
|
|
124
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'bigint' THEN 'int8'
|
|
125
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'real' THEN 'float4'
|
|
126
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'serial' THEN 'serial4'
|
|
127
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'smallserial' THEN 'serial2'
|
|
128
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'bigserial' THEN 'serial8'
|
|
129
|
-
WHEN format_type(a.atttypid, a.atttypmod) LIKE 'bit varying%'
|
|
130
|
-
THEN REPLACE(format_type(a.atttypid, a.atttypmod), 'bit varying', 'varbit')
|
|
131
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'boolean' THEN 'bool'
|
|
132
|
-
WHEN format_type(a.atttypid, a.atttypmod) LIKE 'numeric%'
|
|
133
|
-
THEN REPLACE(format_type(a.atttypid, a.atttypmod), 'numeric', 'decimal')
|
|
134
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'timestamp with time zone' THEN 'timestamptz'
|
|
135
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'timestamp without time zone' THEN 'timestamp'
|
|
136
|
-
WHEN format_type(a.atttypid, a.atttypmod) = 'time with time zone' THEN 'timetz'
|
|
137
|
-
ELSE format_type(a.atttypid, a.atttypmod)
|
|
138
|
-
END -- short type with length, user-friendly
|
|
750
|
+
'short_type_name', format_type(a.atttypid, a.atttypmod)
|
|
139
751
|
)
|
|
140
752
|
)
|
|
141
753
|
FROM pg_attribute a
|
|
@@ -536,13 +1148,38 @@ const getReverseSchemasQuery = `
|
|
|
536
1148
|
tbls;
|
|
537
1149
|
`;
|
|
538
1150
|
|
|
539
|
-
var __defProp = Object.defineProperty;
|
|
540
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
541
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
1151
|
+
var __defProp$1 = Object.defineProperty;
|
|
1152
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1153
|
+
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, key + "" , value);
|
|
1154
|
+
const normalizeSchemaColumns = (columns) => (columns || []).map((column) => {
|
|
1155
|
+
const rawType = column.raw_type_name || column.type;
|
|
1156
|
+
return {
|
|
1157
|
+
...column,
|
|
1158
|
+
raw_type_name: rawType,
|
|
1159
|
+
short_type_name: resolveMetadataTypeAlias(
|
|
1160
|
+
DatabaseClientType.POSTGRES,
|
|
1161
|
+
rawType
|
|
1162
|
+
)
|
|
1163
|
+
};
|
|
1164
|
+
});
|
|
1165
|
+
const normalizeDetails = (details) => {
|
|
1166
|
+
if (!details) {
|
|
1167
|
+
return details != null ? details : null;
|
|
1168
|
+
}
|
|
1169
|
+
return Object.fromEntries(
|
|
1170
|
+
Object.entries(details).map(([name, detail]) => [
|
|
1171
|
+
name,
|
|
1172
|
+
{
|
|
1173
|
+
...detail,
|
|
1174
|
+
columns: normalizeSchemaColumns(detail.columns)
|
|
1175
|
+
}
|
|
1176
|
+
])
|
|
1177
|
+
);
|
|
1178
|
+
};
|
|
542
1179
|
class PostgresMetadataAdapter extends BaseDomainAdapter {
|
|
543
1180
|
constructor() {
|
|
544
1181
|
super(...arguments);
|
|
545
|
-
__publicField(this, "dbType", DatabaseClientType.POSTGRES);
|
|
1182
|
+
__publicField$1(this, "dbType", DatabaseClientType.POSTGRES);
|
|
546
1183
|
}
|
|
547
1184
|
static async create(params) {
|
|
548
1185
|
const adapter = await PostgresMetadataAdapter.resolveAdapter(
|
|
@@ -552,7 +1189,15 @@ class PostgresMetadataAdapter extends BaseDomainAdapter {
|
|
|
552
1189
|
return new PostgresMetadataAdapter(adapter);
|
|
553
1190
|
}
|
|
554
1191
|
async getSchemaMetaData() {
|
|
555
|
-
|
|
1192
|
+
const metadata = await this.adapter.rawQuery(
|
|
1193
|
+
getSchemaMetaDataQuery,
|
|
1194
|
+
[]
|
|
1195
|
+
);
|
|
1196
|
+
return metadata.map((schema) => ({
|
|
1197
|
+
...schema,
|
|
1198
|
+
table_details: normalizeDetails(schema.table_details),
|
|
1199
|
+
view_details: normalizeDetails(schema.view_details)
|
|
1200
|
+
}));
|
|
556
1201
|
}
|
|
557
1202
|
async getErdData() {
|
|
558
1203
|
var _a;
|
|
@@ -572,9 +1217,233 @@ class PostgresMetadataAdapter extends BaseDomainAdapter {
|
|
|
572
1217
|
}
|
|
573
1218
|
}
|
|
574
1219
|
|
|
1220
|
+
var __defProp = Object.defineProperty;
|
|
1221
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1222
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
1223
|
+
function escapeSqliteIdentifier(identifier) {
|
|
1224
|
+
return `"${identifier.replace(/"/g, '""')}"`;
|
|
1225
|
+
}
|
|
1226
|
+
function quoteSqliteString(value) {
|
|
1227
|
+
return `'${value.replace(/'/g, "''")}'`;
|
|
1228
|
+
}
|
|
1229
|
+
class SqliteMetadataAdapter extends BaseDomainAdapter {
|
|
1230
|
+
constructor() {
|
|
1231
|
+
super(...arguments);
|
|
1232
|
+
__publicField(this, "dbType", DatabaseClientType.SQLITE3);
|
|
1233
|
+
}
|
|
1234
|
+
static async create(params) {
|
|
1235
|
+
const adapter = await SqliteMetadataAdapter.resolveAdapter(
|
|
1236
|
+
params,
|
|
1237
|
+
DatabaseClientType.SQLITE3
|
|
1238
|
+
);
|
|
1239
|
+
return new SqliteMetadataAdapter(adapter);
|
|
1240
|
+
}
|
|
1241
|
+
async getDatabases() {
|
|
1242
|
+
return this.adapter.rawQuery("PRAGMA database_list");
|
|
1243
|
+
}
|
|
1244
|
+
async getSchemaObjects(schema) {
|
|
1245
|
+
return this.adapter.rawQuery(
|
|
1246
|
+
`
|
|
1247
|
+
SELECT name, type, sql
|
|
1248
|
+
FROM ${escapeSqliteIdentifier(schema)}.sqlite_master
|
|
1249
|
+
WHERE type IN ('table', 'view')
|
|
1250
|
+
AND name NOT LIKE 'sqlite_%'
|
|
1251
|
+
ORDER BY type, name
|
|
1252
|
+
`
|
|
1253
|
+
);
|
|
1254
|
+
}
|
|
1255
|
+
async getTableInfo(schema, tableName) {
|
|
1256
|
+
return this.adapter.rawQuery(
|
|
1257
|
+
`PRAGMA ${escapeSqliteIdentifier(schema)}.table_info(${quoteSqliteString(tableName)})`
|
|
1258
|
+
);
|
|
1259
|
+
}
|
|
1260
|
+
async getForeignKeys(schema, tableName) {
|
|
1261
|
+
return this.adapter.rawQuery(
|
|
1262
|
+
`PRAGMA ${escapeSqliteIdentifier(schema)}.foreign_key_list(${quoteSqliteString(tableName)})`
|
|
1263
|
+
);
|
|
1264
|
+
}
|
|
1265
|
+
async getSchemaMetaData() {
|
|
1266
|
+
const databases = await this.getDatabases();
|
|
1267
|
+
const schemaMeta = [];
|
|
1268
|
+
for (const database of databases.filter((db) => db.name !== "temp")) {
|
|
1269
|
+
const objects = await this.getSchemaObjects(database.name);
|
|
1270
|
+
const tables = objects.filter((object) => object.type === "table");
|
|
1271
|
+
const views = objects.filter((object) => object.type === "view");
|
|
1272
|
+
const table_details = Object.fromEntries(
|
|
1273
|
+
await Promise.all(
|
|
1274
|
+
tables.map(async (table) => {
|
|
1275
|
+
const [columns, foreignKeys] = await Promise.all([
|
|
1276
|
+
this.getTableInfo(database.name, table.name),
|
|
1277
|
+
this.getForeignKeys(database.name, table.name)
|
|
1278
|
+
]);
|
|
1279
|
+
return [
|
|
1280
|
+
table.name,
|
|
1281
|
+
{
|
|
1282
|
+
columns: columns.map((column) => ({
|
|
1283
|
+
raw_type_name: column.type,
|
|
1284
|
+
name: column.name,
|
|
1285
|
+
ordinal_position: column.cid + 1,
|
|
1286
|
+
type: column.type,
|
|
1287
|
+
short_type_name: resolveMetadataTypeAlias(
|
|
1288
|
+
this.dbType,
|
|
1289
|
+
column.type
|
|
1290
|
+
),
|
|
1291
|
+
is_nullable: column.notnull === 0,
|
|
1292
|
+
default_value: column.dflt_value
|
|
1293
|
+
})),
|
|
1294
|
+
foreign_keys: foreignKeys.map((foreignKey) => ({
|
|
1295
|
+
column: foreignKey.from,
|
|
1296
|
+
referenced_column: foreignKey.to,
|
|
1297
|
+
referenced_table: foreignKey.table,
|
|
1298
|
+
referenced_table_schema: database.name
|
|
1299
|
+
})),
|
|
1300
|
+
primary_keys: columns.filter((column) => column.pk > 0).sort((left, right) => left.pk - right.pk).map((column) => ({ column: column.name })),
|
|
1301
|
+
table_id: `${database.name}.${table.name}`
|
|
1302
|
+
}
|
|
1303
|
+
];
|
|
1304
|
+
})
|
|
1305
|
+
)
|
|
1306
|
+
);
|
|
1307
|
+
const view_details = Object.fromEntries(
|
|
1308
|
+
await Promise.all(
|
|
1309
|
+
views.map(async (view) => {
|
|
1310
|
+
const columns = await this.getTableInfo(database.name, view.name);
|
|
1311
|
+
return [
|
|
1312
|
+
view.name,
|
|
1313
|
+
{
|
|
1314
|
+
columns: columns.map((column) => ({
|
|
1315
|
+
raw_type_name: column.type,
|
|
1316
|
+
name: column.name,
|
|
1317
|
+
ordinal_position: column.cid + 1,
|
|
1318
|
+
type: column.type,
|
|
1319
|
+
short_type_name: resolveMetadataTypeAlias(
|
|
1320
|
+
this.dbType,
|
|
1321
|
+
column.type
|
|
1322
|
+
),
|
|
1323
|
+
is_nullable: column.notnull === 0,
|
|
1324
|
+
default_value: column.dflt_value
|
|
1325
|
+
})),
|
|
1326
|
+
view_id: `${database.name}.${view.name}`,
|
|
1327
|
+
type: ViewSchemaEnum.View
|
|
1328
|
+
}
|
|
1329
|
+
];
|
|
1330
|
+
})
|
|
1331
|
+
)
|
|
1332
|
+
);
|
|
1333
|
+
schemaMeta.push({
|
|
1334
|
+
name: database.name,
|
|
1335
|
+
tables: tables.map((table) => table.name),
|
|
1336
|
+
views: views.map((view) => ({
|
|
1337
|
+
name: view.name,
|
|
1338
|
+
type: ViewSchemaEnum.View,
|
|
1339
|
+
oid: `${database.name}.${view.name}`
|
|
1340
|
+
})),
|
|
1341
|
+
functions: [],
|
|
1342
|
+
table_details,
|
|
1343
|
+
view_details
|
|
1344
|
+
});
|
|
1345
|
+
}
|
|
1346
|
+
return schemaMeta;
|
|
1347
|
+
}
|
|
1348
|
+
async getErdData() {
|
|
1349
|
+
const [versionRow] = await this.adapter.rawQuery(
|
|
1350
|
+
"SELECT sqlite_version() AS version"
|
|
1351
|
+
);
|
|
1352
|
+
const databases = await this.getDatabases();
|
|
1353
|
+
const schemaMeta = await this.getSchemaMetaData();
|
|
1354
|
+
const tables = schemaMeta.flatMap(
|
|
1355
|
+
(schema) => (schema.tables || []).map((tableName) => {
|
|
1356
|
+
var _a;
|
|
1357
|
+
const detail = (_a = schema.table_details) == null ? void 0 : _a[tableName];
|
|
1358
|
+
return {
|
|
1359
|
+
id: (detail == null ? void 0 : detail.table_id) || `${schema.name}.${tableName}`,
|
|
1360
|
+
schema: schema.name,
|
|
1361
|
+
table: tableName,
|
|
1362
|
+
rows: 0,
|
|
1363
|
+
type: "TABLE",
|
|
1364
|
+
comment: null,
|
|
1365
|
+
columns: (detail == null ? void 0 : detail.columns.map((column) => ({
|
|
1366
|
+
name: column.name,
|
|
1367
|
+
ordinal_position: column.ordinal_position,
|
|
1368
|
+
short_type_name: column.short_type_name,
|
|
1369
|
+
type: column.type,
|
|
1370
|
+
character_maximum_length: null,
|
|
1371
|
+
precision: null,
|
|
1372
|
+
nullable: column.is_nullable,
|
|
1373
|
+
default: column.default_value,
|
|
1374
|
+
collation: null,
|
|
1375
|
+
comment: null
|
|
1376
|
+
}))) || [],
|
|
1377
|
+
foreign_keys: (detail == null ? void 0 : detail.foreign_keys.map((foreignKey) => ({
|
|
1378
|
+
foreign_key_name: `${foreignKey.column}_fk`,
|
|
1379
|
+
column: foreignKey.column,
|
|
1380
|
+
reference_schema: foreignKey.referenced_table_schema,
|
|
1381
|
+
reference_table: foreignKey.referenced_table,
|
|
1382
|
+
reference_column: foreignKey.referenced_column,
|
|
1383
|
+
fk_def: `${foreignKey.column} -> ${foreignKey.referenced_table}.${foreignKey.referenced_column}`
|
|
1384
|
+
}))) || [],
|
|
1385
|
+
primary_keys: (detail == null ? void 0 : detail.primary_keys.map((primaryKey) => ({
|
|
1386
|
+
column: primaryKey.column,
|
|
1387
|
+
pk_def: `PRIMARY KEY (${primaryKey.column})`
|
|
1388
|
+
}))) || [],
|
|
1389
|
+
indexes: []
|
|
1390
|
+
};
|
|
1391
|
+
})
|
|
1392
|
+
);
|
|
1393
|
+
const views = schemaMeta.flatMap(
|
|
1394
|
+
(schema) => (schema.views || []).map((view) => ({
|
|
1395
|
+
schema: schema.name,
|
|
1396
|
+
view_name: view.name,
|
|
1397
|
+
view_definition: ""
|
|
1398
|
+
}))
|
|
1399
|
+
);
|
|
1400
|
+
const mainDatabase = databases.find((database) => database.name === "main");
|
|
1401
|
+
return {
|
|
1402
|
+
tables,
|
|
1403
|
+
views,
|
|
1404
|
+
databaseName: (mainDatabase == null ? void 0 : mainDatabase.file) || (mainDatabase == null ? void 0 : mainDatabase.name) || "",
|
|
1405
|
+
version: (versionRow == null ? void 0 : versionRow.version) || "",
|
|
1406
|
+
config: []
|
|
1407
|
+
};
|
|
1408
|
+
}
|
|
1409
|
+
async getReverseSchemas() {
|
|
1410
|
+
const schemaMeta = await this.getSchemaMetaData();
|
|
1411
|
+
return schemaMeta.flatMap(
|
|
1412
|
+
(schema) => (schema.tables || []).map((tableName) => {
|
|
1413
|
+
var _a;
|
|
1414
|
+
const detail = (_a = schema.table_details) == null ? void 0 : _a[tableName];
|
|
1415
|
+
return {
|
|
1416
|
+
schema: schema.name,
|
|
1417
|
+
table: tableName,
|
|
1418
|
+
rows: 0,
|
|
1419
|
+
type: "TABLE",
|
|
1420
|
+
primary_keys: (detail == null ? void 0 : detail.primary_keys) || [],
|
|
1421
|
+
used_by: schemaMeta.flatMap(
|
|
1422
|
+
(otherSchema) => Object.entries(otherSchema.table_details || {}).flatMap(
|
|
1423
|
+
([referencingTable, referencingDetail]) => (referencingDetail.foreign_keys || []).filter(
|
|
1424
|
+
(foreignKey) => foreignKey.referenced_table_schema === schema.name && foreignKey.referenced_table === tableName
|
|
1425
|
+
).map((foreignKey) => ({
|
|
1426
|
+
referencing_schema: otherSchema.name,
|
|
1427
|
+
referencing_table: referencingTable,
|
|
1428
|
+
foreign_key_name: `${referencingTable}.${foreignKey.column}`,
|
|
1429
|
+
fk_column: foreignKey.column,
|
|
1430
|
+
referenced_column: foreignKey.referenced_column
|
|
1431
|
+
}))
|
|
1432
|
+
)
|
|
1433
|
+
)
|
|
1434
|
+
};
|
|
1435
|
+
})
|
|
1436
|
+
);
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
|
|
575
1440
|
async function createMetadataAdapter(dbType, params) {
|
|
576
1441
|
return createDomainAdapter(dbType, params, "metadata", {
|
|
577
|
-
postgres: PostgresMetadataAdapter.create
|
|
1442
|
+
postgres: PostgresMetadataAdapter.create,
|
|
1443
|
+
mysql: (params2) => MysqlMetadataAdapter.create(params2, DatabaseClientType.MYSQL),
|
|
1444
|
+
mariadb: (params2) => MysqlMetadataAdapter.create(params2, DatabaseClientType.MARIADB),
|
|
1445
|
+
oracledb: OracleMetadataAdapter.create,
|
|
1446
|
+
sqlite3: SqliteMetadataAdapter.create
|
|
578
1447
|
});
|
|
579
1448
|
}
|
|
580
1449
|
|