orcaq 1.0.20
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 +15 -0
- package/.output/public/_nuxt/8qASMGdV.js +1 -0
- package/.output/public/_nuxt/9lJACZIQ.js +19 -0
- package/.output/public/_nuxt/B2DnNiWd.js +1 -0
- package/.output/public/_nuxt/B6E6ObS_.js +8 -0
- package/.output/public/_nuxt/BH83_dXo.js +39 -0
- package/.output/public/_nuxt/BIKqrFbQ.js +1 -0
- package/.output/public/_nuxt/BNjPC06x.js +1 -0
- package/.output/public/_nuxt/BPQ-Pz1w.js +39 -0
- package/.output/public/_nuxt/BRpgKkVT.js +51 -0
- package/.output/public/_nuxt/BTCLPbPY.js +4 -0
- package/.output/public/_nuxt/BUV-RarV.js +1 -0
- package/.output/public/_nuxt/Bh6RgYlO.js +1 -0
- package/.output/public/_nuxt/Bq3cyzOD.js +1 -0
- package/.output/public/_nuxt/Bt9sU68B.js +9 -0
- package/.output/public/_nuxt/BwpH2ZxJ.js +1 -0
- package/.output/public/_nuxt/C25Tmn1m.js +1 -0
- package/.output/public/_nuxt/C2HlI1ss.js +1 -0
- package/.output/public/_nuxt/CU3ZV9iV.js +1 -0
- package/.output/public/_nuxt/CbcyysXi.js +1 -0
- package/.output/public/_nuxt/CepyvMhE.js +1 -0
- package/.output/public/_nuxt/CrgoNCm2.js +2 -0
- package/.output/public/_nuxt/CuBKbBH_.js +1 -0
- package/.output/public/_nuxt/CulD8qYQ.js +193 -0
- package/.output/public/_nuxt/CustomEdge.BNBpjEHb.css +1 -0
- package/.output/public/_nuxt/CylkLpwm.js +1 -0
- package/.output/public/_nuxt/D-bWLYHw.js +1 -0
- package/.output/public/_nuxt/D-zecHND.js +1 -0
- package/.output/public/_nuxt/D8vj6kFe.js +160 -0
- package/.output/public/_nuxt/DIETYtCL.js +1 -0
- package/.output/public/_nuxt/DJ4vUzxS.js +1 -0
- package/.output/public/_nuxt/DK-itzXx.js +8 -0
- package/.output/public/_nuxt/DL3T5jYo.js +3867 -0
- package/.output/public/_nuxt/DUsuhY9i.js +1 -0
- package/.output/public/_nuxt/DXV2HFBA.js +224 -0
- package/.output/public/_nuxt/Dh2zppOR.js +1 -0
- package/.output/public/_nuxt/DlAUqK2U.js +1 -0
- package/.output/public/_nuxt/DlmSeCnw.js +5 -0
- package/.output/public/_nuxt/DswTpYG4.js +1 -0
- package/.output/public/_nuxt/DynamicTable.DJeANwbG.css +1 -0
- package/.output/public/_nuxt/G830WtVn.js +1 -0
- package/.output/public/_nuxt/ICwM1E4-.js +15 -0
- package/.output/public/_nuxt/QZbJy9YW.js +31 -0
- package/.output/public/_nuxt/QuickQueryTable.DS_ON57S.css +1 -0
- package/.output/public/_nuxt/UXhX8z2W.js +1 -0
- package/.output/public/_nuxt/WrapperErdDiagram.DwhUd9Wr.css +1 -0
- package/.output/public/_nuxt/_fileId_.DmPfwyyD.css +1 -0
- package/.output/public/_nuxt/_tabViewId_.9Axt3zoi.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -0
- package/.output/public/_nuxt/builds/meta/6364d5cf-4642-479f-ba12-6440c56702af.json +1 -0
- package/.output/public/_nuxt/default.DixIpIal.css +1 -0
- package/.output/public/_nuxt/entry.GqPNPe1e.css +1 -0
- package/.output/public/_nuxt/index.CrXmf4gr.css +1 -0
- package/.output/public/_nuxt/ivUnXl9B.js +1 -0
- package/.output/public/_nuxt/pAheHeBV.js +36 -0
- package/.output/public/_nuxt/s5fCn4j5.js +1 -0
- package/.output/public/favicon.ico +0 -0
- package/.output/public/logo.png +0 -0
- package/.output/public/manifest.json +25 -0
- package/.output/public/robots.txt +1 -0
- package/.output/public/vite.svg +1 -0
- package/.output/server/chunks/_/error-500.mjs +8 -0
- package/.output/server/chunks/_/error-500.mjs.map +1 -0
- package/.output/server/chunks/build/client.manifest.mjs +773 -0
- package/.output/server/chunks/build/client.manifest.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +6432 -0
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
- package/.output/server/chunks/routes/api/ai/chat.mjs +77 -0
- package/.output/server/chunks/routes/api/ai/chat.mjs.map +1 -0
- package/.output/server/chunks/routes/api/execute-bulk-delete.mjs +100 -0
- package/.output/server/chunks/routes/api/execute-bulk-delete.mjs.map +1 -0
- package/.output/server/chunks/routes/api/execute-bulk-update.mjs +105 -0
- package/.output/server/chunks/routes/api/execute-bulk-update.mjs.map +1 -0
- package/.output/server/chunks/routes/api/execute.mjs +47 -0
- package/.output/server/chunks/routes/api/execute.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-one-function.mjs +28 -0
- package/.output/server/chunks/routes/api/get-one-function.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-one-table.mjs +180 -0
- package/.output/server/chunks/routes/api/get-one-table.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-over-view-function.mjs +41 -0
- package/.output/server/chunks/routes/api/get-over-view-function.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-over-view-tables.mjs +53 -0
- package/.output/server/chunks/routes/api/get-over-view-tables.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-reverse-table-schemas.mjs +112 -0
- package/.output/server/chunks/routes/api/get-reverse-table-schemas.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-schema-meta-data.mjs +152 -0
- package/.output/server/chunks/routes/api/get-schema-meta-data.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-table-size.mjs +49 -0
- package/.output/server/chunks/routes/api/get-table-size.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-table-structure.mjs +111 -0
- package/.output/server/chunks/routes/api/get-table-structure.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-tables.mjs +287 -0
- package/.output/server/chunks/routes/api/get-tables.mjs.map +1 -0
- package/.output/server/chunks/routes/api/getMetricMonitor.mjs +46 -0
- package/.output/server/chunks/routes/api/getMetricMonitor.mjs.map +1 -0
- package/.output/server/chunks/routes/api/managment-connection/health-check.mjs +28 -0
- package/.output/server/chunks/routes/api/managment-connection/health-check.mjs.map +1 -0
- package/.output/server/chunks/routes/api/raw-execute.mjs +48 -0
- package/.output/server/chunks/routes/api/raw-execute.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +316 -0
- package/.output/server/chunks/routes/renderer.mjs.map +1 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
- package/.output/server/index.mjs +14 -0
- package/.output/server/index.mjs.map +1 -0
- package/.output/server/node_modules/@ai-sdk/anthropic/dist/index.mjs +4374 -0
- package/.output/server/node_modules/@ai-sdk/anthropic/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/gateway/dist/index.mjs +1082 -0
- package/.output/server/node_modules/@ai-sdk/gateway/package.json +69 -0
- package/.output/server/node_modules/@ai-sdk/google/dist/index.mjs +2007 -0
- package/.output/server/node_modules/@ai-sdk/google/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/openai/dist/index.mjs +5956 -0
- package/.output/server/node_modules/@ai-sdk/openai/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/openai-compatible/dist/index.mjs +1551 -0
- package/.output/server/node_modules/@ai-sdk/openai-compatible/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
- package/.output/server/node_modules/@ai-sdk/provider/package.json +57 -0
- package/.output/server/node_modules/@ai-sdk/provider-utils/dist/index.mjs +2549 -0
- package/.output/server/node_modules/@ai-sdk/provider-utils/package.json +75 -0
- package/.output/server/node_modules/@ai-sdk/xai/dist/index.mjs +2214 -0
- package/.output/server/node_modules/@ai-sdk/xai/package.json +68 -0
- package/.output/server/node_modules/@babel/parser/lib/index.js +14246 -0
- package/.output/server/node_modules/@babel/parser/package.json +50 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/index.mjs +350 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.mjs +188 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/common.mjs +90 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/format.mjs +38 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icon.mjs +76 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icons.mjs +168 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.mjs +14 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.mjs +33 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.mjs +51 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.mjs +84 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/data.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/format.mjs +44 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.mjs +58 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.mjs +231 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.mjs +31 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.mjs +164 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.mjs +216 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.mjs +113 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.mjs +104 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.mjs +34 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.mjs +75 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.mjs +97 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.mjs +54 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.mjs +97 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.mjs +45 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.mjs +105 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.mjs +54 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.mjs +24 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/merge.mjs +20 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/name.mjs +53 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/square.mjs +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.mjs +182 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.mjs +46 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.mjs +66 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.mjs +51 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.mjs +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.mjs +62 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.mjs +161 -0
- package/.output/server/node_modules/@iconify/utils/lib/index.mjs +64 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/custom.mjs +50 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/loader.mjs +59 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/modern.mjs +80 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/utils.mjs +92 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/objects.mjs +30 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/strings.mjs +17 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/title.mjs +5 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/build.mjs +119 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/defs.mjs +30 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.mjs +20 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/html.mjs +9 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/id.mjs +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.mjs +19 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/parse.mjs +83 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.mjs +70 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/size.mjs +40 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/trim.mjs +5 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/url.mjs +11 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.mjs +8 -0
- package/.output/server/node_modules/@iconify/utils/package.json +447 -0
- package/.output/server/node_modules/@ioredis/commands/built/commands.json +2447 -0
- package/.output/server/node_modules/@ioredis/commands/built/index.js +208 -0
- package/.output/server/node_modules/@ioredis/commands/package.json +52 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/context.js +81 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/diag.js +93 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/metrics.js +61 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/propagation.js +89 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/trace.js +79 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js +63 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js +55 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js +23 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/utils.js +51 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js +38 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/context/context.js +55 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/context-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js +59 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js +57 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js +45 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/types.js +44 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag-api.js +29 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/index.js +81 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/internal/global-utils.js +64 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/internal/semver.js +122 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/Metric.js +25 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js +127 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js +31 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/platform/index.js +29 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js +22 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/platform/node/index.js +29 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js +34 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js +41 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/propagation-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js +69 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js +75 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js +32 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js +55 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js +54 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js +42 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/context-utils.js +82 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js +103 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js +46 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js +27 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/span_kind.js +46 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js +49 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/status.js +23 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js +26 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/version.js +21 -0
- package/.output/server/node_modules/@opentelemetry/api/package.json +113 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Formatter.js +234 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Indentation.js +42 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/InlineBlock.js +60 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Params.js +21 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Tokenizer.js +272 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/escapeRegExp.js +10 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/last.js +7 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/types.js +22 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/Db2Formatter.js +585 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/N1qlFormatter.js +257 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/PlSqlFormatter.js +459 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/StandardSqlFormatter.js +369 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/utils/abstract.js +23 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/sqlFormatter.js +34 -0
- package/.output/server/node_modules/@sqltools/formatter/package.json +59 -0
- package/.output/server/node_modules/@standard-schema/spec/dist/index.js +0 -0
- package/.output/server/node_modules/@standard-schema/spec/package.json +52 -0
- package/.output/server/node_modules/@vercel/oidc/dist/auth-config.js +84 -0
- package/.output/server/node_modules/@vercel/oidc/dist/get-context.js +34 -0
- package/.output/server/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js +80 -0
- package/.output/server/node_modules/@vercel/oidc/dist/index.js +33 -0
- package/.output/server/node_modules/@vercel/oidc/dist/oauth.js +88 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token-error.js +40 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token-io.js +78 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token-util.js +198 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token.js +53 -0
- package/.output/server/node_modules/@vercel/oidc/package.json +52 -0
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6690 -0
- package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +686 -0
- package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1404 -0
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1789 -0
- package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6654 -0
- package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1669 -0
- package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +857 -0
- package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +594 -0
- package/.output/server/node_modules/@vue/shared/package.json +47 -0
- package/.output/server/node_modules/ai/dist/index.mjs +12363 -0
- package/.output/server/node_modules/ai/package.json +106 -0
- package/.output/server/node_modules/ansis/index.js +1 -0
- package/.output/server/node_modules/ansis/package.json +28 -0
- package/.output/server/node_modules/app-root-path/index.js +4 -0
- package/.output/server/node_modules/app-root-path/lib/app-root-path.js +30 -0
- package/.output/server/node_modules/app-root-path/lib/resolve.js +128 -0
- package/.output/server/node_modules/app-root-path/package.json +66 -0
- package/.output/server/node_modules/balanced-match/index.js +62 -0
- package/.output/server/node_modules/balanced-match/package.json +48 -0
- package/.output/server/node_modules/bindings/bindings.js +221 -0
- package/.output/server/node_modules/bindings/package.json +28 -0
- package/.output/server/node_modules/brace-expansion/index.js +203 -0
- package/.output/server/node_modules/brace-expansion/package.json +46 -0
- package/.output/server/node_modules/cluster-key-slot/lib/index.js +166 -0
- package/.output/server/node_modules/cluster-key-slot/package.json +56 -0
- package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
- package/.output/server/node_modules/consola/dist/core.mjs +512 -0
- package/.output/server/node_modules/consola/dist/index.mjs +651 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
- package/.output/server/node_modules/consola/package.json +136 -0
- package/.output/server/node_modules/dayjs/dayjs.min.js +1 -0
- package/.output/server/node_modules/dayjs/package.json +84 -0
- package/.output/server/node_modules/debug/package.json +65 -0
- package/.output/server/node_modules/debug/src/browser.js +272 -0
- package/.output/server/node_modules/debug/src/common.js +292 -0
- package/.output/server/node_modules/debug/src/index.js +10 -0
- package/.output/server/node_modules/debug/src/node.js +263 -0
- package/.output/server/node_modules/dedent/dist/dedent.js +73 -0
- package/.output/server/node_modules/dedent/package.json +119 -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/devalue/index.js +3 -0
- package/.output/server/node_modules/devalue/package.json +34 -0
- package/.output/server/node_modules/devalue/src/base64.js +110 -0
- package/.output/server/node_modules/devalue/src/constants.js +6 -0
- package/.output/server/node_modules/devalue/src/parse.js +160 -0
- package/.output/server/node_modules/devalue/src/stringify.js +232 -0
- package/.output/server/node_modules/devalue/src/uneval.js +351 -0
- package/.output/server/node_modules/devalue/src/utils.js +113 -0
- package/.output/server/node_modules/dotenv/lib/main.js +361 -0
- package/.output/server/node_modules/dotenv/package.json +61 -0
- package/.output/server/node_modules/entities/lib/decode.js +536 -0
- package/.output/server/node_modules/entities/lib/decode_codepoint.js +76 -0
- package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +9 -0
- package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
- package/.output/server/node_modules/entities/package.json +90 -0
- package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/.output/server/node_modules/estree-walker/package.json +37 -0
- package/.output/server/node_modules/eventsource-parser/dist/index.js +106 -0
- package/.output/server/node_modules/eventsource-parser/dist/stream.js +29 -0
- package/.output/server/node_modules/eventsource-parser/package.json +115 -0
- package/.output/server/node_modules/file-uri-to-path/index.js +66 -0
- package/.output/server/node_modules/file-uri-to-path/package.json +32 -0
- package/.output/server/node_modules/glob/dist/commonjs/glob.js +247 -0
- package/.output/server/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/.output/server/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/.output/server/node_modules/glob/dist/commonjs/index.js +68 -0
- package/.output/server/node_modules/glob/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/glob/dist/commonjs/pattern.js +219 -0
- package/.output/server/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/.output/server/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/.output/server/node_modules/glob/package.json +99 -0
- package/.output/server/node_modules/has-flag/index.js +8 -0
- package/.output/server/node_modules/has-flag/package.json +46 -0
- package/.output/server/node_modules/hookable/dist/index.mjs +290 -0
- package/.output/server/node_modules/hookable/package.json +49 -0
- package/.output/server/node_modules/inherits/inherits.js +9 -0
- package/.output/server/node_modules/inherits/inherits_browser.js +27 -0
- package/.output/server/node_modules/inherits/package.json +29 -0
- package/.output/server/node_modules/ioredis/built/Command.js +349 -0
- package/.output/server/node_modules/ioredis/built/DataHandler.js +220 -0
- package/.output/server/node_modules/ioredis/built/Pipeline.js +334 -0
- package/.output/server/node_modules/ioredis/built/Redis.js +697 -0
- package/.output/server/node_modules/ioredis/built/ScanStream.js +51 -0
- package/.output/server/node_modules/ioredis/built/Script.js +62 -0
- package/.output/server/node_modules/ioredis/built/SubscriptionSet.js +41 -0
- package/.output/server/node_modules/ioredis/built/autoPipelining.js +159 -0
- package/.output/server/node_modules/ioredis/built/cluster/ClusterOptions.js +22 -0
- package/.output/server/node_modules/ioredis/built/cluster/ClusterSubscriber.js +202 -0
- package/.output/server/node_modules/ioredis/built/cluster/ClusterSubscriberGroup.js +224 -0
- package/.output/server/node_modules/ioredis/built/cluster/ConnectionPool.js +154 -0
- package/.output/server/node_modules/ioredis/built/cluster/DelayQueue.js +53 -0
- package/.output/server/node_modules/ioredis/built/cluster/index.js +862 -0
- package/.output/server/node_modules/ioredis/built/cluster/util.js +100 -0
- package/.output/server/node_modules/ioredis/built/connectors/AbstractConnector.js +26 -0
- package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js +45 -0
- package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js +37 -0
- package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/index.js +305 -0
- package/.output/server/node_modules/ioredis/built/connectors/StandaloneConnector.js +69 -0
- package/.output/server/node_modules/ioredis/built/connectors/index.js +7 -0
- package/.output/server/node_modules/ioredis/built/constants/TLSProfiles.js +149 -0
- package/.output/server/node_modules/ioredis/built/errors/ClusterAllFailedError.js +15 -0
- package/.output/server/node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js +14 -0
- package/.output/server/node_modules/ioredis/built/errors/index.js +5 -0
- package/.output/server/node_modules/ioredis/built/index.js +62 -0
- package/.output/server/node_modules/ioredis/built/redis/RedisOptions.js +55 -0
- package/.output/server/node_modules/ioredis/built/redis/event_handler.js +292 -0
- package/.output/server/node_modules/ioredis/built/transaction.js +93 -0
- package/.output/server/node_modules/ioredis/built/utils/Commander.js +117 -0
- package/.output/server/node_modules/ioredis/built/utils/applyMixin.js +8 -0
- package/.output/server/node_modules/ioredis/built/utils/debug.js +95 -0
- package/.output/server/node_modules/ioredis/built/utils/index.js +297 -0
- package/.output/server/node_modules/ioredis/built/utils/lodash.js +9 -0
- package/.output/server/node_modules/ioredis/package.json +100 -0
- package/.output/server/node_modules/lodash.defaults/index.js +668 -0
- package/.output/server/node_modules/lodash.defaults/package.json +19 -0
- package/.output/server/node_modules/lodash.isarguments/index.js +229 -0
- package/.output/server/node_modules/lodash.isarguments/package.json +19 -0
- package/.output/server/node_modules/lru-cache/dist/commonjs/index.js +1546 -0
- package/.output/server/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/lru-cache/package.json +116 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/ast.js +592 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/escape.js +22 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/index.js +1017 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
- package/.output/server/node_modules/minimatch/package.json +82 -0
- package/.output/server/node_modules/minipass/dist/commonjs/index.js +1028 -0
- package/.output/server/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/minipass/package.json +82 -0
- package/.output/server/node_modules/ms/index.js +162 -0
- package/.output/server/node_modules/ms/package.json +38 -0
- package/.output/server/node_modules/path-scurry/dist/commonjs/index.js +2014 -0
- package/.output/server/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/path-scurry/package.json +89 -0
- package/.output/server/node_modules/pg/lib/client.js +650 -0
- package/.output/server/node_modules/pg/lib/connection-parameters.js +167 -0
- package/.output/server/node_modules/pg/lib/connection.js +222 -0
- package/.output/server/node_modules/pg/lib/crypto/cert-signatures.js +121 -0
- package/.output/server/node_modules/pg/lib/crypto/sasl.js +212 -0
- package/.output/server/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
- package/.output/server/node_modules/pg/lib/crypto/utils-webcrypto.js +88 -0
- package/.output/server/node_modules/pg/lib/crypto/utils.js +9 -0
- package/.output/server/node_modules/pg/lib/defaults.js +84 -0
- package/.output/server/node_modules/pg/lib/index.js +58 -0
- package/.output/server/node_modules/pg/lib/native/client.js +307 -0
- package/.output/server/node_modules/pg/lib/native/index.js +2 -0
- package/.output/server/node_modules/pg/lib/native/query.js +168 -0
- package/.output/server/node_modules/pg/lib/query.js +253 -0
- package/.output/server/node_modules/pg/lib/result.js +108 -0
- package/.output/server/node_modules/pg/lib/stream.js +81 -0
- package/.output/server/node_modules/pg/lib/type-overrides.js +35 -0
- package/.output/server/node_modules/pg/lib/utils.js +206 -0
- package/.output/server/node_modules/pg/package.json +62 -0
- package/.output/server/node_modules/pg-cloudflare/dist/empty.js +4 -0
- package/.output/server/node_modules/pg-cloudflare/package.json +32 -0
- package/.output/server/node_modules/pg-connection-string/index.js +112 -0
- package/.output/server/node_modules/pg-connection-string/package.json +40 -0
- package/.output/server/node_modules/pg-cursor/index.js +265 -0
- package/.output/server/node_modules/pg-cursor/package.json +38 -0
- package/.output/server/node_modules/pg-int8/index.js +100 -0
- package/.output/server/node_modules/pg-int8/package.json +24 -0
- package/.output/server/node_modules/pg-pool/index.js +471 -0
- package/.output/server/node_modules/pg-pool/package.json +41 -0
- package/.output/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
- package/.output/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
- package/.output/server/node_modules/pg-protocol/dist/index.js +15 -0
- package/.output/server/node_modules/pg-protocol/dist/messages.js +160 -0
- package/.output/server/node_modules/pg-protocol/dist/parser.js +304 -0
- package/.output/server/node_modules/pg-protocol/dist/serializer.js +189 -0
- package/.output/server/node_modules/pg-protocol/package.json +35 -0
- package/.output/server/node_modules/pg-query-stream/dist/index.js +48 -0
- package/.output/server/node_modules/pg-query-stream/package.json +60 -0
- package/.output/server/node_modules/pg-types/index.js +47 -0
- package/.output/server/node_modules/pg-types/lib/arrayParser.js +11 -0
- package/.output/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
- package/.output/server/node_modules/pg-types/lib/builtins.js +73 -0
- package/.output/server/node_modules/pg-types/lib/textParsers.js +215 -0
- package/.output/server/node_modules/pg-types/package.json +42 -0
- package/.output/server/node_modules/pgpass/lib/helper.js +233 -0
- package/.output/server/node_modules/pgpass/lib/index.js +23 -0
- package/.output/server/node_modules/pgpass/package.json +41 -0
- package/.output/server/node_modules/postgres-array/index.js +97 -0
- package/.output/server/node_modules/postgres-array/package.json +35 -0
- package/.output/server/node_modules/postgres-bytea/index.js +31 -0
- package/.output/server/node_modules/postgres-bytea/package.json +34 -0
- package/.output/server/node_modules/postgres-date/index.js +116 -0
- package/.output/server/node_modules/postgres-date/package.json +33 -0
- package/.output/server/node_modules/postgres-interval/index.js +125 -0
- package/.output/server/node_modules/postgres-interval/package.json +36 -0
- package/.output/server/node_modules/redis-errors/index.js +7 -0
- package/.output/server/node_modules/redis-errors/lib/modern.js +59 -0
- package/.output/server/node_modules/redis-errors/lib/old.js +119 -0
- package/.output/server/node_modules/redis-errors/package.json +41 -0
- package/.output/server/node_modules/redis-parser/index.js +3 -0
- package/.output/server/node_modules/redis-parser/lib/parser.js +552 -0
- package/.output/server/node_modules/redis-parser/package.json +53 -0
- package/.output/server/node_modules/reflect-metadata/Reflect.js +1415 -0
- package/.output/server/node_modules/reflect-metadata/package.json +68 -0
- package/.output/server/node_modules/safe-buffer/index.js +65 -0
- package/.output/server/node_modules/safe-buffer/package.json +51 -0
- package/.output/server/node_modules/sha.js/hash.js +81 -0
- package/.output/server/node_modules/sha.js/index.js +15 -0
- package/.output/server/node_modules/sha.js/package.json +30 -0
- package/.output/server/node_modules/sha.js/sha.js +94 -0
- package/.output/server/node_modules/sha.js/sha1.js +99 -0
- package/.output/server/node_modules/sha.js/sha224.js +53 -0
- package/.output/server/node_modules/sha.js/sha256.js +135 -0
- package/.output/server/node_modules/sha.js/sha384.js +57 -0
- package/.output/server/node_modules/sha.js/sha512.js +260 -0
- package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
- package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
- package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
- package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
- package/.output/server/node_modules/source-map-js/package.json +71 -0
- package/.output/server/node_modules/source-map-js/source-map.js +8 -0
- package/.output/server/node_modules/split2/index.js +141 -0
- package/.output/server/node_modules/split2/package.json +39 -0
- package/.output/server/node_modules/sql-highlight/lib/escapeHtml.js +59 -0
- package/.output/server/node_modules/sql-highlight/lib/index.js +85 -0
- package/.output/server/node_modules/sql-highlight/lib/keywords.js +145 -0
- package/.output/server/node_modules/sql-highlight/package.json +49 -0
- package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node +0 -0
- package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node.bak +0 -0
- package/.output/server/node_modules/sqlite3/lib/sqlite3-binding.js +1 -0
- package/.output/server/node_modules/sqlite3/lib/sqlite3.js +207 -0
- package/.output/server/node_modules/sqlite3/lib/trace.js +38 -0
- package/.output/server/node_modules/sqlite3/package.json +89 -0
- package/.output/server/node_modules/standard-as-callback/built/index.js +41 -0
- package/.output/server/node_modules/standard-as-callback/built/utils.js +23 -0
- package/.output/server/node_modules/standard-as-callback/package.json +40 -0
- package/.output/server/node_modules/supports-color/index.js +152 -0
- package/.output/server/node_modules/supports-color/package.json +58 -0
- package/.output/server/node_modules/tslib/package.json +47 -0
- package/.output/server/node_modules/tslib/tslib.js +484 -0
- package/.output/server/node_modules/typeorm/cache/DbQueryResultCache.js +264 -0
- package/.output/server/node_modules/typeorm/cache/QueryResultCacheFactory.js +42 -0
- package/.output/server/node_modules/typeorm/cache/RedisQueryResultCache.js +197 -0
- package/.output/server/node_modules/typeorm/common/DeepPartial.js +4 -0
- package/.output/server/node_modules/typeorm/common/EntityTarget.js +4 -0
- package/.output/server/node_modules/typeorm/common/MixedList.js +4 -0
- package/.output/server/node_modules/typeorm/common/ObjectLiteral.js +4 -0
- package/.output/server/node_modules/typeorm/common/ObjectType.js +4 -0
- package/.output/server/node_modules/typeorm/common/RelationType.js +4 -0
- package/.output/server/node_modules/typeorm/connection/Connection.js +16 -0
- package/.output/server/node_modules/typeorm/connection/ConnectionManager.js +66 -0
- package/.output/server/node_modules/typeorm/connection/ConnectionMetadataBuilder.js +74 -0
- package/.output/server/node_modules/typeorm/connection/ConnectionOptionsReader.js +198 -0
- package/.output/server/node_modules/typeorm/connection/options-reader/ConnectionOptionsEnvReader.js +111 -0
- package/.output/server/node_modules/typeorm/container.js +60 -0
- package/.output/server/node_modules/typeorm/data-source/DataSource.js +517 -0
- package/.output/server/node_modules/typeorm/decorator/Check.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/EntityRepository.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/Exclusion.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/ForeignKey.js +44 -0
- package/.output/server/node_modules/typeorm/decorator/Generated.js +24 -0
- package/.output/server/node_modules/typeorm/decorator/Index.js +56 -0
- package/.output/server/node_modules/typeorm/decorator/Unique.js +50 -0
- package/.output/server/node_modules/typeorm/decorator/columns/Column.js +78 -0
- package/.output/server/node_modules/typeorm/decorator/columns/CreateDateColumn.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/columns/DeleteDateColumn.js +20 -0
- package/.output/server/node_modules/typeorm/decorator/columns/ObjectIdColumn.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/columns/PrimaryColumn.js +63 -0
- package/.output/server/node_modules/typeorm/decorator/columns/PrimaryGeneratedColumn.js +59 -0
- package/.output/server/node_modules/typeorm/decorator/columns/UpdateDateColumn.js +20 -0
- package/.output/server/node_modules/typeorm/decorator/columns/VersionColumn.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/columns/ViewColumn.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/columns/VirtualColumn.js +49 -0
- package/.output/server/node_modules/typeorm/decorator/entity/ChildEntity.js +25 -0
- package/.output/server/node_modules/typeorm/decorator/entity/Entity.js +31 -0
- package/.output/server/node_modules/typeorm/decorator/entity/TableInheritance.js +22 -0
- package/.output/server/node_modules/typeorm/decorator/entity-view/ViewEntity.js +32 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterInsert.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterLoad.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterRecover.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterSoftRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterUpdate.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeInsert.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeRecover.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeSoftRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeUpdate.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/EventSubscriber.js +17 -0
- package/.output/server/node_modules/typeorm/decorator/options/ColumnOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/EntityOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/IndexOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/JoinColumnOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/JoinTableOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/RelationOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/ValueTransformer.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/relations/JoinColumn.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/relations/JoinTable.js +34 -0
- package/.output/server/node_modules/typeorm/decorator/relations/ManyToMany.js +46 -0
- package/.output/server/node_modules/typeorm/decorator/relations/ManyToOne.js +46 -0
- package/.output/server/node_modules/typeorm/decorator/relations/OneToMany.js +37 -0
- package/.output/server/node_modules/typeorm/decorator/relations/OneToOne.js +45 -0
- package/.output/server/node_modules/typeorm/decorator/relations/RelationCount.js +23 -0
- package/.output/server/node_modules/typeorm/decorator/relations/RelationId.js +22 -0
- package/.output/server/node_modules/typeorm/decorator/tree/Tree.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/tree/TreeChildren.js +34 -0
- package/.output/server/node_modules/typeorm/decorator/tree/TreeLevelColumn.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/tree/TreeParent.js +33 -0
- package/.output/server/node_modules/typeorm/driver/DriverFactory.js +98 -0
- package/.output/server/node_modules/typeorm/driver/DriverUtils.js +228 -0
- package/.output/server/node_modules/typeorm/driver/Query.js +16 -0
- package/.output/server/node_modules/typeorm/driver/SqlInMemory.js +15 -0
- package/.output/server/node_modules/typeorm/driver/aurora-mysql/AuroraMysqlDriver.js +847 -0
- package/.output/server/node_modules/typeorm/driver/aurora-mysql/AuroraMysqlQueryRunner.js +1709 -0
- package/.output/server/node_modules/typeorm/driver/aurora-postgres/AuroraPostgresDriver.js +103 -0
- package/.output/server/node_modules/typeorm/driver/aurora-postgres/AuroraPostgresQueryRunner.js +146 -0
- package/.output/server/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3Driver.js +153 -0
- package/.output/server/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.js +126 -0
- package/.output/server/node_modules/typeorm/driver/capacitor/CapacitorDriver.js +78 -0
- package/.output/server/node_modules/typeorm/driver/capacitor/CapacitorQueryRunner.js +98 -0
- package/.output/server/node_modules/typeorm/driver/cockroachdb/CockroachDriver.js +885 -0
- package/.output/server/node_modules/typeorm/driver/cockroachdb/CockroachQueryRunner.js +2453 -0
- package/.output/server/node_modules/typeorm/driver/cordova/CordovaDriver.js +76 -0
- package/.output/server/node_modules/typeorm/driver/cordova/CordovaQueryRunner.js +170 -0
- package/.output/server/node_modules/typeorm/driver/expo/ExpoDriver.js +29 -0
- package/.output/server/node_modules/typeorm/driver/expo/ExpoDriverFactory.js +22 -0
- package/.output/server/node_modules/typeorm/driver/expo/ExpoQueryRunner.js +65 -0
- package/.output/server/node_modules/typeorm/driver/expo/legacy/ExpoLegacyDriver.js +75 -0
- package/.output/server/node_modules/typeorm/driver/expo/legacy/ExpoLegacyQueryRunner.js +169 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/MongoDriver.js +404 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/MongoQueryRunner.js +701 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/bson.typings.js +5 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/typings.js +23 -0
- package/.output/server/node_modules/typeorm/driver/mysql/MysqlDriver.js +1105 -0
- package/.output/server/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js +2139 -0
- package/.output/server/node_modules/typeorm/driver/nativescript/NativescriptDriver.js +94 -0
- package/.output/server/node_modules/typeorm/driver/nativescript/NativescriptQueryRunner.js +92 -0
- package/.output/server/node_modules/typeorm/driver/oracle/OracleDriver.js +869 -0
- package/.output/server/node_modules/typeorm/driver/oracle/OracleQueryRunner.js +1884 -0
- package/.output/server/node_modules/typeorm/driver/postgres/PostgresDriver.js +1259 -0
- package/.output/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js +2729 -0
- package/.output/server/node_modules/typeorm/driver/react-native/ReactNativeDriver.js +728 -0
- package/.output/server/node_modules/typeorm/driver/react-native/ReactNativeQueryRunner.js +107 -0
- package/.output/server/node_modules/typeorm/driver/sap/SapDriver.js +681 -0
- package/.output/server/node_modules/typeorm/driver/sap/SapQueryRunner.js +2054 -0
- package/.output/server/node_modules/typeorm/driver/spanner/SpannerDriver.js +613 -0
- package/.output/server/node_modules/typeorm/driver/spanner/SpannerQueryRunner.js +1464 -0
- package/.output/server/node_modules/typeorm/driver/sqlite/SqliteDriver.js +174 -0
- package/.output/server/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js +124 -0
- package/.output/server/node_modules/typeorm/driver/sqlite-abstract/AbstractSqliteDriver.js +695 -0
- package/.output/server/node_modules/typeorm/driver/sqlite-abstract/AbstractSqliteQueryRunner.js +1511 -0
- package/.output/server/node_modules/typeorm/driver/sqljs/SqljsDriver.js +250 -0
- package/.output/server/node_modules/typeorm/driver/sqljs/SqljsQueryRunner.js +123 -0
- package/.output/server/node_modules/typeorm/driver/sqlserver/MssqlParameter.js +23 -0
- package/.output/server/node_modules/typeorm/driver/sqlserver/SqlServerDriver.js +922 -0
- package/.output/server/node_modules/typeorm/driver/sqlserver/SqlServerQueryRunner.js +2484 -0
- package/.output/server/node_modules/typeorm/driver/types/DatabaseType.js +4 -0
- package/.output/server/node_modules/typeorm/driver/types/GeoJsonTypes.js +4 -0
- package/.output/server/node_modules/typeorm/driver/types/MetadataTableType.js +11 -0
- package/.output/server/node_modules/typeorm/driver/types/ReplicationMode.js +4 -0
- package/.output/server/node_modules/typeorm/entity-manager/EntityManager.js +853 -0
- package/.output/server/node_modules/typeorm/entity-manager/EntityManagerFactory.js +24 -0
- package/.output/server/node_modules/typeorm/entity-manager/MongoEntityManager.js +668 -0
- package/.output/server/node_modules/typeorm/entity-manager/SqljsEntityManager.js +44 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchema.js +15 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaEmbeddedColumnOptions.js +8 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaEmbeddedError.js +18 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaOptions.js +11 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaTransformer.js +333 -0
- package/.output/server/node_modules/typeorm/error/AlreadyHasActiveConnectionError.js +16 -0
- package/.output/server/node_modules/typeorm/error/CannotAttachTreeChildrenEntityError.js +16 -0
- package/.output/server/node_modules/typeorm/error/CannotConnectAlreadyConnectedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CannotCreateEntityIdMapError.js +21 -0
- package/.output/server/node_modules/typeorm/error/CannotDetermineEntityError.js +16 -0
- package/.output/server/node_modules/typeorm/error/CannotExecuteNotConnectedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CannotGetEntityManagerNotConnectedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CannotReflectMethodParameterTypeError.js +18 -0
- package/.output/server/node_modules/typeorm/error/CircularRelationsError.js +16 -0
- package/.output/server/node_modules/typeorm/error/ColumnTypeUndefinedError.js +19 -0
- package/.output/server/node_modules/typeorm/error/ConnectionIsNotSetError.js +15 -0
- package/.output/server/node_modules/typeorm/error/ConnectionNotFoundError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CustomRepositoryCannotInheritRepositoryError.js +18 -0
- package/.output/server/node_modules/typeorm/error/CustomRepositoryDoesNotHaveEntityError.js +18 -0
- package/.output/server/node_modules/typeorm/error/CustomRepositoryNotFoundError.js +18 -0
- package/.output/server/node_modules/typeorm/error/DataTypeNotSupportedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/DriverOptionNotSetError.js +16 -0
- package/.output/server/node_modules/typeorm/error/DriverPackageNotInstalledError.js +16 -0
- package/.output/server/node_modules/typeorm/error/EntityMetadataNotFoundError.js +29 -0
- package/.output/server/node_modules/typeorm/error/EntityNotFoundError.js +42 -0
- package/.output/server/node_modules/typeorm/error/EntityPropertyNotFoundError.js +17 -0
- package/.output/server/node_modules/typeorm/error/FindRelationsNotFoundError.js +23 -0
- package/.output/server/node_modules/typeorm/error/ForbiddenTransactionModeOverrideError.js +16 -0
- package/.output/server/node_modules/typeorm/error/InitializedRelationError.js +20 -0
- package/.output/server/node_modules/typeorm/error/InsertValuesMissingError.js +16 -0
- package/.output/server/node_modules/typeorm/error/LimitOnUpdateNotSupportedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/LockNotSupportedOnGivenDriverError.js +15 -0
- package/.output/server/node_modules/typeorm/error/MetadataAlreadyExistsError.js +18 -0
- package/.output/server/node_modules/typeorm/error/MetadataWithSuchNameAlreadyExistsError.js +16 -0
- package/.output/server/node_modules/typeorm/error/MissingDeleteDateColumnError.js +12 -0
- package/.output/server/node_modules/typeorm/error/MissingDriverError.js +16 -0
- package/.output/server/node_modules/typeorm/error/MissingJoinColumnError.js +23 -0
- package/.output/server/node_modules/typeorm/error/MissingJoinTableError.js +23 -0
- package/.output/server/node_modules/typeorm/error/MissingPrimaryColumnError.js +13 -0
- package/.output/server/node_modules/typeorm/error/MustBeEntityError.js +15 -0
- package/.output/server/node_modules/typeorm/error/NestedSetMultipleRootError.js +12 -0
- package/.output/server/node_modules/typeorm/error/NoConnectionForRepositoryError.js +16 -0
- package/.output/server/node_modules/typeorm/error/NoConnectionOptionError.js +16 -0
- package/.output/server/node_modules/typeorm/error/NoNeedToReleaseEntityManagerError.js +17 -0
- package/.output/server/node_modules/typeorm/error/NoVersionOrUpdateDateColumnError.js +15 -0
- package/.output/server/node_modules/typeorm/error/OffsetWithoutLimitNotSupportedError.js +17 -0
- package/.output/server/node_modules/typeorm/error/OptimisticLockCanNotBeUsedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/OptimisticLockVersionMismatchError.js +15 -0
- package/.output/server/node_modules/typeorm/error/PersistedEntityNotFoundError.js +15 -0
- package/.output/server/node_modules/typeorm/error/PessimisticLockTransactionRequiredError.js +15 -0
- package/.output/server/node_modules/typeorm/error/PrimaryColumnCannotBeNullableError.js +13 -0
- package/.output/server/node_modules/typeorm/error/QueryFailedError.js +30 -0
- package/.output/server/node_modules/typeorm/error/QueryRunnerAlreadyReleasedError.js +12 -0
- package/.output/server/node_modules/typeorm/error/QueryRunnerProviderAlreadyReleasedError.js +16 -0
- package/.output/server/node_modules/typeorm/error/RepositoryNotTreeError.js +32 -0
- package/.output/server/node_modules/typeorm/error/ReturningStatementNotSupportedError.js +16 -0
- package/.output/server/node_modules/typeorm/error/SubjectRemovedAndUpdatedError.js +16 -0
- package/.output/server/node_modules/typeorm/error/SubjectWithoutIdentifierError.js +17 -0
- package/.output/server/node_modules/typeorm/error/TransactionAlreadyStartedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/TransactionNotStartedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/TreeRepositoryNotSupportedError.js +12 -0
- package/.output/server/node_modules/typeorm/error/TypeORMError.js +23 -0
- package/.output/server/node_modules/typeorm/error/UpdateValuesMissingError.js +12 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinColumnIsNotAllowedError.js +13 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinColumnOnlyOnOneSideAllowedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinTableIsNotAllowedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinTableOnlyOnOneSideAllowedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/index.js +66 -0
- package/.output/server/node_modules/typeorm/find-options/EqualOperator.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/FindManyOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOneOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOperator.js +96 -0
- package/.output/server/node_modules/typeorm/find-options/FindOperatorType.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsOrder.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsRelations.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsSelect.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsUtils.js +350 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsWhere.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindTreeOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/JoinOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/OrderByCondition.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/operator/And.js +9 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Any.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ArrayContainedBy.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ArrayContains.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ArrayOverlap.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Between.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Equal.js +17 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ILike.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/In.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/IsNull.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/JsonContains.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/LessThan.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/LessThanOrEqual.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Like.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/MoreThan.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/MoreThanOrEqual.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Not.js +14 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Or.js +9 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Raw.js +12 -0
- package/.output/server/node_modules/typeorm/globals.js +182 -0
- package/.output/server/node_modules/typeorm/index.js +196 -0
- package/.output/server/node_modules/typeorm/index.mjs +422 -0
- package/.output/server/node_modules/typeorm/logger/AbstractLogger.js +238 -0
- package/.output/server/node_modules/typeorm/logger/AdvancedConsoleLogger.js +56 -0
- package/.output/server/node_modules/typeorm/logger/DebugLogger.js +78 -0
- package/.output/server/node_modules/typeorm/logger/FileLogger.js +88 -0
- package/.output/server/node_modules/typeorm/logger/FormattedConsoleLogger.js +59 -0
- package/.output/server/node_modules/typeorm/logger/Logger.js +4 -0
- package/.output/server/node_modules/typeorm/logger/LoggerFactory.js +39 -0
- package/.output/server/node_modules/typeorm/logger/LoggerOptions.js +4 -0
- package/.output/server/node_modules/typeorm/logger/SimpleConsoleLogger.js +57 -0
- package/.output/server/node_modules/typeorm/metadata/CheckMetadata.js +35 -0
- package/.output/server/node_modules/typeorm/metadata/ColumnMetadata.js +618 -0
- package/.output/server/node_modules/typeorm/metadata/EmbeddedMetadata.js +224 -0
- package/.output/server/node_modules/typeorm/metadata/EntityListenerMetadata.js +77 -0
- package/.output/server/node_modules/typeorm/metadata/EntityMetadata.js +692 -0
- package/.output/server/node_modules/typeorm/metadata/ExclusionMetadata.js +35 -0
- package/.output/server/node_modules/typeorm/metadata/ForeignKeyMetadata.js +57 -0
- package/.output/server/node_modules/typeorm/metadata/IndexMetadata.js +144 -0
- package/.output/server/node_modules/typeorm/metadata/RelationCountMetadata.js +39 -0
- package/.output/server/node_modules/typeorm/metadata/RelationIdMetadata.js +62 -0
- package/.output/server/node_modules/typeorm/metadata/RelationMetadata.js +440 -0
- package/.output/server/node_modules/typeorm/metadata/UniqueMetadata.js +101 -0
- package/.output/server/node_modules/typeorm/metadata/types/EventListenerTypes.js +22 -0
- package/.output/server/node_modules/typeorm/metadata-args/MetadataArgsStorage.js +236 -0
- package/.output/server/node_modules/typeorm/metadata-builder/ClosureJunctionEntityMetadataBuilder.js +145 -0
- package/.output/server/node_modules/typeorm/metadata-builder/EntityMetadataBuilder.js +838 -0
- package/.output/server/node_modules/typeorm/metadata-builder/EntityMetadataValidator.js +258 -0
- package/.output/server/node_modules/typeorm/metadata-builder/JunctionEntityMetadataBuilder.js +287 -0
- package/.output/server/node_modules/typeorm/metadata-builder/MetadataUtils.js +44 -0
- package/.output/server/node_modules/typeorm/metadata-builder/RelationJoinColumnBuilder.js +185 -0
- package/.output/server/node_modules/typeorm/migration/Migration.js +21 -0
- package/.output/server/node_modules/typeorm/migration/MigrationExecutor.js +534 -0
- package/.output/server/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.js +145 -0
- package/.output/server/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.js +50 -0
- package/.output/server/node_modules/typeorm/package.json +268 -0
- package/.output/server/node_modules/typeorm/persistence/EntityPersistExecutor.js +170 -0
- package/.output/server/node_modules/typeorm/persistence/Subject.js +239 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectChangedColumnsComputer.js +216 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectDatabaseEntityLoader.js +135 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectExecutor.js +760 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectTopologicalSorter.js +174 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/CascadesSubjectBuilder.js +107 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/ManyToManySubjectBuilder.js +218 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js +181 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/OneToOneInverseSideSubjectBuilder.js +155 -0
- package/.output/server/node_modules/typeorm/persistence/tree/ClosureSubjectExecutor.js +241 -0
- package/.output/server/node_modules/typeorm/persistence/tree/MaterializedPathSubjectExecutor.js +125 -0
- package/.output/server/node_modules/typeorm/persistence/tree/NestedSetSubjectExecutor.js +271 -0
- package/.output/server/node_modules/typeorm/platform/PlatformTools.js +243 -0
- package/.output/server/node_modules/typeorm/query-builder/Alias.js +29 -0
- package/.output/server/node_modules/typeorm/query-builder/Brackets.js +19 -0
- package/.output/server/node_modules/typeorm/query-builder/DeleteQueryBuilder.js +200 -0
- package/.output/server/node_modules/typeorm/query-builder/InsertQueryBuilder.js +745 -0
- package/.output/server/node_modules/typeorm/query-builder/JoinAttribute.js +175 -0
- package/.output/server/node_modules/typeorm/query-builder/NotBrackets.js +17 -0
- package/.output/server/node_modules/typeorm/query-builder/QueryBuilder.js +1139 -0
- package/.output/server/node_modules/typeorm/query-builder/QueryBuilderUtils.js +32 -0
- package/.output/server/node_modules/typeorm/query-builder/QueryExpressionMap.js +328 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationIdLoader.js +503 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationLoader.js +283 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationQueryBuilder.js +155 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationRemover.js +143 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationUpdater.js +152 -0
- package/.output/server/node_modules/typeorm/query-builder/ReturningResultsEntityUpdator.js +176 -0
- package/.output/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js +2656 -0
- package/.output/server/node_modules/typeorm/query-builder/SoftDeleteQueryBuilder.js +368 -0
- package/.output/server/node_modules/typeorm/query-builder/UpdateQueryBuilder.js +498 -0
- package/.output/server/node_modules/typeorm/query-builder/index.js +20 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountAttribute.js +80 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountLoader.js +168 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountMetadataToAttributeTransformer.js +55 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdAttribute.js +88 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdLoader.js +275 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdMetadataToAttributeTransformer.js +55 -0
- package/.output/server/node_modules/typeorm/query-builder/result/DeleteResult.js +17 -0
- package/.output/server/node_modules/typeorm/query-builder/result/InsertResult.js +28 -0
- package/.output/server/node_modules/typeorm/query-builder/result/UpdateResult.js +29 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/DocumentToEntityTransformer.js +196 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.js +112 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/PlainObjectToNewEntityTransformer.js +92 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/RawSqlResultsToEntityTransformer.js +447 -0
- package/.output/server/node_modules/typeorm/query-runner/BaseQueryRunner.js +454 -0
- package/.output/server/node_modules/typeorm/query-runner/QueryLock.js +28 -0
- package/.output/server/node_modules/typeorm/query-runner/QueryResult.js +17 -0
- package/.output/server/node_modules/typeorm/repository/AbstractRepository.js +92 -0
- package/.output/server/node_modules/typeorm/repository/BaseEntity.js +328 -0
- package/.output/server/node_modules/typeorm/repository/MongoRepository.js +305 -0
- package/.output/server/node_modules/typeorm/repository/RemoveOptions.js +4 -0
- package/.output/server/node_modules/typeorm/repository/Repository.js +379 -0
- package/.output/server/node_modules/typeorm/repository/SaveOptions.js +4 -0
- package/.output/server/node_modules/typeorm/repository/TreeRepository.js +255 -0
- package/.output/server/node_modules/typeorm/schema-builder/MongoSchemaBuilder.js +66 -0
- package/.output/server/node_modules/typeorm/schema-builder/RdbmsSchemaBuilder.js +929 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableCheckOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableColumnOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableExclusionOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableForeignKeyOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableIndexOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableUniqueOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/ViewOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/Table.js +296 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableCheck.js +49 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableColumn.js +117 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableExclusion.js +43 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableForeignKey.js +72 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableIndex.js +68 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableUnique.js +50 -0
- package/.output/server/node_modules/typeorm/schema-builder/util/TableUtils.js +41 -0
- package/.output/server/node_modules/typeorm/schema-builder/util/ViewUtils.js +27 -0
- package/.output/server/node_modules/typeorm/schema-builder/view/View.js +71 -0
- package/.output/server/node_modules/typeorm/subscriber/Broadcaster.js +660 -0
- package/.output/server/node_modules/typeorm/subscriber/BroadcasterResult.js +30 -0
- package/.output/server/node_modules/typeorm/subscriber/event/QueryEvent.js +4 -0
- package/.output/server/node_modules/typeorm/util/ApplyValueTransformers.js +25 -0
- package/.output/server/node_modules/typeorm/util/DateUtils.js +229 -0
- package/.output/server/node_modules/typeorm/util/DepGraph.js +230 -0
- package/.output/server/node_modules/typeorm/util/DirectoryExportedClassesLoader.js +65 -0
- package/.output/server/node_modules/typeorm/util/ImportUtils.js +66 -0
- package/.output/server/node_modules/typeorm/util/InstanceChecker.js +104 -0
- package/.output/server/node_modules/typeorm/util/ObjectUtils.js +49 -0
- package/.output/server/node_modules/typeorm/util/OrmUtils.js +443 -0
- package/.output/server/node_modules/typeorm/util/PathUtils.js +33 -0
- package/.output/server/node_modules/typeorm/util/RandomGenerator.js +154 -0
- package/.output/server/node_modules/typeorm/util/SqlTagUtils.js +43 -0
- package/.output/server/node_modules/typeorm/util/StringUtils.js +113 -0
- package/.output/server/node_modules/typeorm/util/TreeRepositoryUtils.js +67 -0
- package/.output/server/node_modules/typeorm/util/VersionUtils.js +27 -0
- package/.output/server/node_modules/typeorm/util/escapeRegExp.js +10 -0
- package/.output/server/node_modules/ufo/dist/index.mjs +630 -0
- package/.output/server/node_modules/ufo/package.json +47 -0
- package/.output/server/node_modules/unhead/dist/plugins.mjs +94 -0
- package/.output/server/node_modules/unhead/dist/server.mjs +220 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.C13swrCa.mjs +48 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.Cp0iF6eN.mjs +177 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DGkFBTYv.mjs +172 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DZbvapt-.mjs +70 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DeCxexjU.mjs +166 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
- package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
- package/.output/server/node_modules/unhead/package.json +101 -0
- package/.output/server/node_modules/uuid/dist/cjs/index.js +31 -0
- package/.output/server/node_modules/uuid/dist/cjs/max.js +3 -0
- package/.output/server/node_modules/uuid/dist/cjs/md5.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/native.js +4 -0
- package/.output/server/node_modules/uuid/dist/cjs/nil.js +3 -0
- package/.output/server/node_modules/uuid/dist/cjs/package.json +1 -0
- package/.output/server/node_modules/uuid/dist/cjs/parse.js +11 -0
- package/.output/server/node_modules/uuid/dist/cjs/regex.js +3 -0
- package/.output/server/node_modules/uuid/dist/cjs/rng.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/sha1.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/stringify.js +39 -0
- package/.output/server/node_modules/uuid/dist/cjs/v1.js +87 -0
- package/.output/server/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/v3.js +14 -0
- package/.output/server/node_modules/uuid/dist/cjs/v35.js +41 -0
- package/.output/server/node_modules/uuid/dist/cjs/v4.js +29 -0
- package/.output/server/node_modules/uuid/dist/cjs/v5.js +14 -0
- package/.output/server/node_modules/uuid/dist/cjs/v6.js +19 -0
- package/.output/server/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/v7.js +69 -0
- package/.output/server/node_modules/uuid/dist/cjs/validate.js +7 -0
- package/.output/server/node_modules/uuid/dist/cjs/version.js +10 -0
- package/.output/server/node_modules/uuid/package.json +132 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/.output/server/node_modules/vue/index.js +7 -0
- package/.output/server/node_modules/vue/index.mjs +1 -0
- package/.output/server/node_modules/vue/package.json +112 -0
- package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
- package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +196 -0
- package/.output/server/node_modules/vue-bundle-renderer/package.json +50 -0
- package/.output/server/node_modules/xtend/mutable.js +17 -0
- package/.output/server/node_modules/xtend/package.json +55 -0
- package/.output/server/node_modules/zod/index.js +4 -0
- package/.output/server/node_modules/zod/package.json +135 -0
- package/.output/server/node_modules/zod/v3/ZodError.js +133 -0
- package/.output/server/node_modules/zod/v3/errors.js +9 -0
- package/.output/server/node_modules/zod/v3/external.js +6 -0
- package/.output/server/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/.output/server/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/.output/server/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/.output/server/node_modules/zod/v3/helpers/util.js +133 -0
- package/.output/server/node_modules/zod/v3/index.js +4 -0
- package/.output/server/node_modules/zod/v3/locales/en.js +109 -0
- package/.output/server/node_modules/zod/v3/package.json +6 -0
- package/.output/server/node_modules/zod/v3/types.js +3695 -0
- package/.output/server/node_modules/zod/v4/classic/checks.js +1 -0
- package/.output/server/node_modules/zod/v4/classic/coerce.js +17 -0
- package/.output/server/node_modules/zod/v4/classic/compat.js +31 -0
- package/.output/server/node_modules/zod/v4/classic/errors.js +48 -0
- package/.output/server/node_modules/zod/v4/classic/external.js +20 -0
- package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/.output/server/node_modules/zod/v4/classic/index.js +4 -0
- package/.output/server/node_modules/zod/v4/classic/iso.js +30 -0
- package/.output/server/node_modules/zod/v4/classic/package.json +6 -0
- package/.output/server/node_modules/zod/v4/classic/parse.js +15 -0
- package/.output/server/node_modules/zod/v4/classic/schemas.js +1157 -0
- package/.output/server/node_modules/zod/v4/core/api.js +1082 -0
- package/.output/server/node_modules/zod/v4/core/checks.js +575 -0
- package/.output/server/node_modules/zod/v4/core/core.js +76 -0
- package/.output/server/node_modules/zod/v4/core/doc.js +35 -0
- package/.output/server/node_modules/zod/v4/core/errors.js +182 -0
- package/.output/server/node_modules/zod/v4/core/index.js +16 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/.output/server/node_modules/zod/v4/core/json-schema.js +1 -0
- package/.output/server/node_modules/zod/v4/core/package.json +6 -0
- package/.output/server/node_modules/zod/v4/core/parse.js +93 -0
- package/.output/server/node_modules/zod/v4/core/regexes.js +133 -0
- package/.output/server/node_modules/zod/v4/core/registries.js +51 -0
- package/.output/server/node_modules/zod/v4/core/schemas.js +2095 -0
- package/.output/server/node_modules/zod/v4/core/to-json-schema.js +437 -0
- package/.output/server/node_modules/zod/v4/core/util.js +651 -0
- package/.output/server/node_modules/zod/v4/core/versions.js +5 -0
- package/.output/server/node_modules/zod/v4/index.js +3 -0
- package/.output/server/node_modules/zod/v4/locales/ar.js +106 -0
- package/.output/server/node_modules/zod/v4/locales/az.js +105 -0
- package/.output/server/node_modules/zod/v4/locales/be.js +156 -0
- package/.output/server/node_modules/zod/v4/locales/bg.js +120 -0
- package/.output/server/node_modules/zod/v4/locales/ca.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/cs.js +111 -0
- package/.output/server/node_modules/zod/v4/locales/da.js +115 -0
- package/.output/server/node_modules/zod/v4/locales/de.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/en.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/eo.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/es.js +132 -0
- package/.output/server/node_modules/zod/v4/locales/fa.js +114 -0
- package/.output/server/node_modules/zod/v4/locales/fi.js +112 -0
- package/.output/server/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/fr.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/he.js +214 -0
- package/.output/server/node_modules/zod/v4/locales/hu.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/hy.js +147 -0
- package/.output/server/node_modules/zod/v4/locales/id.js +106 -0
- package/.output/server/node_modules/zod/v4/locales/index.js +49 -0
- package/.output/server/node_modules/zod/v4/locales/is.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/it.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ja.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/ka.js +112 -0
- package/.output/server/node_modules/zod/v4/locales/kh.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/km.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/ko.js +111 -0
- package/.output/server/node_modules/zod/v4/locales/lt.js +203 -0
- package/.output/server/node_modules/zod/v4/locales/mk.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/ms.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/nl.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/no.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ota.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/package.json +6 -0
- package/.output/server/node_modules/zod/v4/locales/pl.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/ps.js +114 -0
- package/.output/server/node_modules/zod/v4/locales/pt.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ru.js +156 -0
- package/.output/server/node_modules/zod/v4/locales/sl.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/sv.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/ta.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/th.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/tr.js +105 -0
- package/.output/server/node_modules/zod/v4/locales/ua.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/uk.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ur.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/uz.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/vi.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/yo.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/.output/server/node_modules/zod/v4/package.json +6 -0
- package/.output/server/package.json +95 -0
- package/README.md +46 -0
- package/bin/cli.mjs +113 -0
- package/bin/entry.cjs +84 -0
- package/package.json +48 -0
|
@@ -0,0 +1,929 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RdbmsSchemaBuilder = void 0;
|
|
4
|
+
const Table_1 = require("./table/Table");
|
|
5
|
+
const TableColumn_1 = require("./table/TableColumn");
|
|
6
|
+
const TableForeignKey_1 = require("./table/TableForeignKey");
|
|
7
|
+
const TableIndex_1 = require("./table/TableIndex");
|
|
8
|
+
const TableUtils_1 = require("./util/TableUtils");
|
|
9
|
+
const TableUnique_1 = require("./table/TableUnique");
|
|
10
|
+
const TableCheck_1 = require("./table/TableCheck");
|
|
11
|
+
const TableExclusion_1 = require("./table/TableExclusion");
|
|
12
|
+
const View_1 = require("./view/View");
|
|
13
|
+
const ViewUtils_1 = require("./util/ViewUtils");
|
|
14
|
+
const DriverUtils_1 = require("../driver/DriverUtils");
|
|
15
|
+
/**
|
|
16
|
+
* Creates complete tables schemas in the database based on the entity metadatas.
|
|
17
|
+
*
|
|
18
|
+
* Steps how schema is being built:
|
|
19
|
+
* 1. load list of all tables with complete column and keys information from the db
|
|
20
|
+
* 2. drop all (old) foreign keys that exist in the table, but does not exist in the metadata
|
|
21
|
+
* 3. create new tables that does not exist in the db, but exist in the metadata
|
|
22
|
+
* 4. drop all columns exist (left old) in the db table, but does not exist in the metadata
|
|
23
|
+
* 5. add columns from metadata which does not exist in the table
|
|
24
|
+
* 6. update all exist columns which metadata has changed
|
|
25
|
+
* 7. update primary keys - update old and create new primary key from changed columns
|
|
26
|
+
* 8. create foreign keys which does not exist in the table yet
|
|
27
|
+
* 9. create indices which are missing in db yet, and drops indices which exist in the db, but does not exist in the metadata anymore
|
|
28
|
+
*/
|
|
29
|
+
class RdbmsSchemaBuilder {
|
|
30
|
+
// -------------------------------------------------------------------------
|
|
31
|
+
// Constructor
|
|
32
|
+
// -------------------------------------------------------------------------
|
|
33
|
+
constructor(connection) {
|
|
34
|
+
this.connection = connection;
|
|
35
|
+
this["@instanceof"] = Symbol.for("RdbmsSchemaBuilder");
|
|
36
|
+
}
|
|
37
|
+
// -------------------------------------------------------------------------
|
|
38
|
+
// Public Methods
|
|
39
|
+
// -------------------------------------------------------------------------
|
|
40
|
+
/**
|
|
41
|
+
* Creates complete schemas for the given entity metadatas.
|
|
42
|
+
*/
|
|
43
|
+
async build() {
|
|
44
|
+
this.queryRunner = this.connection.createQueryRunner();
|
|
45
|
+
// this.connection.driver.database || this.currentDatabase;
|
|
46
|
+
this.currentDatabase = this.connection.driver.database;
|
|
47
|
+
this.currentSchema = this.connection.driver.schema;
|
|
48
|
+
// CockroachDB implements asynchronous schema sync operations which can not been executed in transaction.
|
|
49
|
+
// E.g. if you try to DROP column and ADD it again in the same transaction, crdb throws error.
|
|
50
|
+
// In Spanner queries against the INFORMATION_SCHEMA can be used in a read-only transaction,
|
|
51
|
+
// but not in a read-write transaction.
|
|
52
|
+
const isUsingTransactions = !(this.connection.driver.options.type === "cockroachdb") &&
|
|
53
|
+
!(this.connection.driver.options.type === "spanner") &&
|
|
54
|
+
this.connection.options.migrationsTransactionMode !== "none";
|
|
55
|
+
await this.queryRunner.beforeMigration();
|
|
56
|
+
if (isUsingTransactions) {
|
|
57
|
+
await this.queryRunner.startTransaction();
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
await this.createMetadataTableIfNecessary(this.queryRunner);
|
|
61
|
+
// Flush the queryrunner table & view cache
|
|
62
|
+
const tablePaths = this.entityToSyncMetadatas.map((metadata) => this.getTablePath(metadata));
|
|
63
|
+
const viewPaths = this.viewEntityToSyncMetadatas.map((metadata) => this.getTablePath(metadata));
|
|
64
|
+
await this.queryRunner.getTables(tablePaths);
|
|
65
|
+
await this.queryRunner.getViews(viewPaths);
|
|
66
|
+
await this.executeSchemaSyncOperationsInProperOrder();
|
|
67
|
+
// if cache is enabled then perform cache-synchronization as well
|
|
68
|
+
if (this.connection.queryResultCache)
|
|
69
|
+
await this.connection.queryResultCache.synchronize(this.queryRunner);
|
|
70
|
+
if (isUsingTransactions) {
|
|
71
|
+
await this.queryRunner.commitTransaction();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
try {
|
|
76
|
+
// we throw original error even if rollback thrown an error
|
|
77
|
+
if (isUsingTransactions) {
|
|
78
|
+
await this.queryRunner.rollbackTransaction();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch (rollbackError) { }
|
|
82
|
+
throw error;
|
|
83
|
+
}
|
|
84
|
+
finally {
|
|
85
|
+
await this.queryRunner.afterMigration();
|
|
86
|
+
await this.queryRunner.release();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Create the typeorm_metadata table if necessary.
|
|
91
|
+
*/
|
|
92
|
+
async createMetadataTableIfNecessary(queryRunner) {
|
|
93
|
+
if (this.viewEntityToSyncMetadatas.length > 0 ||
|
|
94
|
+
this.hasGeneratedColumns()) {
|
|
95
|
+
await this.createTypeormMetadataTable(queryRunner);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Returns sql queries to be executed by schema builder.
|
|
100
|
+
*/
|
|
101
|
+
async log() {
|
|
102
|
+
this.queryRunner = this.connection.createQueryRunner();
|
|
103
|
+
try {
|
|
104
|
+
// Flush the queryrunner table & view cache
|
|
105
|
+
const tablePaths = this.entityToSyncMetadatas.map((metadata) => this.getTablePath(metadata));
|
|
106
|
+
const viewPaths = this.viewEntityToSyncMetadatas.map((metadata) => this.getTablePath(metadata));
|
|
107
|
+
await this.queryRunner.getTables(tablePaths);
|
|
108
|
+
await this.queryRunner.getViews(viewPaths);
|
|
109
|
+
this.queryRunner.enableSqlMemory();
|
|
110
|
+
await this.executeSchemaSyncOperationsInProperOrder();
|
|
111
|
+
// if cache is enabled then perform cache-synchronization as well
|
|
112
|
+
if (this.connection.queryResultCache)
|
|
113
|
+
// todo: check this functionality
|
|
114
|
+
await this.connection.queryResultCache.synchronize(this.queryRunner);
|
|
115
|
+
return this.queryRunner.getMemorySql();
|
|
116
|
+
}
|
|
117
|
+
finally {
|
|
118
|
+
// its important to disable this mode despite the fact we are release query builder
|
|
119
|
+
// because there exist drivers which reuse same query runner. Also its important to disable
|
|
120
|
+
// sql memory after call of getMemorySql() method because last one flushes sql memory.
|
|
121
|
+
this.queryRunner.disableSqlMemory();
|
|
122
|
+
await this.queryRunner.release();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// -------------------------------------------------------------------------
|
|
126
|
+
// Protected Methods
|
|
127
|
+
// -------------------------------------------------------------------------
|
|
128
|
+
/**
|
|
129
|
+
* Returns only entities that should be synced in the database.
|
|
130
|
+
*/
|
|
131
|
+
get entityToSyncMetadatas() {
|
|
132
|
+
return this.connection.entityMetadatas.filter((metadata) => metadata.synchronize &&
|
|
133
|
+
metadata.tableType !== "entity-child" &&
|
|
134
|
+
metadata.tableType !== "view");
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Returns only entities that should be synced in the database.
|
|
138
|
+
*/
|
|
139
|
+
get viewEntityToSyncMetadatas() {
|
|
140
|
+
return (this.connection.entityMetadatas
|
|
141
|
+
.filter((metadata) => metadata.tableType === "view" && metadata.synchronize)
|
|
142
|
+
// sort views in creation order by dependencies
|
|
143
|
+
.sort(ViewUtils_1.ViewUtils.viewMetadataCmp));
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Checks if there are at least one generated column.
|
|
147
|
+
*/
|
|
148
|
+
hasGeneratedColumns() {
|
|
149
|
+
return this.connection.entityMetadatas.some((entityMetadata) => {
|
|
150
|
+
return entityMetadata.columns.some((column) => column.generatedType);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Executes schema sync operations in a proper order.
|
|
155
|
+
* Order of operations matter here.
|
|
156
|
+
*/
|
|
157
|
+
async executeSchemaSyncOperationsInProperOrder() {
|
|
158
|
+
await this.dropOldViews();
|
|
159
|
+
await this.dropOldForeignKeys();
|
|
160
|
+
await this.dropOldIndices();
|
|
161
|
+
await this.dropOldChecks();
|
|
162
|
+
await this.dropOldExclusions();
|
|
163
|
+
await this.dropCompositeUniqueConstraints();
|
|
164
|
+
// await this.renameTables();
|
|
165
|
+
await this.renameColumns();
|
|
166
|
+
await this.changeTableComment();
|
|
167
|
+
await this.createNewTables();
|
|
168
|
+
await this.dropRemovedColumns();
|
|
169
|
+
await this.addNewColumns();
|
|
170
|
+
await this.updatePrimaryKeys();
|
|
171
|
+
await this.updateExistColumns();
|
|
172
|
+
await this.createNewIndices();
|
|
173
|
+
await this.createNewChecks();
|
|
174
|
+
await this.createNewExclusions();
|
|
175
|
+
await this.createCompositeUniqueConstraints();
|
|
176
|
+
await this.createForeignKeys();
|
|
177
|
+
await this.createViews();
|
|
178
|
+
await this.createNewViewIndices();
|
|
179
|
+
}
|
|
180
|
+
getTablePath(target) {
|
|
181
|
+
const parsed = this.connection.driver.parseTableName(target);
|
|
182
|
+
return this.connection.driver.buildTableName(parsed.tableName, parsed.schema || this.currentSchema, parsed.database || this.currentDatabase);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Drops all (old) foreign keys that exist in the tables, but do not exist in the entity metadata.
|
|
186
|
+
*/
|
|
187
|
+
async dropOldForeignKeys() {
|
|
188
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
189
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
190
|
+
if (!table)
|
|
191
|
+
continue;
|
|
192
|
+
// find foreign keys that exist in the schemas but does not exist in the entity metadata
|
|
193
|
+
const tableForeignKeysToDrop = table.foreignKeys.filter((tableForeignKey) => {
|
|
194
|
+
const metadataFK = metadata.foreignKeys.find((metadataForeignKey) => tableForeignKey.name === metadataForeignKey.name &&
|
|
195
|
+
this.getTablePath(tableForeignKey) ===
|
|
196
|
+
this.getTablePath(metadataForeignKey.referencedEntityMetadata));
|
|
197
|
+
return (!metadataFK ||
|
|
198
|
+
(metadataFK.onDelete &&
|
|
199
|
+
metadataFK.onDelete !== tableForeignKey.onDelete) ||
|
|
200
|
+
(metadataFK.onUpdate &&
|
|
201
|
+
metadataFK.onUpdate !== tableForeignKey.onUpdate));
|
|
202
|
+
});
|
|
203
|
+
if (tableForeignKeysToDrop.length === 0)
|
|
204
|
+
continue;
|
|
205
|
+
this.connection.logger.logSchemaBuild(`dropping old foreign keys of ${table.name}: ${tableForeignKeysToDrop
|
|
206
|
+
.map((dbForeignKey) => dbForeignKey.name)
|
|
207
|
+
.join(", ")}`);
|
|
208
|
+
// drop foreign keys from the database
|
|
209
|
+
await this.queryRunner.dropForeignKeys(table, tableForeignKeysToDrop);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Rename tables
|
|
214
|
+
*/
|
|
215
|
+
async renameTables() {
|
|
216
|
+
// for (const metadata of this.entityToSyncMetadatas) {
|
|
217
|
+
// const table = this.queryRunner.loadedTables.find(table => this.getTablePath(table) === this.getTablePath(metadata));
|
|
218
|
+
// }
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Renames columns.
|
|
222
|
+
* Works if only one column per table was changed.
|
|
223
|
+
* Changes only column name. If something besides name was changed, these changes will be ignored.
|
|
224
|
+
*/
|
|
225
|
+
async renameColumns() {
|
|
226
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
227
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
228
|
+
if (!table)
|
|
229
|
+
continue;
|
|
230
|
+
if (metadata.columns.length !== table.columns.length)
|
|
231
|
+
continue;
|
|
232
|
+
const renamedMetadataColumns = metadata.columns
|
|
233
|
+
.filter((c) => !c.isVirtualProperty)
|
|
234
|
+
.filter((column) => {
|
|
235
|
+
return !table.columns.find((tableColumn) => {
|
|
236
|
+
return (tableColumn.name === column.databaseName &&
|
|
237
|
+
tableColumn.type ===
|
|
238
|
+
this.connection.driver.normalizeType(column) &&
|
|
239
|
+
tableColumn.isNullable === column.isNullable &&
|
|
240
|
+
tableColumn.isUnique ===
|
|
241
|
+
this.connection.driver.normalizeIsUnique(column));
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
if (renamedMetadataColumns.length === 0 ||
|
|
245
|
+
renamedMetadataColumns.length > 1)
|
|
246
|
+
continue;
|
|
247
|
+
const renamedTableColumns = table.columns.filter((tableColumn) => {
|
|
248
|
+
return !metadata.columns.find((column) => {
|
|
249
|
+
return (!column.isVirtualProperty &&
|
|
250
|
+
column.databaseName === tableColumn.name &&
|
|
251
|
+
this.connection.driver.normalizeType(column) ===
|
|
252
|
+
tableColumn.type &&
|
|
253
|
+
column.isNullable === tableColumn.isNullable &&
|
|
254
|
+
this.connection.driver.normalizeIsUnique(column) ===
|
|
255
|
+
tableColumn.isUnique);
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
if (renamedTableColumns.length === 0 ||
|
|
259
|
+
renamedTableColumns.length > 1)
|
|
260
|
+
continue;
|
|
261
|
+
const renamedColumn = renamedTableColumns[0].clone();
|
|
262
|
+
renamedColumn.name = renamedMetadataColumns[0].databaseName;
|
|
263
|
+
this.connection.logger.logSchemaBuild(`renaming column "${renamedTableColumns[0].name}" in "${table.name}" to "${renamedColumn.name}"`);
|
|
264
|
+
await this.queryRunner.renameColumn(table, renamedTableColumns[0], renamedColumn);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
async dropOldIndices() {
|
|
268
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
269
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
270
|
+
if (!table)
|
|
271
|
+
continue;
|
|
272
|
+
const dropQueries = table.indices
|
|
273
|
+
.filter((tableIndex) => {
|
|
274
|
+
const indexMetadata = metadata.indices.find((index) => index.name === tableIndex.name);
|
|
275
|
+
if (indexMetadata) {
|
|
276
|
+
if (indexMetadata.synchronize === false)
|
|
277
|
+
return false;
|
|
278
|
+
if (indexMetadata.isUnique !== tableIndex.isUnique)
|
|
279
|
+
return true;
|
|
280
|
+
if (indexMetadata.isSpatial !== tableIndex.isSpatial)
|
|
281
|
+
return true;
|
|
282
|
+
if (this.connection.driver.isFullTextColumnTypeSupported() &&
|
|
283
|
+
indexMetadata.isFulltext !== tableIndex.isFulltext)
|
|
284
|
+
return true;
|
|
285
|
+
if (indexMetadata.columns.length !==
|
|
286
|
+
tableIndex.columnNames.length)
|
|
287
|
+
return true;
|
|
288
|
+
return !indexMetadata.columns.every((column) => tableIndex.columnNames.indexOf(column.databaseName) !== -1);
|
|
289
|
+
}
|
|
290
|
+
return true;
|
|
291
|
+
})
|
|
292
|
+
.map(async (tableIndex) => {
|
|
293
|
+
this.connection.logger.logSchemaBuild(`dropping an index: "${tableIndex.name}" from table ${table.name}`);
|
|
294
|
+
await this.queryRunner.dropIndex(table, tableIndex);
|
|
295
|
+
});
|
|
296
|
+
await Promise.all(dropQueries);
|
|
297
|
+
}
|
|
298
|
+
if (this.connection.options.type === "postgres") {
|
|
299
|
+
const postgresQueryRunner = this.queryRunner;
|
|
300
|
+
for (const metadata of this.viewEntityToSyncMetadatas) {
|
|
301
|
+
const view = this.queryRunner.loadedViews.find((view) => this.getTablePath(view) === this.getTablePath(metadata));
|
|
302
|
+
if (!view)
|
|
303
|
+
continue;
|
|
304
|
+
const dropQueries = view.indices
|
|
305
|
+
.filter((tableIndex) => {
|
|
306
|
+
const indexMetadata = metadata.indices.find((index) => index.name === tableIndex.name);
|
|
307
|
+
if (indexMetadata) {
|
|
308
|
+
if (indexMetadata.synchronize === false)
|
|
309
|
+
return false;
|
|
310
|
+
if (indexMetadata.isUnique !== tableIndex.isUnique)
|
|
311
|
+
return true;
|
|
312
|
+
if (indexMetadata.isSpatial !== tableIndex.isSpatial)
|
|
313
|
+
return true;
|
|
314
|
+
if (this.connection.driver.isFullTextColumnTypeSupported() &&
|
|
315
|
+
indexMetadata.isFulltext !==
|
|
316
|
+
tableIndex.isFulltext)
|
|
317
|
+
return true;
|
|
318
|
+
if (indexMetadata.columns.length !==
|
|
319
|
+
tableIndex.columnNames.length)
|
|
320
|
+
return true;
|
|
321
|
+
return !indexMetadata.columns.every((column) => tableIndex.columnNames.indexOf(column.databaseName) !== -1);
|
|
322
|
+
}
|
|
323
|
+
return true;
|
|
324
|
+
})
|
|
325
|
+
.map(async (tableIndex) => {
|
|
326
|
+
this.connection.logger.logSchemaBuild(`dropping an index: "${tableIndex.name}" from view ${view.name}`);
|
|
327
|
+
await postgresQueryRunner.dropViewIndex(view, tableIndex);
|
|
328
|
+
});
|
|
329
|
+
await Promise.all(dropQueries);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
async dropOldChecks() {
|
|
334
|
+
// Mysql does not support check constraints
|
|
335
|
+
if (DriverUtils_1.DriverUtils.isMySQLFamily(this.connection.driver) ||
|
|
336
|
+
this.connection.driver.options.type === "aurora-mysql")
|
|
337
|
+
return;
|
|
338
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
339
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
340
|
+
if (!table)
|
|
341
|
+
continue;
|
|
342
|
+
const oldChecks = table.checks.filter((tableCheck) => {
|
|
343
|
+
return !metadata.checks.find((checkMetadata) => checkMetadata.name === tableCheck.name);
|
|
344
|
+
});
|
|
345
|
+
if (oldChecks.length === 0)
|
|
346
|
+
continue;
|
|
347
|
+
this.connection.logger.logSchemaBuild(`dropping old check constraint: ${oldChecks
|
|
348
|
+
.map((check) => `"${check.name}"`)
|
|
349
|
+
.join(", ")} from table "${table.name}"`);
|
|
350
|
+
await this.queryRunner.dropCheckConstraints(table, oldChecks);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
async dropCompositeUniqueConstraints() {
|
|
354
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
355
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
356
|
+
if (!table)
|
|
357
|
+
continue;
|
|
358
|
+
const compositeUniques = table.uniques.filter((tableUnique) => {
|
|
359
|
+
return (tableUnique.columnNames.length > 1 &&
|
|
360
|
+
!metadata.uniques.find((uniqueMetadata) => uniqueMetadata.name === tableUnique.name));
|
|
361
|
+
});
|
|
362
|
+
if (compositeUniques.length === 0)
|
|
363
|
+
continue;
|
|
364
|
+
this.connection.logger.logSchemaBuild(`dropping old unique constraint: ${compositeUniques
|
|
365
|
+
.map((unique) => `"${unique.name}"`)
|
|
366
|
+
.join(", ")} from table "${table.name}"`);
|
|
367
|
+
await this.queryRunner.dropUniqueConstraints(table, compositeUniques);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
async dropOldExclusions() {
|
|
371
|
+
// Only PostgreSQL supports exclusion constraints
|
|
372
|
+
if (!(this.connection.driver.options.type === "postgres"))
|
|
373
|
+
return;
|
|
374
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
375
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
376
|
+
if (!table)
|
|
377
|
+
continue;
|
|
378
|
+
const oldExclusions = table.exclusions.filter((tableExclusion) => {
|
|
379
|
+
return !metadata.exclusions.find((exclusionMetadata) => exclusionMetadata.name === tableExclusion.name);
|
|
380
|
+
});
|
|
381
|
+
if (oldExclusions.length === 0)
|
|
382
|
+
continue;
|
|
383
|
+
this.connection.logger.logSchemaBuild(`dropping old exclusion constraint: ${oldExclusions
|
|
384
|
+
.map((exclusion) => `"${exclusion.name}"`)
|
|
385
|
+
.join(", ")} from table "${table.name}"`);
|
|
386
|
+
await this.queryRunner.dropExclusionConstraints(table, oldExclusions);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* change table comment
|
|
391
|
+
*/
|
|
392
|
+
async changeTableComment() {
|
|
393
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
394
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
395
|
+
if (!table)
|
|
396
|
+
continue;
|
|
397
|
+
if (DriverUtils_1.DriverUtils.isMySQLFamily(this.connection.driver) ||
|
|
398
|
+
this.connection.driver.options.type === "postgres") {
|
|
399
|
+
const newComment = metadata.comment;
|
|
400
|
+
await this.queryRunner.changeTableComment(table, newComment);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Creates tables that do not exist in the database yet.
|
|
406
|
+
* New tables are created without foreign and primary keys.
|
|
407
|
+
* Primary key only can be created in conclusion with auto generated column.
|
|
408
|
+
*/
|
|
409
|
+
async createNewTables() {
|
|
410
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
411
|
+
// check if table does not exist yet
|
|
412
|
+
const existTable = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
413
|
+
if (existTable)
|
|
414
|
+
continue;
|
|
415
|
+
this.connection.logger.logSchemaBuild(`creating a new table: ${this.getTablePath(metadata)}`);
|
|
416
|
+
// create a new table and sync it in the database
|
|
417
|
+
const table = Table_1.Table.create(metadata, this.connection.driver);
|
|
418
|
+
await this.queryRunner.createTable(table, false, false);
|
|
419
|
+
this.queryRunner.loadedTables.push(table);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
async createViews() {
|
|
423
|
+
for (const metadata of this.viewEntityToSyncMetadatas) {
|
|
424
|
+
// check if view does not exist yet
|
|
425
|
+
const existView = this.queryRunner.loadedViews.find((view) => {
|
|
426
|
+
const viewExpression = typeof view.expression === "string"
|
|
427
|
+
? view.expression.trim()
|
|
428
|
+
: view.expression(this.connection).getQuery();
|
|
429
|
+
const metadataExpression = typeof metadata.expression === "string"
|
|
430
|
+
? metadata.expression.trim()
|
|
431
|
+
: metadata.expression(this.connection).getQuery();
|
|
432
|
+
return (this.getTablePath(view) === this.getTablePath(metadata) &&
|
|
433
|
+
viewExpression === metadataExpression);
|
|
434
|
+
});
|
|
435
|
+
if (existView)
|
|
436
|
+
continue;
|
|
437
|
+
this.connection.logger.logSchemaBuild(`creating a new view: ${this.getTablePath(metadata)}`);
|
|
438
|
+
// create a new view and sync it in the database
|
|
439
|
+
const view = View_1.View.create(metadata, this.connection.driver);
|
|
440
|
+
await this.queryRunner.createView(view, true);
|
|
441
|
+
this.queryRunner.loadedViews.push(view);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
async dropOldViews() {
|
|
445
|
+
const droppedViews = [];
|
|
446
|
+
const viewEntityToSyncMetadatas = this.viewEntityToSyncMetadatas;
|
|
447
|
+
// BuIld lookup cache for finding views metadata
|
|
448
|
+
const viewToMetadata = new Map();
|
|
449
|
+
for (const view of this.queryRunner.loadedViews) {
|
|
450
|
+
const viewMetadata = viewEntityToSyncMetadatas.find((metadata) => {
|
|
451
|
+
return this.getTablePath(view) === this.getTablePath(metadata);
|
|
452
|
+
});
|
|
453
|
+
if (viewMetadata) {
|
|
454
|
+
viewToMetadata.set(view, viewMetadata);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
// Gather all changed view, that need a drop
|
|
458
|
+
for (const view of this.queryRunner.loadedViews) {
|
|
459
|
+
const viewMetadata = viewToMetadata.get(view);
|
|
460
|
+
if (!viewMetadata) {
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
const viewExpression = typeof view.expression === "string"
|
|
464
|
+
? view.expression.trim()
|
|
465
|
+
: view.expression(this.connection).getQuery();
|
|
466
|
+
const metadataExpression = typeof viewMetadata.expression === "string"
|
|
467
|
+
? viewMetadata.expression.trim()
|
|
468
|
+
: viewMetadata.expression(this.connection).getQuery();
|
|
469
|
+
if (viewExpression === metadataExpression)
|
|
470
|
+
continue;
|
|
471
|
+
this.connection.logger.logSchemaBuild(`dropping an old view: ${view.name}`);
|
|
472
|
+
// Collect view to be dropped
|
|
473
|
+
droppedViews.push(view);
|
|
474
|
+
}
|
|
475
|
+
// Helper function that for a given view, will recursively return list of the view and all views that depend on it
|
|
476
|
+
const viewDependencyChain = (view) => {
|
|
477
|
+
// Get the view metadata
|
|
478
|
+
const viewMetadata = viewToMetadata.get(view);
|
|
479
|
+
let viewWithDependencies = [view];
|
|
480
|
+
// If no metadata is known for the view, simply return the view itself
|
|
481
|
+
if (!viewMetadata) {
|
|
482
|
+
return viewWithDependencies;
|
|
483
|
+
}
|
|
484
|
+
// Iterate over all known views
|
|
485
|
+
for (const [currentView, currentMetadata,] of viewToMetadata.entries()) {
|
|
486
|
+
// Ignore self reference
|
|
487
|
+
if (currentView === view) {
|
|
488
|
+
continue;
|
|
489
|
+
}
|
|
490
|
+
// If the currently iterated view depends on the passed in view
|
|
491
|
+
if (currentMetadata.dependsOn &&
|
|
492
|
+
(currentMetadata.dependsOn.has(viewMetadata.target) ||
|
|
493
|
+
currentMetadata.dependsOn.has(viewMetadata.name))) {
|
|
494
|
+
// Recursively add currently iterate view and its dependents
|
|
495
|
+
viewWithDependencies = viewWithDependencies.concat(viewDependencyChain(currentView));
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
// Return all collected views
|
|
499
|
+
return viewWithDependencies;
|
|
500
|
+
};
|
|
501
|
+
// Collect final list of views to be dropped in a Set so there are no duplicates
|
|
502
|
+
const droppedViewsWithDependencies = new Set(
|
|
503
|
+
// Collect all dropped views, and their dependencies
|
|
504
|
+
droppedViews
|
|
505
|
+
.map((view) => viewDependencyChain(view))
|
|
506
|
+
// Flattened to single Array ( can be replaced with flatMap, once supported)
|
|
507
|
+
.reduce((all, segment) => {
|
|
508
|
+
return all.concat(segment);
|
|
509
|
+
}, [])
|
|
510
|
+
// Sort the views to be dropped in creation order
|
|
511
|
+
.sort((a, b) => {
|
|
512
|
+
return ViewUtils_1.ViewUtils.viewMetadataCmp(viewToMetadata.get(a), viewToMetadata.get(b));
|
|
513
|
+
})
|
|
514
|
+
// reverse order to get drop order
|
|
515
|
+
.reverse());
|
|
516
|
+
// Finally emit all drop views
|
|
517
|
+
for (const view of droppedViewsWithDependencies) {
|
|
518
|
+
await this.queryRunner.dropView(view);
|
|
519
|
+
}
|
|
520
|
+
this.queryRunner.loadedViews = this.queryRunner.loadedViews.filter((view) => !droppedViewsWithDependencies.has(view));
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Drops all columns that exist in the table, but does not exist in the metadata (left old).
|
|
524
|
+
* We drop their keys too, since it should be safe.
|
|
525
|
+
*/
|
|
526
|
+
async dropRemovedColumns() {
|
|
527
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
528
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
529
|
+
if (!table)
|
|
530
|
+
continue;
|
|
531
|
+
// find columns that exist in the database but does not exist in the metadata
|
|
532
|
+
const droppedTableColumns = table.columns.filter((tableColumn) => {
|
|
533
|
+
return !metadata.columns.find((columnMetadata) => columnMetadata.isVirtualProperty ||
|
|
534
|
+
columnMetadata.databaseName === tableColumn.name);
|
|
535
|
+
});
|
|
536
|
+
if (droppedTableColumns.length === 0)
|
|
537
|
+
continue;
|
|
538
|
+
this.connection.logger.logSchemaBuild(`columns dropped in ${table.name}: ` +
|
|
539
|
+
droppedTableColumns.map((column) => column.name).join(", "));
|
|
540
|
+
// drop columns from the database
|
|
541
|
+
await this.queryRunner.dropColumns(table, droppedTableColumns);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Adds columns from metadata which does not exist in the table.
|
|
546
|
+
* Columns are created without keys.
|
|
547
|
+
*/
|
|
548
|
+
async addNewColumns() {
|
|
549
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
550
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
551
|
+
if (!table)
|
|
552
|
+
continue;
|
|
553
|
+
// find which columns are new
|
|
554
|
+
const newColumnMetadatas = metadata.columns.filter((columnMetadata) => {
|
|
555
|
+
return (!columnMetadata.isVirtualProperty &&
|
|
556
|
+
!table.columns.find((tableColumn) => tableColumn.name ===
|
|
557
|
+
columnMetadata.databaseName));
|
|
558
|
+
});
|
|
559
|
+
if (newColumnMetadatas.length === 0)
|
|
560
|
+
continue;
|
|
561
|
+
// create columns in the database
|
|
562
|
+
const newTableColumnOptions = this.metadataColumnsToTableColumnOptions(newColumnMetadatas);
|
|
563
|
+
const newTableColumns = newTableColumnOptions.map((option) => new TableColumn_1.TableColumn(option));
|
|
564
|
+
if (newTableColumns.length === 0)
|
|
565
|
+
continue;
|
|
566
|
+
this.connection.logger.logSchemaBuild(`new columns added: ` +
|
|
567
|
+
newColumnMetadatas
|
|
568
|
+
.map((column) => column.databaseName)
|
|
569
|
+
.join(", "));
|
|
570
|
+
await this.queryRunner.addColumns(table, newTableColumns);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Updates composite primary keys.
|
|
575
|
+
*/
|
|
576
|
+
async updatePrimaryKeys() {
|
|
577
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
578
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
579
|
+
if (!table)
|
|
580
|
+
continue;
|
|
581
|
+
const primaryMetadataColumns = metadata.columns.filter((column) => column.isPrimary);
|
|
582
|
+
const primaryTableColumns = table.columns.filter((column) => column.isPrimary);
|
|
583
|
+
if (primaryTableColumns.length !== primaryMetadataColumns.length &&
|
|
584
|
+
primaryMetadataColumns.length > 1) {
|
|
585
|
+
const changedPrimaryColumns = primaryMetadataColumns.map((primaryMetadataColumn) => {
|
|
586
|
+
return new TableColumn_1.TableColumn(TableUtils_1.TableUtils.createTableColumnOptions(primaryMetadataColumn, this.connection.driver));
|
|
587
|
+
});
|
|
588
|
+
await this.queryRunner.updatePrimaryKeys(table, changedPrimaryColumns);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Update all exist columns which metadata has changed.
|
|
594
|
+
* Still don't create keys. Also we don't touch foreign keys of the changed columns.
|
|
595
|
+
*/
|
|
596
|
+
async updateExistColumns() {
|
|
597
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
598
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
599
|
+
if (!table)
|
|
600
|
+
continue;
|
|
601
|
+
const changedColumns = this.connection.driver.findChangedColumns(table.columns, metadata.columns);
|
|
602
|
+
if (changedColumns.length === 0)
|
|
603
|
+
continue;
|
|
604
|
+
// drop all foreign keys that point to this column
|
|
605
|
+
for (const changedColumn of changedColumns) {
|
|
606
|
+
await this.dropColumnReferencedForeignKeys(this.getTablePath(metadata), changedColumn.databaseName);
|
|
607
|
+
}
|
|
608
|
+
// drop all composite indices related to this column
|
|
609
|
+
for (const changedColumn of changedColumns) {
|
|
610
|
+
await this.dropColumnCompositeIndices(this.getTablePath(metadata), changedColumn.databaseName);
|
|
611
|
+
}
|
|
612
|
+
// drop all composite uniques related to this column
|
|
613
|
+
// Mysql does not support unique constraints.
|
|
614
|
+
if (!(DriverUtils_1.DriverUtils.isMySQLFamily(this.connection.driver) ||
|
|
615
|
+
this.connection.driver.options.type === "aurora-mysql" ||
|
|
616
|
+
this.connection.driver.options.type === "spanner")) {
|
|
617
|
+
for (const changedColumn of changedColumns) {
|
|
618
|
+
await this.dropColumnCompositeUniques(this.getTablePath(metadata), changedColumn.databaseName);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
// generate a map of new/old columns
|
|
622
|
+
const newAndOldTableColumns = changedColumns.map((changedColumn) => {
|
|
623
|
+
const oldTableColumn = table.columns.find((column) => column.name === changedColumn.databaseName);
|
|
624
|
+
const newTableColumnOptions = TableUtils_1.TableUtils.createTableColumnOptions(changedColumn, this.connection.driver);
|
|
625
|
+
const newTableColumn = new TableColumn_1.TableColumn(newTableColumnOptions);
|
|
626
|
+
return {
|
|
627
|
+
oldColumn: oldTableColumn,
|
|
628
|
+
newColumn: newTableColumn,
|
|
629
|
+
};
|
|
630
|
+
});
|
|
631
|
+
if (newAndOldTableColumns.length === 0)
|
|
632
|
+
continue;
|
|
633
|
+
this.connection.logger.logSchemaBuild(`columns changed in "${table.name}". updating: ` +
|
|
634
|
+
changedColumns
|
|
635
|
+
.map((column) => column.databaseName)
|
|
636
|
+
.join(", "));
|
|
637
|
+
await this.queryRunner.changeColumns(table, newAndOldTableColumns);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Creates composite indices which are missing in db yet.
|
|
642
|
+
*/
|
|
643
|
+
async createNewIndices() {
|
|
644
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
645
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
646
|
+
if (!table)
|
|
647
|
+
continue;
|
|
648
|
+
const newIndices = metadata.indices
|
|
649
|
+
.filter((indexMetadata) => !table.indices.find((tableIndex) => tableIndex.name === indexMetadata.name) && indexMetadata.synchronize === true)
|
|
650
|
+
.map((indexMetadata) => TableIndex_1.TableIndex.create(indexMetadata));
|
|
651
|
+
if (newIndices.length === 0)
|
|
652
|
+
continue;
|
|
653
|
+
this.connection.logger.logSchemaBuild(`adding new indices ${newIndices
|
|
654
|
+
.map((index) => `"${index.name}"`)
|
|
655
|
+
.join(", ")} in table "${table.name}"`);
|
|
656
|
+
await this.queryRunner.createIndices(table, newIndices);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* Creates indices for materialized views.
|
|
661
|
+
*/
|
|
662
|
+
async createNewViewIndices() {
|
|
663
|
+
// Only PostgreSQL supports indices for materialized views.
|
|
664
|
+
if (this.connection.options.type !== "postgres" ||
|
|
665
|
+
!DriverUtils_1.DriverUtils.isPostgresFamily(this.connection.driver)) {
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
668
|
+
const postgresQueryRunner = (this.queryRunner);
|
|
669
|
+
for (const metadata of this.viewEntityToSyncMetadatas) {
|
|
670
|
+
// check if view does not exist yet
|
|
671
|
+
const view = this.queryRunner.loadedViews.find((view) => {
|
|
672
|
+
const viewExpression = typeof view.expression === "string"
|
|
673
|
+
? view.expression.trim()
|
|
674
|
+
: view.expression(this.connection).getQuery();
|
|
675
|
+
const metadataExpression = typeof metadata.expression === "string"
|
|
676
|
+
? metadata.expression.trim()
|
|
677
|
+
: metadata.expression(this.connection).getQuery();
|
|
678
|
+
return (this.getTablePath(view) === this.getTablePath(metadata) &&
|
|
679
|
+
viewExpression === metadataExpression);
|
|
680
|
+
});
|
|
681
|
+
if (!view || !view.materialized)
|
|
682
|
+
continue;
|
|
683
|
+
const newIndices = metadata.indices
|
|
684
|
+
.filter((indexMetadata) => !view.indices.find((tableIndex) => tableIndex.name === indexMetadata.name) && indexMetadata.synchronize === true)
|
|
685
|
+
.map((indexMetadata) => TableIndex_1.TableIndex.create(indexMetadata));
|
|
686
|
+
if (newIndices.length === 0)
|
|
687
|
+
continue;
|
|
688
|
+
this.connection.logger.logSchemaBuild(`adding new indices ${newIndices
|
|
689
|
+
.map((index) => `"${index.name}"`)
|
|
690
|
+
.join(", ")} in view "${view.name}"`);
|
|
691
|
+
await postgresQueryRunner.createViewIndices(view, newIndices);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
async createNewChecks() {
|
|
695
|
+
// Mysql does not support check constraints
|
|
696
|
+
if (DriverUtils_1.DriverUtils.isMySQLFamily(this.connection.driver) ||
|
|
697
|
+
this.connection.driver.options.type === "aurora-mysql")
|
|
698
|
+
return;
|
|
699
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
700
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
701
|
+
if (!table)
|
|
702
|
+
continue;
|
|
703
|
+
const newChecks = metadata.checks
|
|
704
|
+
.filter((checkMetadata) => !table.checks.find((tableCheck) => tableCheck.name === checkMetadata.name))
|
|
705
|
+
.map((checkMetadata) => TableCheck_1.TableCheck.create(checkMetadata));
|
|
706
|
+
if (newChecks.length === 0)
|
|
707
|
+
continue;
|
|
708
|
+
this.connection.logger.logSchemaBuild(`adding new check constraints: ${newChecks
|
|
709
|
+
.map((index) => `"${index.name}"`)
|
|
710
|
+
.join(", ")} in table "${table.name}"`);
|
|
711
|
+
await this.queryRunner.createCheckConstraints(table, newChecks);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Creates composite uniques which are missing in db yet.
|
|
716
|
+
*/
|
|
717
|
+
async createCompositeUniqueConstraints() {
|
|
718
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
719
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
720
|
+
if (!table)
|
|
721
|
+
continue;
|
|
722
|
+
const compositeUniques = metadata.uniques
|
|
723
|
+
.filter((uniqueMetadata) => uniqueMetadata.columns.length > 1 &&
|
|
724
|
+
!table.uniques.find((tableUnique) => tableUnique.name === uniqueMetadata.name))
|
|
725
|
+
.map((uniqueMetadata) => TableUnique_1.TableUnique.create(uniqueMetadata));
|
|
726
|
+
if (compositeUniques.length === 0)
|
|
727
|
+
continue;
|
|
728
|
+
this.connection.logger.logSchemaBuild(`adding new unique constraints: ${compositeUniques
|
|
729
|
+
.map((unique) => `"${unique.name}"`)
|
|
730
|
+
.join(", ")} in table "${table.name}"`);
|
|
731
|
+
await this.queryRunner.createUniqueConstraints(table, compositeUniques);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Creates exclusions which are missing in db yet.
|
|
736
|
+
*/
|
|
737
|
+
async createNewExclusions() {
|
|
738
|
+
// Only PostgreSQL supports exclusion constraints
|
|
739
|
+
if (!(this.connection.driver.options.type === "postgres"))
|
|
740
|
+
return;
|
|
741
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
742
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
743
|
+
if (!table)
|
|
744
|
+
continue;
|
|
745
|
+
const newExclusions = metadata.exclusions
|
|
746
|
+
.filter((exclusionMetadata) => !table.exclusions.find((tableExclusion) => tableExclusion.name === exclusionMetadata.name))
|
|
747
|
+
.map((exclusionMetadata) => TableExclusion_1.TableExclusion.create(exclusionMetadata));
|
|
748
|
+
if (newExclusions.length === 0)
|
|
749
|
+
continue;
|
|
750
|
+
this.connection.logger.logSchemaBuild(`adding new exclusion constraints: ${newExclusions
|
|
751
|
+
.map((exclusion) => `"${exclusion.name}"`)
|
|
752
|
+
.join(", ")} in table "${table.name}"`);
|
|
753
|
+
await this.queryRunner.createExclusionConstraints(table, newExclusions);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Creates foreign keys which does not exist in the table yet.
|
|
758
|
+
*/
|
|
759
|
+
async createForeignKeys() {
|
|
760
|
+
for (const metadata of this.entityToSyncMetadatas) {
|
|
761
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === this.getTablePath(metadata));
|
|
762
|
+
if (!table)
|
|
763
|
+
continue;
|
|
764
|
+
const newKeys = metadata.foreignKeys.filter((foreignKey) => {
|
|
765
|
+
return !table.foreignKeys.find((dbForeignKey) => dbForeignKey.name === foreignKey.name &&
|
|
766
|
+
this.getTablePath(dbForeignKey) ===
|
|
767
|
+
this.getTablePath(foreignKey.referencedEntityMetadata));
|
|
768
|
+
});
|
|
769
|
+
if (newKeys.length === 0)
|
|
770
|
+
continue;
|
|
771
|
+
const dbForeignKeys = newKeys.map((foreignKeyMetadata) => TableForeignKey_1.TableForeignKey.create(foreignKeyMetadata, this.connection.driver));
|
|
772
|
+
this.connection.logger.logSchemaBuild(`creating a foreign keys: ${newKeys
|
|
773
|
+
.map((key) => key.name)
|
|
774
|
+
.join(", ")} on table "${table.name}"`);
|
|
775
|
+
await this.queryRunner.createForeignKeys(table, dbForeignKeys);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Drops all foreign keys where given column of the given table is being used.
|
|
780
|
+
*/
|
|
781
|
+
async dropColumnReferencedForeignKeys(tablePath, columnName) {
|
|
782
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === tablePath);
|
|
783
|
+
if (!table)
|
|
784
|
+
return;
|
|
785
|
+
const tablesWithFK = [];
|
|
786
|
+
const columnForeignKey = table.foreignKeys.find((foreignKey) => foreignKey.columnNames.indexOf(columnName) !== -1);
|
|
787
|
+
if (columnForeignKey) {
|
|
788
|
+
const clonedTable = table.clone();
|
|
789
|
+
clonedTable.foreignKeys = [columnForeignKey];
|
|
790
|
+
tablesWithFK.push(clonedTable);
|
|
791
|
+
table.removeForeignKey(columnForeignKey);
|
|
792
|
+
}
|
|
793
|
+
for (const loadedTable of this.queryRunner.loadedTables) {
|
|
794
|
+
const dependForeignKeys = loadedTable.foreignKeys.filter((foreignKey) => {
|
|
795
|
+
return (this.getTablePath(foreignKey) === tablePath &&
|
|
796
|
+
foreignKey.referencedColumnNames.indexOf(columnName) !==
|
|
797
|
+
-1);
|
|
798
|
+
});
|
|
799
|
+
if (dependForeignKeys.length > 0) {
|
|
800
|
+
const clonedTable = loadedTable.clone();
|
|
801
|
+
clonedTable.foreignKeys = dependForeignKeys;
|
|
802
|
+
tablesWithFK.push(clonedTable);
|
|
803
|
+
dependForeignKeys.forEach((dependForeignKey) => loadedTable.removeForeignKey(dependForeignKey));
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
if (tablesWithFK.length > 0) {
|
|
807
|
+
for (const tableWithFK of tablesWithFK) {
|
|
808
|
+
this.connection.logger.logSchemaBuild(`dropping related foreign keys of ${tableWithFK.name}: ${tableWithFK.foreignKeys
|
|
809
|
+
.map((foreignKey) => foreignKey.name)
|
|
810
|
+
.join(", ")}`);
|
|
811
|
+
await this.queryRunner.dropForeignKeys(tableWithFK, tableWithFK.foreignKeys);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* Drops all composite indices, related to given column.
|
|
817
|
+
*/
|
|
818
|
+
async dropColumnCompositeIndices(tablePath, columnName) {
|
|
819
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === tablePath);
|
|
820
|
+
if (!table)
|
|
821
|
+
return;
|
|
822
|
+
const relatedIndices = table.indices.filter((index) => index.columnNames.length > 1 &&
|
|
823
|
+
index.columnNames.indexOf(columnName) !== -1);
|
|
824
|
+
if (relatedIndices.length === 0)
|
|
825
|
+
return;
|
|
826
|
+
this.connection.logger.logSchemaBuild(`dropping related indices of "${tablePath}"."${columnName}": ${relatedIndices
|
|
827
|
+
.map((index) => index.name)
|
|
828
|
+
.join(", ")}`);
|
|
829
|
+
await this.queryRunner.dropIndices(table, relatedIndices);
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Drops all composite uniques, related to given column.
|
|
833
|
+
*/
|
|
834
|
+
async dropColumnCompositeUniques(tablePath, columnName) {
|
|
835
|
+
const table = this.queryRunner.loadedTables.find((table) => this.getTablePath(table) === tablePath);
|
|
836
|
+
if (!table)
|
|
837
|
+
return;
|
|
838
|
+
const relatedUniques = table.uniques.filter((unique) => unique.columnNames.length > 1 &&
|
|
839
|
+
unique.columnNames.indexOf(columnName) !== -1);
|
|
840
|
+
if (relatedUniques.length === 0)
|
|
841
|
+
return;
|
|
842
|
+
this.connection.logger.logSchemaBuild(`dropping related unique constraints of "${tablePath}"."${columnName}": ${relatedUniques
|
|
843
|
+
.map((unique) => unique.name)
|
|
844
|
+
.join(", ")}`);
|
|
845
|
+
await this.queryRunner.dropUniqueConstraints(table, relatedUniques);
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* Creates new columns from the given column metadatas.
|
|
849
|
+
*/
|
|
850
|
+
metadataColumnsToTableColumnOptions(columns) {
|
|
851
|
+
return columns.map((columnMetadata) => TableUtils_1.TableUtils.createTableColumnOptions(columnMetadata, this.connection.driver));
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Creates typeorm service table for storing user defined Views and generate columns.
|
|
855
|
+
*/
|
|
856
|
+
async createTypeormMetadataTable(queryRunner) {
|
|
857
|
+
const schema = this.currentSchema;
|
|
858
|
+
const database = this.currentDatabase;
|
|
859
|
+
const typeormMetadataTable = this.connection.driver.buildTableName(this.connection.metadataTableName, schema, database);
|
|
860
|
+
// Spanner requires at least one primary key in a table.
|
|
861
|
+
// Since we don't have unique column in "typeorm_metadata" table
|
|
862
|
+
// and we should avoid breaking changes, we mark all columns as primary for Spanner driver.
|
|
863
|
+
const isPrimary = this.connection.driver.options.type === "spanner";
|
|
864
|
+
await queryRunner.createTable(new Table_1.Table({
|
|
865
|
+
database: database,
|
|
866
|
+
schema: schema,
|
|
867
|
+
name: typeormMetadataTable,
|
|
868
|
+
columns: [
|
|
869
|
+
{
|
|
870
|
+
name: "type",
|
|
871
|
+
type: this.connection.driver.normalizeType({
|
|
872
|
+
type: this.connection.driver.mappedDataTypes
|
|
873
|
+
.metadataType,
|
|
874
|
+
}),
|
|
875
|
+
isNullable: false,
|
|
876
|
+
isPrimary,
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
name: "database",
|
|
880
|
+
type: this.connection.driver.normalizeType({
|
|
881
|
+
type: this.connection.driver.mappedDataTypes
|
|
882
|
+
.metadataDatabase,
|
|
883
|
+
}),
|
|
884
|
+
isNullable: true,
|
|
885
|
+
isPrimary,
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
name: "schema",
|
|
889
|
+
type: this.connection.driver.normalizeType({
|
|
890
|
+
type: this.connection.driver.mappedDataTypes
|
|
891
|
+
.metadataSchema,
|
|
892
|
+
}),
|
|
893
|
+
isNullable: true,
|
|
894
|
+
isPrimary,
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
name: "table",
|
|
898
|
+
type: this.connection.driver.normalizeType({
|
|
899
|
+
type: this.connection.driver.mappedDataTypes
|
|
900
|
+
.metadataTable,
|
|
901
|
+
}),
|
|
902
|
+
isNullable: true,
|
|
903
|
+
isPrimary,
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
name: "name",
|
|
907
|
+
type: this.connection.driver.normalizeType({
|
|
908
|
+
type: this.connection.driver.mappedDataTypes
|
|
909
|
+
.metadataName,
|
|
910
|
+
}),
|
|
911
|
+
isNullable: true,
|
|
912
|
+
isPrimary,
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
name: "value",
|
|
916
|
+
type: this.connection.driver.normalizeType({
|
|
917
|
+
type: this.connection.driver.mappedDataTypes
|
|
918
|
+
.metadataValue,
|
|
919
|
+
}),
|
|
920
|
+
isNullable: true,
|
|
921
|
+
isPrimary,
|
|
922
|
+
},
|
|
923
|
+
],
|
|
924
|
+
}), true);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
exports.RdbmsSchemaBuilder = RdbmsSchemaBuilder;
|
|
928
|
+
|
|
929
|
+
//# sourceMappingURL=RdbmsSchemaBuilder.js.map
|