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,853 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntityManager = void 0;
|
|
4
|
+
const EntityNotFoundError_1 = require("../error/EntityNotFoundError");
|
|
5
|
+
const QueryRunnerProviderAlreadyReleasedError_1 = require("../error/QueryRunnerProviderAlreadyReleasedError");
|
|
6
|
+
const NoNeedToReleaseEntityManagerError_1 = require("../error/NoNeedToReleaseEntityManagerError");
|
|
7
|
+
const MongoRepository_1 = require("../repository/MongoRepository");
|
|
8
|
+
const TreeRepository_1 = require("../repository/TreeRepository");
|
|
9
|
+
const Repository_1 = require("../repository/Repository");
|
|
10
|
+
const FindOptionsUtils_1 = require("../find-options/FindOptionsUtils");
|
|
11
|
+
const PlainObjectToNewEntityTransformer_1 = require("../query-builder/transformer/PlainObjectToNewEntityTransformer");
|
|
12
|
+
const PlainObjectToDatabaseEntityTransformer_1 = require("../query-builder/transformer/PlainObjectToDatabaseEntityTransformer");
|
|
13
|
+
const error_1 = require("../error");
|
|
14
|
+
const AbstractRepository_1 = require("../repository/AbstractRepository");
|
|
15
|
+
const EntityPersistExecutor_1 = require("../persistence/EntityPersistExecutor");
|
|
16
|
+
const ObjectUtils_1 = require("../util/ObjectUtils");
|
|
17
|
+
const globals_1 = require("../globals");
|
|
18
|
+
const InstanceChecker_1 = require("../util/InstanceChecker");
|
|
19
|
+
const SqlTagUtils_1 = require("../util/SqlTagUtils");
|
|
20
|
+
const OrmUtils_1 = require("../util/OrmUtils");
|
|
21
|
+
/**
|
|
22
|
+
* Entity manager supposed to work with any entity, automatically find its repository and call its methods,
|
|
23
|
+
* whatever entity type are you passing.
|
|
24
|
+
*/
|
|
25
|
+
class EntityManager {
|
|
26
|
+
// -------------------------------------------------------------------------
|
|
27
|
+
// Constructor
|
|
28
|
+
// -------------------------------------------------------------------------
|
|
29
|
+
constructor(connection, queryRunner) {
|
|
30
|
+
this["@instanceof"] = Symbol.for("EntityManager");
|
|
31
|
+
// -------------------------------------------------------------------------
|
|
32
|
+
// Protected Properties
|
|
33
|
+
// -------------------------------------------------------------------------
|
|
34
|
+
/**
|
|
35
|
+
* Once created and then reused by repositories.
|
|
36
|
+
* Created as a future replacement for the #repositories to provide a bit more perf optimization.
|
|
37
|
+
*/
|
|
38
|
+
this.repositories = new Map();
|
|
39
|
+
/**
|
|
40
|
+
* Once created and then reused by repositories.
|
|
41
|
+
*/
|
|
42
|
+
this.treeRepositories = [];
|
|
43
|
+
/**
|
|
44
|
+
* Plain to object transformer used in create and merge operations.
|
|
45
|
+
*/
|
|
46
|
+
this.plainObjectToEntityTransformer = new PlainObjectToNewEntityTransformer_1.PlainObjectToNewEntityTransformer();
|
|
47
|
+
this.connection = connection;
|
|
48
|
+
if (queryRunner) {
|
|
49
|
+
this.queryRunner = queryRunner;
|
|
50
|
+
// dynamic: this.queryRunner = manager;
|
|
51
|
+
ObjectUtils_1.ObjectUtils.assign(this.queryRunner, { manager: this });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Wraps given function execution (and all operations made there) in a transaction.
|
|
56
|
+
* All database operations must be executed using provided entity manager.
|
|
57
|
+
*/
|
|
58
|
+
async transaction(isolationOrRunInTransaction, runInTransactionParam) {
|
|
59
|
+
const isolation = typeof isolationOrRunInTransaction === "string"
|
|
60
|
+
? isolationOrRunInTransaction
|
|
61
|
+
: undefined;
|
|
62
|
+
const runInTransaction = typeof isolationOrRunInTransaction === "function"
|
|
63
|
+
? isolationOrRunInTransaction
|
|
64
|
+
: runInTransactionParam;
|
|
65
|
+
if (!runInTransaction) {
|
|
66
|
+
throw new error_1.TypeORMError(`Transaction method requires callback in second parameter if isolation level is supplied.`);
|
|
67
|
+
}
|
|
68
|
+
if (this.queryRunner && this.queryRunner.isReleased)
|
|
69
|
+
throw new QueryRunnerProviderAlreadyReleasedError_1.QueryRunnerProviderAlreadyReleasedError();
|
|
70
|
+
// if query runner is already defined in this class, it means this entity manager was already created for a single connection
|
|
71
|
+
// if its not defined we create a new query runner - single connection where we'll execute all our operations
|
|
72
|
+
const queryRunner = this.queryRunner || this.connection.createQueryRunner();
|
|
73
|
+
try {
|
|
74
|
+
await queryRunner.startTransaction(isolation);
|
|
75
|
+
const result = await runInTransaction(queryRunner.manager);
|
|
76
|
+
await queryRunner.commitTransaction();
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
catch (err) {
|
|
80
|
+
try {
|
|
81
|
+
// we throw original error even if rollback thrown an error
|
|
82
|
+
await queryRunner.rollbackTransaction();
|
|
83
|
+
}
|
|
84
|
+
catch (rollbackError) { }
|
|
85
|
+
throw err;
|
|
86
|
+
}
|
|
87
|
+
finally {
|
|
88
|
+
if (!this.queryRunner)
|
|
89
|
+
// if we used a new query runner provider then release it
|
|
90
|
+
await queryRunner.release();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Executes raw SQL query and returns raw database results.
|
|
95
|
+
*
|
|
96
|
+
* @see [Official docs](https://typeorm.io/entity-manager-api) for examples.
|
|
97
|
+
*/
|
|
98
|
+
async query(query, parameters) {
|
|
99
|
+
return this.connection.query(query, parameters, this.queryRunner);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Tagged template function that executes raw SQL query and returns raw database results.
|
|
103
|
+
* Template expressions are automatically transformed into database parameters.
|
|
104
|
+
* Raw query execution is supported only by relational databases (MongoDB is not supported).
|
|
105
|
+
* Note: Don't call this as a regular function, it is meant to be used with backticks to tag a template literal.
|
|
106
|
+
* Example: entityManager.sql`SELECT * FROM table_name WHERE id = ${id}`
|
|
107
|
+
*/
|
|
108
|
+
async sql(strings, ...values) {
|
|
109
|
+
const { query, parameters } = (0, SqlTagUtils_1.buildSqlTag)({
|
|
110
|
+
driver: this.connection.driver,
|
|
111
|
+
strings: strings,
|
|
112
|
+
expressions: values,
|
|
113
|
+
});
|
|
114
|
+
return await this.query(query, parameters);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Creates a new query builder that can be used to build a SQL query.
|
|
118
|
+
*/
|
|
119
|
+
createQueryBuilder(entityClass, alias, queryRunner) {
|
|
120
|
+
if (alias) {
|
|
121
|
+
return this.connection.createQueryBuilder(entityClass, alias, queryRunner || this.queryRunner);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
return this.connection.createQueryBuilder(entityClass ||
|
|
125
|
+
queryRunner ||
|
|
126
|
+
this.queryRunner);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Checks if entity has an id by its Function type or schema name.
|
|
131
|
+
*/
|
|
132
|
+
hasId(targetOrEntity, maybeEntity) {
|
|
133
|
+
const target = arguments.length === 2 ? targetOrEntity : targetOrEntity.constructor;
|
|
134
|
+
const entity = arguments.length === 2 ? maybeEntity : targetOrEntity;
|
|
135
|
+
const metadata = this.connection.getMetadata(target);
|
|
136
|
+
return metadata.hasId(entity);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Gets entity mixed id.
|
|
140
|
+
*/
|
|
141
|
+
getId(targetOrEntity, maybeEntity) {
|
|
142
|
+
const target = arguments.length === 2 ? targetOrEntity : targetOrEntity.constructor;
|
|
143
|
+
const entity = arguments.length === 2 ? maybeEntity : targetOrEntity;
|
|
144
|
+
const metadata = this.connection.getMetadata(target);
|
|
145
|
+
return metadata.getEntityIdMixedMap(entity);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Creates a new entity instance or instances.
|
|
149
|
+
* Can copy properties from the given object into new entities.
|
|
150
|
+
*/
|
|
151
|
+
create(entityClass, plainObjectOrObjects) {
|
|
152
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
153
|
+
if (!plainObjectOrObjects)
|
|
154
|
+
return metadata.create(this.queryRunner);
|
|
155
|
+
if (Array.isArray(plainObjectOrObjects))
|
|
156
|
+
return plainObjectOrObjects.map((plainEntityLike) => this.create(entityClass, plainEntityLike));
|
|
157
|
+
const mergeIntoEntity = metadata.create(this.queryRunner);
|
|
158
|
+
this.plainObjectToEntityTransformer.transform(mergeIntoEntity, plainObjectOrObjects, metadata, true);
|
|
159
|
+
return mergeIntoEntity;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Merges two entities into one new entity.
|
|
163
|
+
*/
|
|
164
|
+
merge(entityClass, mergeIntoEntity, ...entityLikes) {
|
|
165
|
+
// todo: throw exception if entity manager is released
|
|
166
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
167
|
+
entityLikes.forEach((object) => this.plainObjectToEntityTransformer.transform(mergeIntoEntity, object, metadata));
|
|
168
|
+
return mergeIntoEntity;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Creates a new entity from the given plain javascript object. If entity already exist in the database, then
|
|
172
|
+
* it loads it (and everything related to it), replaces all values with the new ones from the given object
|
|
173
|
+
* and returns this new entity. This new entity is actually a loaded from the db entity with all properties
|
|
174
|
+
* replaced from the new object.
|
|
175
|
+
*/
|
|
176
|
+
async preload(entityClass, entityLike) {
|
|
177
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
178
|
+
const plainObjectToDatabaseEntityTransformer = new PlainObjectToDatabaseEntityTransformer_1.PlainObjectToDatabaseEntityTransformer(this.connection.manager);
|
|
179
|
+
const transformedEntity = await plainObjectToDatabaseEntityTransformer.transform(entityLike, metadata);
|
|
180
|
+
if (transformedEntity)
|
|
181
|
+
return this.merge(entityClass, transformedEntity, entityLike);
|
|
182
|
+
return undefined;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Saves a given entity in the database.
|
|
186
|
+
*/
|
|
187
|
+
save(targetOrEntity, maybeEntityOrOptions, maybeOptions) {
|
|
188
|
+
// normalize mixed parameters
|
|
189
|
+
let target = arguments.length > 1 &&
|
|
190
|
+
(typeof targetOrEntity === "function" ||
|
|
191
|
+
InstanceChecker_1.InstanceChecker.isEntitySchema(targetOrEntity) ||
|
|
192
|
+
typeof targetOrEntity === "string")
|
|
193
|
+
? targetOrEntity
|
|
194
|
+
: undefined;
|
|
195
|
+
const entity = target
|
|
196
|
+
? maybeEntityOrOptions
|
|
197
|
+
: targetOrEntity;
|
|
198
|
+
const options = target
|
|
199
|
+
? maybeOptions
|
|
200
|
+
: maybeEntityOrOptions;
|
|
201
|
+
if (InstanceChecker_1.InstanceChecker.isEntitySchema(target))
|
|
202
|
+
target = target.options.name;
|
|
203
|
+
// if user passed empty array of entities then we don't need to do anything
|
|
204
|
+
if (Array.isArray(entity) && entity.length === 0)
|
|
205
|
+
return Promise.resolve(entity);
|
|
206
|
+
// execute save operation
|
|
207
|
+
return new EntityPersistExecutor_1.EntityPersistExecutor(this.connection, this.queryRunner, "save", target, entity, options)
|
|
208
|
+
.execute()
|
|
209
|
+
.then(() => entity);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Removes a given entity from the database.
|
|
213
|
+
*/
|
|
214
|
+
remove(targetOrEntity, maybeEntityOrOptions, maybeOptions) {
|
|
215
|
+
// normalize mixed parameters
|
|
216
|
+
const target = arguments.length > 1 &&
|
|
217
|
+
(typeof targetOrEntity === "function" ||
|
|
218
|
+
InstanceChecker_1.InstanceChecker.isEntitySchema(targetOrEntity) ||
|
|
219
|
+
typeof targetOrEntity === "string")
|
|
220
|
+
? targetOrEntity
|
|
221
|
+
: undefined;
|
|
222
|
+
const entity = target
|
|
223
|
+
? maybeEntityOrOptions
|
|
224
|
+
: targetOrEntity;
|
|
225
|
+
const options = target
|
|
226
|
+
? maybeOptions
|
|
227
|
+
: maybeEntityOrOptions;
|
|
228
|
+
// if user passed empty array of entities then we don't need to do anything
|
|
229
|
+
if (Array.isArray(entity) && entity.length === 0)
|
|
230
|
+
return Promise.resolve(entity);
|
|
231
|
+
// execute save operation
|
|
232
|
+
return new EntityPersistExecutor_1.EntityPersistExecutor(this.connection, this.queryRunner, "remove", target, entity, options)
|
|
233
|
+
.execute()
|
|
234
|
+
.then(() => entity);
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Records the delete date of one or many given entities.
|
|
238
|
+
*/
|
|
239
|
+
softRemove(targetOrEntity, maybeEntityOrOptions, maybeOptions) {
|
|
240
|
+
// normalize mixed parameters
|
|
241
|
+
let target = arguments.length > 1 &&
|
|
242
|
+
(typeof targetOrEntity === "function" ||
|
|
243
|
+
InstanceChecker_1.InstanceChecker.isEntitySchema(targetOrEntity) ||
|
|
244
|
+
typeof targetOrEntity === "string")
|
|
245
|
+
? targetOrEntity
|
|
246
|
+
: undefined;
|
|
247
|
+
const entity = target
|
|
248
|
+
? maybeEntityOrOptions
|
|
249
|
+
: targetOrEntity;
|
|
250
|
+
const options = target
|
|
251
|
+
? maybeOptions
|
|
252
|
+
: maybeEntityOrOptions;
|
|
253
|
+
if (InstanceChecker_1.InstanceChecker.isEntitySchema(target))
|
|
254
|
+
target = target.options.name;
|
|
255
|
+
// if user passed empty array of entities then we don't need to do anything
|
|
256
|
+
if (Array.isArray(entity) && entity.length === 0)
|
|
257
|
+
return Promise.resolve(entity);
|
|
258
|
+
// execute soft-remove operation
|
|
259
|
+
return new EntityPersistExecutor_1.EntityPersistExecutor(this.connection, this.queryRunner, "soft-remove", target, entity, options)
|
|
260
|
+
.execute()
|
|
261
|
+
.then(() => entity);
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Recovers one or many given entities.
|
|
265
|
+
*/
|
|
266
|
+
recover(targetOrEntity, maybeEntityOrOptions, maybeOptions) {
|
|
267
|
+
// normalize mixed parameters
|
|
268
|
+
let target = arguments.length > 1 &&
|
|
269
|
+
(typeof targetOrEntity === "function" ||
|
|
270
|
+
InstanceChecker_1.InstanceChecker.isEntitySchema(targetOrEntity) ||
|
|
271
|
+
typeof targetOrEntity === "string")
|
|
272
|
+
? targetOrEntity
|
|
273
|
+
: undefined;
|
|
274
|
+
const entity = target
|
|
275
|
+
? maybeEntityOrOptions
|
|
276
|
+
: targetOrEntity;
|
|
277
|
+
const options = target
|
|
278
|
+
? maybeOptions
|
|
279
|
+
: maybeEntityOrOptions;
|
|
280
|
+
if (InstanceChecker_1.InstanceChecker.isEntitySchema(target))
|
|
281
|
+
target = target.options.name;
|
|
282
|
+
// if user passed empty array of entities then we don't need to do anything
|
|
283
|
+
if (Array.isArray(entity) && entity.length === 0)
|
|
284
|
+
return Promise.resolve(entity);
|
|
285
|
+
// execute recover operation
|
|
286
|
+
return new EntityPersistExecutor_1.EntityPersistExecutor(this.connection, this.queryRunner, "recover", target, entity, options)
|
|
287
|
+
.execute()
|
|
288
|
+
.then(() => entity);
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Inserts a given entity into the database.
|
|
292
|
+
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
293
|
+
* Executes fast and efficient INSERT query.
|
|
294
|
+
* Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted.
|
|
295
|
+
* You can execute bulk inserts using this method.
|
|
296
|
+
*/
|
|
297
|
+
async insert(target, entity) {
|
|
298
|
+
return this.createQueryBuilder()
|
|
299
|
+
.insert()
|
|
300
|
+
.into(target)
|
|
301
|
+
.values(entity)
|
|
302
|
+
.execute();
|
|
303
|
+
}
|
|
304
|
+
async upsert(target, entityOrEntities, conflictPathsOrOptions) {
|
|
305
|
+
const metadata = this.connection.getMetadata(target);
|
|
306
|
+
let options;
|
|
307
|
+
if (Array.isArray(conflictPathsOrOptions)) {
|
|
308
|
+
options = {
|
|
309
|
+
conflictPaths: conflictPathsOrOptions,
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
options = conflictPathsOrOptions;
|
|
314
|
+
}
|
|
315
|
+
let entities;
|
|
316
|
+
if (!Array.isArray(entityOrEntities)) {
|
|
317
|
+
entities = [entityOrEntities];
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
entities = entityOrEntities;
|
|
321
|
+
}
|
|
322
|
+
const conflictColumns = metadata.mapPropertyPathsToColumns(Array.isArray(options.conflictPaths)
|
|
323
|
+
? options.conflictPaths
|
|
324
|
+
: Object.keys(options.conflictPaths));
|
|
325
|
+
const overwriteColumns = metadata.columns.filter((col) => !conflictColumns.includes(col) &&
|
|
326
|
+
entities.some((entity) => typeof col.getEntityValue(entity) !== "undefined"));
|
|
327
|
+
return this.createQueryBuilder()
|
|
328
|
+
.insert()
|
|
329
|
+
.into(target)
|
|
330
|
+
.values(entities)
|
|
331
|
+
.orUpdate([...conflictColumns, ...overwriteColumns].map((col) => col.databaseName), conflictColumns.map((col) => col.databaseName), {
|
|
332
|
+
skipUpdateIfNoValuesChanged: options.skipUpdateIfNoValuesChanged,
|
|
333
|
+
indexPredicate: options.indexPredicate,
|
|
334
|
+
upsertType: options.upsertType ||
|
|
335
|
+
this.connection.driver.supportedUpsertTypes[0],
|
|
336
|
+
})
|
|
337
|
+
.execute();
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Updates entity partially. Entity can be found by a given condition(s).
|
|
341
|
+
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
342
|
+
* Executes fast and efficient UPDATE query.
|
|
343
|
+
* Does not check if entity exist in the database.
|
|
344
|
+
* Condition(s) cannot be empty.
|
|
345
|
+
*/
|
|
346
|
+
update(target, criteria, partialEntity) {
|
|
347
|
+
// if user passed empty criteria or empty list of criterias, then throw an error
|
|
348
|
+
if (OrmUtils_1.OrmUtils.isCriteriaNullOrEmpty(criteria)) {
|
|
349
|
+
return Promise.reject(new error_1.TypeORMError(`Empty criteria(s) are not allowed for the update method.`));
|
|
350
|
+
}
|
|
351
|
+
if (OrmUtils_1.OrmUtils.isPrimitiveCriteria(criteria)) {
|
|
352
|
+
return this.createQueryBuilder()
|
|
353
|
+
.update(target)
|
|
354
|
+
.set(partialEntity)
|
|
355
|
+
.whereInIds(criteria)
|
|
356
|
+
.execute();
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
return this.createQueryBuilder()
|
|
360
|
+
.update(target)
|
|
361
|
+
.set(partialEntity)
|
|
362
|
+
.where(criteria)
|
|
363
|
+
.execute();
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Updates all entities of target type, setting fields from supplied partial entity.
|
|
368
|
+
* This is a primitive operation without cascades, relations or other operations included.
|
|
369
|
+
* Executes fast and efficient UPDATE query without WHERE clause.
|
|
370
|
+
*
|
|
371
|
+
* WARNING! This method updates ALL rows in the target table.
|
|
372
|
+
*/
|
|
373
|
+
updateAll(target, partialEntity) {
|
|
374
|
+
return this.createQueryBuilder()
|
|
375
|
+
.update(target)
|
|
376
|
+
.set(partialEntity)
|
|
377
|
+
.execute();
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Deletes entities by a given condition(s).
|
|
381
|
+
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
382
|
+
* Executes fast and efficient DELETE query.
|
|
383
|
+
* Does not check if entity exist in the database.
|
|
384
|
+
* Condition(s) cannot be empty.
|
|
385
|
+
*/
|
|
386
|
+
delete(targetOrEntity, criteria) {
|
|
387
|
+
// if user passed empty criteria or empty list of criterias, then throw an error
|
|
388
|
+
if (OrmUtils_1.OrmUtils.isCriteriaNullOrEmpty(criteria)) {
|
|
389
|
+
return Promise.reject(new error_1.TypeORMError(`Empty criteria(s) are not allowed for the delete method.`));
|
|
390
|
+
}
|
|
391
|
+
if (OrmUtils_1.OrmUtils.isPrimitiveCriteria(criteria)) {
|
|
392
|
+
return this.createQueryBuilder()
|
|
393
|
+
.delete()
|
|
394
|
+
.from(targetOrEntity)
|
|
395
|
+
.whereInIds(criteria)
|
|
396
|
+
.execute();
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
return this.createQueryBuilder()
|
|
400
|
+
.delete()
|
|
401
|
+
.from(targetOrEntity)
|
|
402
|
+
.where(criteria)
|
|
403
|
+
.execute();
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Deletes all entities of target type.
|
|
408
|
+
* This is a primitive operation without cascades, relations or other operations included.
|
|
409
|
+
* Executes fast and efficient DELETE query without WHERE clause.
|
|
410
|
+
*
|
|
411
|
+
* WARNING! This method deletes ALL rows in the target table.
|
|
412
|
+
*/
|
|
413
|
+
deleteAll(targetOrEntity) {
|
|
414
|
+
return this.createQueryBuilder().delete().from(targetOrEntity).execute();
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Records the delete date of entities by a given condition(s).
|
|
418
|
+
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
419
|
+
* Executes fast and efficient UPDATE query.
|
|
420
|
+
* Does not check if entity exist in the database.
|
|
421
|
+
* Condition(s) cannot be empty.
|
|
422
|
+
*/
|
|
423
|
+
softDelete(targetOrEntity, criteria) {
|
|
424
|
+
// if user passed empty criteria or empty list of criterias, then throw an error
|
|
425
|
+
if (OrmUtils_1.OrmUtils.isCriteriaNullOrEmpty(criteria)) {
|
|
426
|
+
return Promise.reject(new error_1.TypeORMError(`Empty criteria(s) are not allowed for the softDelete method.`));
|
|
427
|
+
}
|
|
428
|
+
if (OrmUtils_1.OrmUtils.isPrimitiveCriteria(criteria)) {
|
|
429
|
+
return this.createQueryBuilder()
|
|
430
|
+
.softDelete()
|
|
431
|
+
.from(targetOrEntity)
|
|
432
|
+
.whereInIds(criteria)
|
|
433
|
+
.execute();
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
return this.createQueryBuilder()
|
|
437
|
+
.softDelete()
|
|
438
|
+
.from(targetOrEntity)
|
|
439
|
+
.where(criteria)
|
|
440
|
+
.execute();
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Restores entities by a given condition(s).
|
|
445
|
+
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
446
|
+
* Executes fast and efficient DELETE query.
|
|
447
|
+
* Does not check if entity exist in the database.
|
|
448
|
+
* Condition(s) cannot be empty.
|
|
449
|
+
*/
|
|
450
|
+
restore(targetOrEntity, criteria) {
|
|
451
|
+
// if user passed empty criteria or empty list of criterias, then throw an error
|
|
452
|
+
if (OrmUtils_1.OrmUtils.isCriteriaNullOrEmpty(criteria)) {
|
|
453
|
+
return Promise.reject(new error_1.TypeORMError(`Empty criteria(s) are not allowed for the restore method.`));
|
|
454
|
+
}
|
|
455
|
+
if (OrmUtils_1.OrmUtils.isPrimitiveCriteria(criteria)) {
|
|
456
|
+
return this.createQueryBuilder()
|
|
457
|
+
.restore()
|
|
458
|
+
.from(targetOrEntity)
|
|
459
|
+
.whereInIds(criteria)
|
|
460
|
+
.execute();
|
|
461
|
+
}
|
|
462
|
+
else {
|
|
463
|
+
return this.createQueryBuilder()
|
|
464
|
+
.restore()
|
|
465
|
+
.from(targetOrEntity)
|
|
466
|
+
.where(criteria)
|
|
467
|
+
.execute();
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Checks whether any entity exists with the given options.
|
|
472
|
+
*/
|
|
473
|
+
exists(entityClass, options) {
|
|
474
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
475
|
+
return this.createQueryBuilder(entityClass, FindOptionsUtils_1.FindOptionsUtils.extractFindManyOptionsAlias(options) ||
|
|
476
|
+
metadata.name)
|
|
477
|
+
.setFindOptions(options || {})
|
|
478
|
+
.getExists();
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Checks whether any entity exists with the given conditions.
|
|
482
|
+
*/
|
|
483
|
+
async existsBy(entityClass, where) {
|
|
484
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
485
|
+
return this.createQueryBuilder(entityClass, metadata.name)
|
|
486
|
+
.setFindOptions({ where })
|
|
487
|
+
.getExists();
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Counts entities that match given options.
|
|
491
|
+
* Useful for pagination.
|
|
492
|
+
*/
|
|
493
|
+
count(entityClass, options) {
|
|
494
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
495
|
+
return this.createQueryBuilder(entityClass, FindOptionsUtils_1.FindOptionsUtils.extractFindManyOptionsAlias(options) ||
|
|
496
|
+
metadata.name)
|
|
497
|
+
.setFindOptions(options || {})
|
|
498
|
+
.getCount();
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Counts entities that match given conditions.
|
|
502
|
+
* Useful for pagination.
|
|
503
|
+
*/
|
|
504
|
+
countBy(entityClass, where) {
|
|
505
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
506
|
+
return this.createQueryBuilder(entityClass, metadata.name)
|
|
507
|
+
.setFindOptions({ where })
|
|
508
|
+
.getCount();
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Return the SUM of a column
|
|
512
|
+
*/
|
|
513
|
+
sum(entityClass, columnName, where) {
|
|
514
|
+
return this.callAggregateFun(entityClass, "SUM", columnName, where);
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Return the AVG of a column
|
|
518
|
+
*/
|
|
519
|
+
average(entityClass, columnName, where) {
|
|
520
|
+
return this.callAggregateFun(entityClass, "AVG", columnName, where);
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Return the MIN of a column
|
|
524
|
+
*/
|
|
525
|
+
minimum(entityClass, columnName, where) {
|
|
526
|
+
return this.callAggregateFun(entityClass, "MIN", columnName, where);
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Return the MAX of a column
|
|
530
|
+
*/
|
|
531
|
+
maximum(entityClass, columnName, where) {
|
|
532
|
+
return this.callAggregateFun(entityClass, "MAX", columnName, where);
|
|
533
|
+
}
|
|
534
|
+
async callAggregateFun(entityClass, fnName, columnName, where = {}) {
|
|
535
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
536
|
+
const column = metadata.columns.find((item) => item.propertyPath === columnName);
|
|
537
|
+
if (!column) {
|
|
538
|
+
throw new error_1.TypeORMError(`Column "${columnName}" was not found in table "${metadata.name}"`);
|
|
539
|
+
}
|
|
540
|
+
const result = await this.createQueryBuilder(entityClass, metadata.name)
|
|
541
|
+
.setFindOptions({ where })
|
|
542
|
+
.select(`${fnName}(${this.connection.driver.escape(column.databaseName)})`, fnName)
|
|
543
|
+
.getRawOne();
|
|
544
|
+
return result[fnName] === null ? null : parseFloat(result[fnName]);
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Finds entities that match given find options.
|
|
548
|
+
*/
|
|
549
|
+
async find(entityClass, options) {
|
|
550
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
551
|
+
return this.createQueryBuilder(entityClass, FindOptionsUtils_1.FindOptionsUtils.extractFindManyOptionsAlias(options) ||
|
|
552
|
+
metadata.name)
|
|
553
|
+
.setFindOptions(options || {})
|
|
554
|
+
.getMany();
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Finds entities that match given find options.
|
|
558
|
+
*/
|
|
559
|
+
async findBy(entityClass, where) {
|
|
560
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
561
|
+
return this.createQueryBuilder(entityClass, metadata.name)
|
|
562
|
+
.setFindOptions({ where: where })
|
|
563
|
+
.getMany();
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Finds entities that match given find options.
|
|
567
|
+
* Also counts all entities that match given conditions,
|
|
568
|
+
* but ignores pagination settings (from and take options).
|
|
569
|
+
*/
|
|
570
|
+
findAndCount(entityClass, options) {
|
|
571
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
572
|
+
return this.createQueryBuilder(entityClass, FindOptionsUtils_1.FindOptionsUtils.extractFindManyOptionsAlias(options) ||
|
|
573
|
+
metadata.name)
|
|
574
|
+
.setFindOptions(options || {})
|
|
575
|
+
.getManyAndCount();
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Finds entities that match given WHERE conditions.
|
|
579
|
+
* Also counts all entities that match given conditions,
|
|
580
|
+
* but ignores pagination settings (from and take options).
|
|
581
|
+
*/
|
|
582
|
+
findAndCountBy(entityClass, where) {
|
|
583
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
584
|
+
return this.createQueryBuilder(entityClass, metadata.name)
|
|
585
|
+
.setFindOptions({ where })
|
|
586
|
+
.getManyAndCount();
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Finds entities with ids.
|
|
590
|
+
* Optionally find options or conditions can be applied.
|
|
591
|
+
*
|
|
592
|
+
* @deprecated use `findBy` method instead in conjunction with `In` operator, for example:
|
|
593
|
+
*
|
|
594
|
+
* .findBy({
|
|
595
|
+
* id: In([1, 2, 3])
|
|
596
|
+
* })
|
|
597
|
+
*/
|
|
598
|
+
async findByIds(entityClass, ids) {
|
|
599
|
+
// if no ids passed, no need to execute a query - just return an empty array of values
|
|
600
|
+
if (!ids.length)
|
|
601
|
+
return Promise.resolve([]);
|
|
602
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
603
|
+
return this.createQueryBuilder(entityClass, metadata.name)
|
|
604
|
+
.andWhereInIds(ids)
|
|
605
|
+
.getMany();
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Finds first entity by a given find options.
|
|
609
|
+
* If entity was not found in the database - returns null.
|
|
610
|
+
*/
|
|
611
|
+
async findOne(entityClass, options) {
|
|
612
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
613
|
+
// prepare alias for built query
|
|
614
|
+
let alias = metadata.name;
|
|
615
|
+
if (options && options.join) {
|
|
616
|
+
alias = options.join.alias;
|
|
617
|
+
}
|
|
618
|
+
if (!options.where) {
|
|
619
|
+
throw new Error(`You must provide selection conditions in order to find a single row.`);
|
|
620
|
+
}
|
|
621
|
+
// create query builder and apply find options
|
|
622
|
+
return this.createQueryBuilder(entityClass, alias)
|
|
623
|
+
.setFindOptions({
|
|
624
|
+
...options,
|
|
625
|
+
take: 1,
|
|
626
|
+
})
|
|
627
|
+
.getOne();
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Finds first entity that matches given where condition.
|
|
631
|
+
* If entity was not found in the database - returns null.
|
|
632
|
+
*/
|
|
633
|
+
async findOneBy(entityClass, where) {
|
|
634
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
635
|
+
// create query builder and apply find options
|
|
636
|
+
return this.createQueryBuilder(entityClass, metadata.name)
|
|
637
|
+
.setFindOptions({
|
|
638
|
+
where,
|
|
639
|
+
take: 1,
|
|
640
|
+
})
|
|
641
|
+
.getOne();
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Finds first entity that matches given id.
|
|
645
|
+
* If entity was not found in the database - returns null.
|
|
646
|
+
*
|
|
647
|
+
* @deprecated use `findOneBy` method instead in conjunction with `In` operator, for example:
|
|
648
|
+
*
|
|
649
|
+
* .findOneBy({
|
|
650
|
+
* id: 1 // where "id" is your primary column name
|
|
651
|
+
* })
|
|
652
|
+
*/
|
|
653
|
+
async findOneById(entityClass, id) {
|
|
654
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
655
|
+
// create query builder and apply find options
|
|
656
|
+
return this.createQueryBuilder(entityClass, metadata.name)
|
|
657
|
+
.setFindOptions({
|
|
658
|
+
take: 1,
|
|
659
|
+
})
|
|
660
|
+
.whereInIds(metadata.ensureEntityIdMap(id))
|
|
661
|
+
.getOne();
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Finds first entity by a given find options.
|
|
665
|
+
* If entity was not found in the database - rejects with error.
|
|
666
|
+
*/
|
|
667
|
+
async findOneOrFail(entityClass, options) {
|
|
668
|
+
return this.findOne(entityClass, options).then((value) => {
|
|
669
|
+
if (value === null) {
|
|
670
|
+
return Promise.reject(new EntityNotFoundError_1.EntityNotFoundError(entityClass, options));
|
|
671
|
+
}
|
|
672
|
+
return Promise.resolve(value);
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Finds first entity that matches given where condition.
|
|
677
|
+
* If entity was not found in the database - rejects with error.
|
|
678
|
+
*/
|
|
679
|
+
async findOneByOrFail(entityClass, where) {
|
|
680
|
+
return this.findOneBy(entityClass, where).then((value) => {
|
|
681
|
+
if (value === null) {
|
|
682
|
+
return Promise.reject(new EntityNotFoundError_1.EntityNotFoundError(entityClass, where));
|
|
683
|
+
}
|
|
684
|
+
return Promise.resolve(value);
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Clears all the data from the given table (truncates/drops it).
|
|
689
|
+
*
|
|
690
|
+
* Note: this method uses TRUNCATE and may not work as you expect in transactions on some platforms.
|
|
691
|
+
* @see https://stackoverflow.com/a/5972738/925151
|
|
692
|
+
*/
|
|
693
|
+
async clear(entityClass) {
|
|
694
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
695
|
+
const queryRunner = this.queryRunner || this.connection.createQueryRunner();
|
|
696
|
+
try {
|
|
697
|
+
return await queryRunner.clearTable(metadata.tablePath); // await is needed here because we are using finally
|
|
698
|
+
}
|
|
699
|
+
finally {
|
|
700
|
+
if (!this.queryRunner)
|
|
701
|
+
await queryRunner.release();
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Increments some column by provided value of the entities matched given conditions.
|
|
706
|
+
*/
|
|
707
|
+
async increment(entityClass, conditions, propertyPath, value) {
|
|
708
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
709
|
+
const column = metadata.findColumnWithPropertyPath(propertyPath);
|
|
710
|
+
if (!column)
|
|
711
|
+
throw new error_1.TypeORMError(`Column ${propertyPath} was not found in ${metadata.targetName} entity.`);
|
|
712
|
+
if (isNaN(Number(value)))
|
|
713
|
+
throw new error_1.TypeORMError(`Value "${value}" is not a number.`);
|
|
714
|
+
// convert possible embedded path "social.likes" into object { social: { like: () => value } }
|
|
715
|
+
const values = propertyPath
|
|
716
|
+
.split(".")
|
|
717
|
+
.reduceRight((value, key) => ({ [key]: value }), () => this.connection.driver.escape(column.databaseName) +
|
|
718
|
+
" + " +
|
|
719
|
+
value);
|
|
720
|
+
return this.createQueryBuilder(entityClass, "entity")
|
|
721
|
+
.update(entityClass)
|
|
722
|
+
.set(values)
|
|
723
|
+
.where(conditions)
|
|
724
|
+
.execute();
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Decrements some column by provided value of the entities matched given conditions.
|
|
728
|
+
*/
|
|
729
|
+
async decrement(entityClass, conditions, propertyPath, value) {
|
|
730
|
+
const metadata = this.connection.getMetadata(entityClass);
|
|
731
|
+
const column = metadata.findColumnWithPropertyPath(propertyPath);
|
|
732
|
+
if (!column)
|
|
733
|
+
throw new error_1.TypeORMError(`Column ${propertyPath} was not found in ${metadata.targetName} entity.`);
|
|
734
|
+
if (isNaN(Number(value)))
|
|
735
|
+
throw new error_1.TypeORMError(`Value "${value}" is not a number.`);
|
|
736
|
+
// convert possible embedded path "social.likes" into object { social: { like: () => value } }
|
|
737
|
+
const values = propertyPath
|
|
738
|
+
.split(".")
|
|
739
|
+
.reduceRight((value, key) => ({ [key]: value }), () => this.connection.driver.escape(column.databaseName) +
|
|
740
|
+
" - " +
|
|
741
|
+
value);
|
|
742
|
+
return this.createQueryBuilder(entityClass, "entity")
|
|
743
|
+
.update(entityClass)
|
|
744
|
+
.set(values)
|
|
745
|
+
.where(conditions)
|
|
746
|
+
.execute();
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* Gets repository for the given entity class or name.
|
|
750
|
+
* If single database connection mode is used, then repository is obtained from the
|
|
751
|
+
* repository aggregator, where each repository is individually created for this entity manager.
|
|
752
|
+
* When single database connection is not used, repository is being obtained from the connection.
|
|
753
|
+
*/
|
|
754
|
+
getRepository(target) {
|
|
755
|
+
// find already created repository instance and return it if found
|
|
756
|
+
const repoFromMap = this.repositories.get(target);
|
|
757
|
+
if (repoFromMap)
|
|
758
|
+
return repoFromMap;
|
|
759
|
+
// if repository was not found then create it, store its instance and return it
|
|
760
|
+
if (this.connection.driver.options.type === "mongodb") {
|
|
761
|
+
const newRepository = new MongoRepository_1.MongoRepository(target, this, this.queryRunner);
|
|
762
|
+
this.repositories.set(target, newRepository);
|
|
763
|
+
return newRepository;
|
|
764
|
+
}
|
|
765
|
+
else {
|
|
766
|
+
const newRepository = new Repository_1.Repository(target, this, this.queryRunner);
|
|
767
|
+
this.repositories.set(target, newRepository);
|
|
768
|
+
return newRepository;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Gets tree repository for the given entity class or name.
|
|
773
|
+
* If single database connection mode is used, then repository is obtained from the
|
|
774
|
+
* repository aggregator, where each repository is individually created for this entity manager.
|
|
775
|
+
* When single database connection is not used, repository is being obtained from the connection.
|
|
776
|
+
*/
|
|
777
|
+
getTreeRepository(target) {
|
|
778
|
+
// tree tables aren't supported by some drivers (mongodb)
|
|
779
|
+
if (this.connection.driver.treeSupport === false)
|
|
780
|
+
throw new error_1.TreeRepositoryNotSupportedError(this.connection.driver);
|
|
781
|
+
// find already created repository instance and return it if found
|
|
782
|
+
const repository = this.treeRepositories.find((repository) => repository.target === target);
|
|
783
|
+
if (repository)
|
|
784
|
+
return repository;
|
|
785
|
+
// check if repository is real tree repository
|
|
786
|
+
const newRepository = new TreeRepository_1.TreeRepository(target, this, this.queryRunner);
|
|
787
|
+
this.treeRepositories.push(newRepository);
|
|
788
|
+
return newRepository;
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* Gets mongodb repository for the given entity class.
|
|
792
|
+
*/
|
|
793
|
+
getMongoRepository(target) {
|
|
794
|
+
return this.connection.getMongoRepository(target);
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* Creates a new repository instance out of a given Repository and
|
|
798
|
+
* sets current EntityManager instance to it. Used to work with custom repositories
|
|
799
|
+
* in transactions.
|
|
800
|
+
*/
|
|
801
|
+
withRepository(repository) {
|
|
802
|
+
const repositoryConstructor = repository.constructor;
|
|
803
|
+
const { target, manager, queryRunner, ...otherRepositoryProperties } = repository;
|
|
804
|
+
return Object.assign(new repositoryConstructor(repository.target, this), {
|
|
805
|
+
...otherRepositoryProperties,
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Gets custom entity repository marked with @EntityRepository decorator.
|
|
810
|
+
*
|
|
811
|
+
* @deprecated use Repository.extend to create custom repositories
|
|
812
|
+
*/
|
|
813
|
+
getCustomRepository(customRepository) {
|
|
814
|
+
const entityRepositoryMetadataArgs = (0, globals_1.getMetadataArgsStorage)().entityRepositories.find((repository) => {
|
|
815
|
+
return (repository.target ===
|
|
816
|
+
(typeof customRepository === "function"
|
|
817
|
+
? customRepository
|
|
818
|
+
: customRepository.constructor));
|
|
819
|
+
});
|
|
820
|
+
if (!entityRepositoryMetadataArgs)
|
|
821
|
+
throw new error_1.CustomRepositoryNotFoundError(customRepository);
|
|
822
|
+
const entityMetadata = entityRepositoryMetadataArgs.entity
|
|
823
|
+
? this.connection.getMetadata(entityRepositoryMetadataArgs.entity)
|
|
824
|
+
: undefined;
|
|
825
|
+
const entityRepositoryInstance = new entityRepositoryMetadataArgs.target(this, entityMetadata);
|
|
826
|
+
// NOTE: dynamic access to protected properties. We need this to prevent unwanted properties in those classes to be exposed,
|
|
827
|
+
// however we need these properties for internal work of the class
|
|
828
|
+
if (entityRepositoryInstance instanceof AbstractRepository_1.AbstractRepository) {
|
|
829
|
+
if (!entityRepositoryInstance["manager"])
|
|
830
|
+
entityRepositoryInstance["manager"] = this;
|
|
831
|
+
}
|
|
832
|
+
else {
|
|
833
|
+
if (!entityMetadata)
|
|
834
|
+
throw new error_1.CustomRepositoryCannotInheritRepositoryError(customRepository);
|
|
835
|
+
entityRepositoryInstance["manager"] = this;
|
|
836
|
+
entityRepositoryInstance["metadata"] = entityMetadata;
|
|
837
|
+
}
|
|
838
|
+
return entityRepositoryInstance;
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Releases all resources used by entity manager.
|
|
842
|
+
* This is used when entity manager is created with a single query runner,
|
|
843
|
+
* and this single query runner needs to be released after job with entity manager is done.
|
|
844
|
+
*/
|
|
845
|
+
async release() {
|
|
846
|
+
if (!this.queryRunner)
|
|
847
|
+
throw new NoNeedToReleaseEntityManagerError_1.NoNeedToReleaseEntityManagerError();
|
|
848
|
+
return this.queryRunner.release();
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
exports.EntityManager = EntityManager;
|
|
852
|
+
|
|
853
|
+
//# sourceMappingURL=EntityManager.js.map
|