velocious 1.0.577 → 1.0.579
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/README.md +12 -6
- package/build/application.js +3 -3
- package/build/authorization/ability.js +6 -6
- package/build/authorization/base-resource.js +1 -1
- package/build/background-jobs/client.js +2 -2
- package/build/background-jobs/forked-runner-child.js +4 -4
- package/build/background-jobs/job-runner.js +2 -2
- package/build/background-jobs/job.js +6 -6
- package/build/background-jobs/json-socket.js +1 -1
- package/build/background-jobs/main.js +13 -13
- package/build/background-jobs/normalize-error.js +2 -2
- package/build/background-jobs/pooled-runner-child.js +3 -3
- package/build/background-jobs/scheduler.js +1 -1
- package/build/background-jobs/status-reporter.js +2 -2
- package/build/background-jobs/store.js +23 -23
- package/build/background-jobs/types.js +6 -6
- package/build/background-jobs/web/controller.js +6 -6
- package/build/background-jobs/web/counts-channel.js +1 -1
- package/build/background-jobs/worker.js +8 -8
- package/build/beacon/client.js +3 -3
- package/build/beacon/in-process-client.js +3 -3
- package/build/beacon/types.js +1 -1
- package/build/cli/base-command.js +1 -1
- package/build/cli/commands/console.js +1 -1
- package/build/cli/commands/db/schema/dump.js +1 -1
- package/build/cli/commands/db/schema/load.js +1 -1
- package/build/cli/commands/db/seed.js +1 -1
- package/build/cli/commands/generate/frontend-models.js +1 -1
- package/build/cli/commands/lint/relationships.js +1 -1
- package/build/cli/commands/run-script.js +1 -1
- package/build/cli/commands/runner.js +1 -1
- package/build/cli/index.js +2 -2
- package/build/cli/tenant-database-command-helper.js +2 -2
- package/build/configuration-types.js +48 -47
- package/build/configuration.js +150 -65
- package/build/controller.js +11 -8
- package/build/current.js +2 -2
- package/build/database/annotations-async-hooks.js +3 -3
- package/build/database/annotations.js +1 -1
- package/build/database/drivers/base-column.js +1 -1
- package/build/database/drivers/base-foreign-key.js +1 -1
- package/build/database/drivers/base-table.js +1 -1
- package/build/database/drivers/base.js +18 -18
- package/build/database/drivers/mssql/column.js +1 -1
- package/build/database/drivers/mssql/index.js +2 -2
- package/build/database/drivers/mssql/options.js +1 -1
- package/build/database/drivers/mssql/structure-sql.js +1 -1
- package/build/database/drivers/mssql/table.js +1 -1
- package/build/database/drivers/mysql/column.js +1 -1
- package/build/database/drivers/mysql/index.js +4 -4
- package/build/database/drivers/mysql/options.js +1 -1
- package/build/database/drivers/mysql/query.js +7 -7
- package/build/database/drivers/mysql/structure-sql.js +71 -10
- package/build/database/drivers/pgsql/column.js +1 -1
- package/build/database/drivers/pgsql/index.js +6 -6
- package/build/database/drivers/pgsql/structure-sql.js +1 -1
- package/build/database/drivers/sqlite/base.js +7 -7
- package/build/database/drivers/sqlite/column.js +1 -1
- package/build/database/drivers/sqlite/connection-sql-js.js +1 -1
- package/build/database/drivers/sqlite/foreign-key.js +1 -1
- package/build/database/drivers/sqlite/index.js +1 -1
- package/build/database/drivers/sqlite/index.native.js +2 -2
- package/build/database/drivers/sqlite/index.web.js +2 -2
- package/build/database/drivers/sqlite/query.js +2 -2
- package/build/database/drivers/sqlite/query.native.js +2 -2
- package/build/database/drivers/sqlite/query.web.js +2 -2
- package/build/database/drivers/sqlite/table-rebuilder.js +1 -1
- package/build/database/migration/index.js +2 -2
- package/build/database/migrator/types.js +2 -2
- package/build/database/operation.js +59 -6
- package/build/database/pool/async-tracked-multi-connection.js +75 -24
- package/build/database/pool/base-methods-forward.js +2 -2
- package/build/database/pool/base.js +48 -17
- package/build/database/pool/single-multi-use.js +501 -103
- package/build/database/query/delete-base.js +1 -1
- package/build/database/query/index.js +3 -3
- package/build/database/query/insert-base.js +4 -4
- package/build/database/query/model-class-query.js +39 -39
- package/build/database/query/preloader/belongs-to.js +2 -2
- package/build/database/query/preloader/ensure-model-class-initialized.js +3 -2
- package/build/database/query/preloader/has-many.js +3 -3
- package/build/database/query/preloader/has-one.js +1 -1
- package/build/database/query/preloader.js +9 -2
- package/build/database/query/query-data.js +7 -7
- package/build/database/query/update-base.js +3 -3
- package/build/database/query/upsert-base.js +2 -2
- package/build/database/query/where-model-class-hash.js +13 -13
- package/build/database/query/with-count.js +12 -12
- package/build/database/query-parser/options.js +2 -2
- package/build/database/query-parser/select-parser.js +1 -1
- package/build/database/record/acts-as-list.js +2 -2
- package/build/database/record/attachments/handle.js +6 -6
- package/build/database/record/attachments/normalize-input.js +11 -11
- package/build/database/record/attachments/storage-drivers/filesystem.js +1 -1
- package/build/database/record/attachments/storage-drivers/native.js +5 -5
- package/build/database/record/attachments/storage-drivers/s3.js +10 -10
- package/build/database/record/attachments/store.js +24 -20
- package/build/database/record/auditing.js +123 -29
- package/build/database/record/counter-cache-magnitude.js +11 -11
- package/build/database/record/index.js +227 -174
- package/build/database/record/instance-relationships/base.js +4 -4
- package/build/database/record/instance-relationships/belongs-to.js +1 -1
- package/build/database/record/instance-relationships/has-many.js +3 -3
- package/build/database/record/instance-relationships/has-one.js +1 -1
- package/build/database/record/record-not-found-error.js +1 -0
- package/build/database/record/relationships/base.js +22 -0
- package/build/database/record/state-machine.js +6 -6
- package/build/database/record/validators/base.js +1 -1
- package/build/database/structure-sql-loader.js +3 -3
- package/build/database/table-data/table-column.js +3 -3
- package/build/database/use-live-query.js +3 -3
- package/build/environment-handlers/base.js +56 -37
- package/build/environment-handlers/browser.js +1 -1
- package/build/environment-handlers/node/cli/commands/console.js +4 -4
- package/build/environment-handlers/node/cli/commands/db/seed.js +2 -2
- package/build/environment-handlers/node/cli/commands/generate/base-models.js +1 -1
- package/build/environment-handlers/node/cli/commands/run-script.js +2 -2
- package/build/environment-handlers/node/cli/commands/runner.js +2 -2
- package/build/environment-handlers/node/cli/commands/server.js +1 -1
- package/build/environment-handlers/node.js +36 -36
- package/build/error-logger.js +2 -2
- package/build/error-reporting/request-details.js +32 -32
- package/build/frontend-model-controller.js +215 -213
- package/build/frontend-model-resource/base-resource.js +44 -44
- package/build/frontend-model-resource/velocious-attachment-resource.js +1 -1
- package/build/frontend-models/base.js +146 -142
- package/build/frontend-models/clear-pending-debounced-callback.js +2 -2
- package/build/frontend-models/model-registry.js +4 -4
- package/build/frontend-models/outgoing-event-buffer.js +1 -1
- package/build/frontend-models/preloader.js +1 -1
- package/build/frontend-models/query.js +60 -60
- package/build/frontend-models/resource-definition.js +9 -9
- package/build/frontend-models/transport-serialization.js +27 -27
- package/build/frontend-models/websocket-channel.js +4 -4
- package/build/frontend-models/websocket-publishers.js +1 -1
- package/build/http-client/request.js +1 -1
- package/build/http-client/response.js +1 -1
- package/build/http-server/client/index.js +4 -4
- package/build/http-server/client/params-to-object.js +16 -16
- package/build/http-server/client/request-buffer/index.js +5 -2
- package/build/http-server/client/request-parser.js +2 -2
- package/build/http-server/client/request-runner.js +2 -2
- package/build/http-server/client/request.js +2 -2
- package/build/http-server/client/websocket-request.js +6 -6
- package/build/http-server/client/websocket-session.js +28 -28
- package/build/http-server/cookie.js +2 -2
- package/build/http-server/development-reloader.js +1 -1
- package/build/http-server/index.js +5 -5
- package/build/http-server/remote-address.js +1 -1
- package/build/http-server/server-lock.js +4 -4
- package/build/http-server/websocket-channel-subscribers.js +4 -4
- package/build/http-server/websocket-channel.js +1 -1
- package/build/http-server/websocket-connection.js +3 -3
- package/build/http-server/websocket-event-log-store.js +9 -9
- package/build/http-server/websocket-events-host.js +7 -7
- package/build/http-server/websocket-events.js +4 -4
- package/build/http-server/worker-handler/channel-subscriber-dispatch.js +1 -1
- package/build/http-server/worker-handler/in-process.js +5 -5
- package/build/http-server/worker-handler/index.js +10 -10
- package/build/http-server/worker-handler/worker-thread.js +8 -8
- package/build/index.d.ts.map +1 -1
- package/build/logger/base-logger.js +1 -1
- package/build/logger.js +12 -12
- package/build/mailer/backends/smtp.js +3 -3
- package/build/mailer/base.js +14 -14
- package/build/mailer/delivery.js +3 -3
- package/build/mailer/index.js +1 -1
- package/build/mailer.js +1 -1
- package/build/plugins/sqljs-wasm-route-controller.js +1 -1
- package/build/record-payload-values.js +3 -3
- package/build/routes/base-route.js +5 -5
- package/build/routes/basic-route.js +4 -4
- package/build/routes/get-route.js +2 -2
- package/build/routes/hooks/frontend-model-command-route-hook.js +1 -1
- package/build/routes/index.js +3 -3
- package/build/routes/namespace-route.js +1 -1
- package/build/routes/plugin-routes.js +1 -1
- package/build/routes/post-route.js +2 -2
- package/build/routes/resolver.js +5 -5
- package/build/routes/resource-route.js +1 -1
- package/build/src/application.d.ts +26 -29
- package/build/src/application.d.ts.map +1 -1
- package/build/src/application.js +4 -4
- package/build/src/authorization/ability.d.ts +47 -53
- package/build/src/authorization/ability.d.ts.map +1 -1
- package/build/src/authorization/ability.js +7 -7
- package/build/src/authorization/base-resource.d.ts +13 -13
- package/build/src/authorization/base-resource.d.ts.map +1 -1
- package/build/src/authorization/base-resource.js +2 -2
- package/build/src/background-jobs/client.d.ts +9 -9
- package/build/src/background-jobs/client.d.ts.map +1 -1
- package/build/src/background-jobs/client.js +3 -3
- package/build/src/background-jobs/cron-expression.d.ts +25 -16
- package/build/src/background-jobs/cron-expression.d.ts.map +1 -1
- package/build/src/background-jobs/forked-runner-child.js +5 -5
- package/build/src/background-jobs/job-record.d.ts +4 -3
- package/build/src/background-jobs/job-record.d.ts.map +1 -1
- package/build/src/background-jobs/job-registry.d.ts +6 -6
- package/build/src/background-jobs/job-registry.d.ts.map +1 -1
- package/build/src/background-jobs/job-runner.d.ts +9 -9
- package/build/src/background-jobs/job-runner.d.ts.map +1 -1
- package/build/src/background-jobs/job-runner.js +3 -3
- package/build/src/background-jobs/job.d.ts +14 -14
- package/build/src/background-jobs/job.d.ts.map +1 -1
- package/build/src/background-jobs/job.js +7 -7
- package/build/src/background-jobs/json-socket.d.ts +9 -10
- package/build/src/background-jobs/json-socket.d.ts.map +1 -1
- package/build/src/background-jobs/json-socket.js +2 -2
- package/build/src/background-jobs/main.d.ts +56 -59
- package/build/src/background-jobs/main.d.ts.map +1 -1
- package/build/src/background-jobs/main.js +14 -14
- package/build/src/background-jobs/normalize-error.d.ts +2 -2
- package/build/src/background-jobs/normalize-error.d.ts.map +1 -1
- package/build/src/background-jobs/normalize-error.js +3 -3
- package/build/src/background-jobs/pooled-runner-child.js +4 -4
- package/build/src/background-jobs/runner-graceful-shutdown.d.ts +7 -12
- package/build/src/background-jobs/runner-graceful-shutdown.d.ts.map +1 -1
- package/build/src/background-jobs/runner-process-title.d.ts.map +1 -1
- package/build/src/background-jobs/scheduler.d.ts +41 -41
- package/build/src/background-jobs/scheduler.d.ts.map +1 -1
- package/build/src/background-jobs/scheduler.js +2 -2
- package/build/src/background-jobs/socket-request.d.ts +14 -14
- package/build/src/background-jobs/socket-request.d.ts.map +1 -1
- package/build/src/background-jobs/status-reporter.d.ts +28 -28
- package/build/src/background-jobs/status-reporter.d.ts.map +1 -1
- package/build/src/background-jobs/status-reporter.js +3 -3
- package/build/src/background-jobs/store.d.ts +100 -103
- package/build/src/background-jobs/store.d.ts.map +1 -1
- package/build/src/background-jobs/store.js +24 -24
- package/build/src/background-jobs/types.d.ts +124 -124
- package/build/src/background-jobs/types.d.ts.map +1 -1
- package/build/src/background-jobs/types.js +7 -7
- package/build/src/background-jobs/web/authorization.d.ts +2 -2
- package/build/src/background-jobs/web/authorization.d.ts.map +1 -1
- package/build/src/background-jobs/web/controller.d.ts +13 -13
- package/build/src/background-jobs/web/controller.d.ts.map +1 -1
- package/build/src/background-jobs/web/controller.js +7 -7
- package/build/src/background-jobs/web/counts-channel.d.ts +8 -8
- package/build/src/background-jobs/web/counts-channel.d.ts.map +1 -1
- package/build/src/background-jobs/web/counts-channel.js +2 -2
- package/build/src/background-jobs/web/index.d.ts +4 -4
- package/build/src/background-jobs/web/index.d.ts.map +1 -1
- package/build/src/background-jobs/web/path-matcher.d.ts +18 -13
- package/build/src/background-jobs/web/path-matcher.d.ts.map +1 -1
- package/build/src/background-jobs/web/registry.d.ts +21 -24
- package/build/src/background-jobs/web/registry.d.ts.map +1 -1
- package/build/src/background-jobs/worker.d.ts +74 -77
- package/build/src/background-jobs/worker.d.ts.map +1 -1
- package/build/src/background-jobs/worker.js +9 -9
- package/build/src/beacon/client.d.ts +30 -34
- package/build/src/beacon/client.d.ts.map +1 -1
- package/build/src/beacon/client.js +4 -4
- package/build/src/beacon/in-process-broker.d.ts +6 -9
- package/build/src/beacon/in-process-broker.d.ts.map +1 -1
- package/build/src/beacon/in-process-client.d.ts +17 -21
- package/build/src/beacon/in-process-client.d.ts.map +1 -1
- package/build/src/beacon/in-process-client.js +4 -4
- package/build/src/beacon/server.d.ts +15 -15
- package/build/src/beacon/server.d.ts.map +1 -1
- package/build/src/beacon/types.d.ts +21 -46
- package/build/src/beacon/types.d.ts.map +1 -1
- package/build/src/beacon/types.js +2 -2
- package/build/src/cli/base-command.d.ts +25 -28
- package/build/src/cli/base-command.d.ts.map +1 -1
- package/build/src/cli/base-command.js +2 -2
- package/build/src/cli/browser-cli.d.ts +1 -1
- package/build/src/cli/browser-cli.d.ts.map +1 -1
- package/build/src/cli/commands/background-jobs-main.d.ts +2 -1
- package/build/src/cli/commands/background-jobs-main.d.ts.map +1 -1
- package/build/src/cli/commands/background-jobs-runner.d.ts +2 -1
- package/build/src/cli/commands/background-jobs-runner.d.ts.map +1 -1
- package/build/src/cli/commands/background-jobs-worker.d.ts +2 -1
- package/build/src/cli/commands/background-jobs-worker.d.ts.map +1 -1
- package/build/src/cli/commands/beacon.d.ts +2 -1
- package/build/src/cli/commands/beacon.d.ts.map +1 -1
- package/build/src/cli/commands/console.d.ts +6 -1
- package/build/src/cli/commands/console.d.ts.map +1 -1
- package/build/src/cli/commands/console.js +2 -2
- package/build/src/cli/commands/db/base-command.d.ts +1 -1
- package/build/src/cli/commands/db/base-command.d.ts.map +1 -1
- package/build/src/cli/commands/db/create.d.ts +1 -1
- package/build/src/cli/commands/db/create.d.ts.map +1 -1
- package/build/src/cli/commands/db/drop.d.ts +1 -1
- package/build/src/cli/commands/db/drop.d.ts.map +1 -1
- package/build/src/cli/commands/db/migrate.d.ts +1 -1
- package/build/src/cli/commands/db/migrate.d.ts.map +1 -1
- package/build/src/cli/commands/db/reset.d.ts +1 -1
- package/build/src/cli/commands/db/reset.d.ts.map +1 -1
- package/build/src/cli/commands/db/rollback.d.ts +1 -1
- package/build/src/cli/commands/db/rollback.d.ts.map +1 -1
- package/build/src/cli/commands/db/schema/dump.d.ts +6 -1
- package/build/src/cli/commands/db/schema/dump.d.ts.map +1 -1
- package/build/src/cli/commands/db/schema/dump.js +2 -2
- package/build/src/cli/commands/db/schema/load.d.ts +6 -1
- package/build/src/cli/commands/db/schema/load.d.ts.map +1 -1
- package/build/src/cli/commands/db/schema/load.js +2 -2
- package/build/src/cli/commands/db/seed.d.ts +6 -1
- package/build/src/cli/commands/db/seed.d.ts.map +1 -1
- package/build/src/cli/commands/db/seed.js +2 -2
- package/build/src/cli/commands/db/tenants/check.d.ts +1 -1
- package/build/src/cli/commands/db/tenants/check.d.ts.map +1 -1
- package/build/src/cli/commands/db/tenants/create.d.ts +1 -1
- package/build/src/cli/commands/db/tenants/create.d.ts.map +1 -1
- package/build/src/cli/commands/db/tenants/drop.d.ts +1 -1
- package/build/src/cli/commands/db/tenants/drop.d.ts.map +1 -1
- package/build/src/cli/commands/db/tenants/migrate.d.ts +1 -1
- package/build/src/cli/commands/db/tenants/migrate.d.ts.map +1 -1
- package/build/src/cli/commands/destroy/migration.d.ts +2 -1
- package/build/src/cli/commands/destroy/migration.d.ts.map +1 -1
- package/build/src/cli/commands/generate/base-models.d.ts +2 -1
- package/build/src/cli/commands/generate/base-models.d.ts.map +1 -1
- package/build/src/cli/commands/generate/frontend-models.d.ts +6 -1
- package/build/src/cli/commands/generate/frontend-models.d.ts.map +1 -1
- package/build/src/cli/commands/generate/frontend-models.js +2 -2
- package/build/src/cli/commands/generate/migration.d.ts +2 -1
- package/build/src/cli/commands/generate/migration.d.ts.map +1 -1
- package/build/src/cli/commands/generate/model.d.ts +2 -1
- package/build/src/cli/commands/generate/model.d.ts.map +1 -1
- package/build/src/cli/commands/init.d.ts +4 -2
- package/build/src/cli/commands/init.d.ts.map +1 -1
- package/build/src/cli/commands/lint/relationships.d.ts +6 -1
- package/build/src/cli/commands/lint/relationships.d.ts.map +1 -1
- package/build/src/cli/commands/lint/relationships.js +2 -2
- package/build/src/cli/commands/routes.d.ts +2 -1
- package/build/src/cli/commands/routes.d.ts.map +1 -1
- package/build/src/cli/commands/run-script.d.ts +6 -1
- package/build/src/cli/commands/run-script.d.ts.map +1 -1
- package/build/src/cli/commands/run-script.js +2 -2
- package/build/src/cli/commands/runner.d.ts +6 -1
- package/build/src/cli/commands/runner.d.ts.map +1 -1
- package/build/src/cli/commands/runner.js +2 -2
- package/build/src/cli/commands/server.d.ts +2 -1
- package/build/src/cli/commands/server.d.ts.map +1 -1
- package/build/src/cli/commands/test.d.ts +2 -1
- package/build/src/cli/commands/test.d.ts.map +1 -1
- package/build/src/cli/index.d.ts +20 -20
- package/build/src/cli/index.d.ts.map +1 -1
- package/build/src/cli/index.js +3 -3
- package/build/src/cli/tenant-database-command-helper.d.ts +13 -13
- package/build/src/cli/tenant-database-command-helper.d.ts.map +1 -1
- package/build/src/cli/tenant-database-command-helper.js +3 -3
- package/build/src/cli/use-browser-cli.d.ts +1 -1
- package/build/src/cli/use-browser-cli.d.ts.map +1 -1
- package/build/src/configuration-resolver.d.ts +1 -1
- package/build/src/configuration-resolver.d.ts.map +1 -1
- package/build/src/configuration-types.d.ts +947 -1038
- package/build/src/configuration-types.d.ts.map +1 -1
- package/build/src/configuration-types.js +49 -48
- package/build/src/configuration.d.ts +145 -139
- package/build/src/configuration.d.ts.map +1 -1
- package/build/src/configuration.js +149 -66
- package/build/src/controller.d.ts +37 -35
- package/build/src/controller.d.ts.map +1 -1
- package/build/src/controller.js +11 -9
- package/build/src/current-configuration.d.ts +5 -4
- package/build/src/current-configuration.d.ts.map +1 -1
- package/build/src/current.d.ts +3 -3
- package/build/src/current.d.ts.map +1 -1
- package/build/src/current.js +3 -3
- package/build/src/database/advisory-lock-runner.d.ts +61 -60
- package/build/src/database/advisory-lock-runner.d.ts.map +1 -1
- package/build/src/database/annotations-async-hooks.js +4 -4
- package/build/src/database/annotations.d.ts +4 -6
- package/build/src/database/annotations.d.ts.map +1 -1
- package/build/src/database/annotations.js +2 -2
- package/build/src/database/column-types.d.ts +1 -1
- package/build/src/database/column-types.d.ts.map +1 -1
- package/build/src/database/datetime-storage.d.ts +6 -6
- package/build/src/database/datetime-storage.d.ts.map +1 -1
- package/build/src/database/drivers/base-column.d.ts +3 -3
- package/build/src/database/drivers/base-column.d.ts.map +1 -1
- package/build/src/database/drivers/base-column.js +2 -2
- package/build/src/database/drivers/base-columns-index.d.ts +2 -2
- package/build/src/database/drivers/base-columns-index.d.ts.map +1 -1
- package/build/src/database/drivers/base-foreign-key.d.ts +7 -7
- package/build/src/database/drivers/base-foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/base-foreign-key.js +2 -2
- package/build/src/database/drivers/base-table.d.ts +3 -3
- package/build/src/database/drivers/base-table.d.ts.map +1 -1
- package/build/src/database/drivers/base-table.js +2 -2
- package/build/src/database/drivers/base.d.ts +297 -342
- package/build/src/database/drivers/base.d.ts.map +1 -1
- package/build/src/database/drivers/base.js +19 -19
- package/build/src/database/drivers/index-metadata.d.ts +15 -18
- package/build/src/database/drivers/index-metadata.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/column.d.ts +10 -5
- package/build/src/database/drivers/mssql/column.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/column.js +2 -2
- package/build/src/database/drivers/mssql/columns-index.d.ts +30 -22
- package/build/src/database/drivers/mssql/columns-index.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/connect-connection.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/foreign-key.d.ts +1 -1
- package/build/src/database/drivers/mssql/foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/index.d.ts +250 -9
- package/build/src/database/drivers/mssql/index.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/index.js +3 -3
- package/build/src/database/drivers/mssql/options.d.ts +31 -1
- package/build/src/database/drivers/mssql/options.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/options.js +2 -2
- package/build/src/database/drivers/mssql/query-parser.d.ts +1 -1
- package/build/src/database/drivers/mssql/query-parser.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/alter-table.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/alter-table.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/create-database.d.ts +3 -2
- package/build/src/database/drivers/mssql/sql/create-database.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/create-index.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/create-index.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/create-table.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/create-table.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/delete.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/delete.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/drop-database.d.ts +14 -1
- package/build/src/database/drivers/mssql/sql/drop-database.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/drop-table.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/drop-table.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/insert.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/insert.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/remove-index.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/remove-index.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/update.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/update.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/upsert.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/upsert.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/structure-sql.d.ts +3 -3
- package/build/src/database/drivers/mssql/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/structure-sql.js +2 -2
- package/build/src/database/drivers/mssql/table.d.ts +39 -29
- package/build/src/database/drivers/mssql/table.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/table.js +2 -2
- package/build/src/database/drivers/mysql/column.d.ts +10 -6
- package/build/src/database/drivers/mysql/column.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/column.js +2 -2
- package/build/src/database/drivers/mysql/columns-index.d.ts +3 -1
- package/build/src/database/drivers/mysql/columns-index.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/foreign-key.d.ts +1 -1
- package/build/src/database/drivers/mysql/foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/index.d.ts +225 -6
- package/build/src/database/drivers/mysql/index.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/index.js +5 -5
- package/build/src/database/drivers/mysql/options.d.ts +7 -1
- package/build/src/database/drivers/mysql/options.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/options.js +2 -2
- package/build/src/database/drivers/mysql/query-parser.d.ts +1 -1
- package/build/src/database/drivers/mysql/query-parser.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/query-stream.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/query.d.ts +2 -2
- package/build/src/database/drivers/mysql/query.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/query.js +8 -8
- package/build/src/database/drivers/mysql/sql/alter-table.d.ts +12 -1
- package/build/src/database/drivers/mysql/sql/alter-table.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/create-database.d.ts +6 -1
- package/build/src/database/drivers/mysql/sql/create-database.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/create-index.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/create-index.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/create-table.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/create-table.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/delete.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/delete.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/drop-database.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/drop-database.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/drop-table.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/drop-table.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/insert.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/insert.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/remove-index.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/remove-index.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/update.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/update.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/upsert.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/upsert.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/structure-sql.d.ts +14 -3
- package/build/src/database/drivers/mysql/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/structure-sql.js +62 -11
- package/build/src/database/drivers/mysql/table.d.ts +11 -6
- package/build/src/database/drivers/mysql/table.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/column.d.ts +10 -5
- package/build/src/database/drivers/pgsql/column.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/column.js +2 -2
- package/build/src/database/drivers/pgsql/columns-index.d.ts +30 -22
- package/build/src/database/drivers/pgsql/columns-index.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/foreign-key.d.ts +1 -1
- package/build/src/database/drivers/pgsql/foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/index.d.ts +157 -6
- package/build/src/database/drivers/pgsql/index.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/index.js +7 -7
- package/build/src/database/drivers/pgsql/options.d.ts +1 -1
- package/build/src/database/drivers/pgsql/options.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/query-parser.d.ts +1 -1
- package/build/src/database/drivers/pgsql/query-parser.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/alter-table.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/alter-table.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/create-database.d.ts +2 -1
- package/build/src/database/drivers/pgsql/sql/create-database.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/create-index.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/create-index.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/create-table.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/create-table.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/delete.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/delete.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/drop-database.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/drop-database.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/drop-table.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/drop-table.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/insert.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/insert.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/remove-index.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/remove-index.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/update.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/update.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/upsert.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/upsert.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/structure-sql.d.ts +3 -3
- package/build/src/database/drivers/pgsql/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/structure-sql.js +2 -2
- package/build/src/database/drivers/pgsql/table.d.ts +33 -31
- package/build/src/database/drivers/pgsql/table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/base.d.ts +162 -12
- package/build/src/database/drivers/sqlite/base.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/base.js +8 -8
- package/build/src/database/drivers/sqlite/column.d.ts +12 -6
- package/build/src/database/drivers/sqlite/column.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/column.js +2 -2
- package/build/src/database/drivers/sqlite/columns-index.d.ts +5 -1
- package/build/src/database/drivers/sqlite/columns-index.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/connection-sql-js.d.ts +9 -9
- package/build/src/database/drivers/sqlite/connection-sql-js.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/connection-sql-js.js +2 -2
- package/build/src/database/drivers/sqlite/foreign-key.d.ts +5 -4
- package/build/src/database/drivers/sqlite/foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/foreign-key.js +2 -2
- package/build/src/database/drivers/sqlite/index.d.ts +53 -3
- package/build/src/database/drivers/sqlite/index.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/index.js +2 -2
- package/build/src/database/drivers/sqlite/index.native.d.ts +13 -5
- package/build/src/database/drivers/sqlite/index.native.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/index.native.js +3 -3
- package/build/src/database/drivers/sqlite/index.web.d.ts +48 -14
- package/build/src/database/drivers/sqlite/index.web.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/index.web.js +3 -3
- package/build/src/database/drivers/sqlite/options.d.ts +1 -1
- package/build/src/database/drivers/sqlite/options.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query-parser.d.ts +1 -1
- package/build/src/database/drivers/sqlite/query-parser.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query.d.ts +2 -2
- package/build/src/database/drivers/sqlite/query.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query.js +3 -3
- package/build/src/database/drivers/sqlite/query.native.d.ts +4 -4
- package/build/src/database/drivers/sqlite/query.native.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query.native.js +3 -3
- package/build/src/database/drivers/sqlite/query.web.d.ts +2 -2
- package/build/src/database/drivers/sqlite/query.web.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query.web.js +3 -3
- package/build/src/database/drivers/sqlite/sql/alter-table.d.ts +19 -4
- package/build/src/database/drivers/sqlite/sql/alter-table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/create-index.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/create-index.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/create-table.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/create-table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/delete.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/delete.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/drop-table.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/drop-table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/insert.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/insert.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/remove-index.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/remove-index.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/update.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/update.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/upsert.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/upsert.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/structure-sql.d.ts +1 -1
- package/build/src/database/drivers/sqlite/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/table-rebuilder.d.ts +5 -5
- package/build/src/database/drivers/sqlite/table-rebuilder.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/table-rebuilder.js +2 -2
- package/build/src/database/drivers/sqlite/table.d.ts +15 -5
- package/build/src/database/drivers/sqlite/table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/web-persistence.d.ts +28 -34
- package/build/src/database/drivers/sqlite/web-persistence.d.ts.map +1 -1
- package/build/src/database/drivers/structure-sql/utils.d.ts +2 -2
- package/build/src/database/drivers/structure-sql/utils.d.ts.map +1 -1
- package/build/src/database/handler.d.ts.map +1 -1
- package/build/src/database/initializer-from-require-context.d.ts +18 -16
- package/build/src/database/initializer-from-require-context.d.ts.map +1 -1
- package/build/src/database/live-query.d.ts +13 -24
- package/build/src/database/live-query.d.ts.map +1 -1
- package/build/src/database/migration/index.d.ts +146 -169
- package/build/src/database/migration/index.d.ts.map +1 -1
- package/build/src/database/migration/index.js +3 -3
- package/build/src/database/migrations-ledger.d.ts.map +1 -1
- package/build/src/database/migrator/files-finder.d.ts +1 -1
- package/build/src/database/migrator/files-finder.d.ts.map +1 -1
- package/build/src/database/migrator/types.d.ts +26 -2
- package/build/src/database/migrator/types.d.ts.map +1 -1
- package/build/src/database/migrator/types.js +24 -1
- package/build/src/database/migrator.d.ts +10 -10
- package/build/src/database/migrator.d.ts.map +1 -1
- package/build/src/database/operation-connection.d.ts +3 -3
- package/build/src/database/operation-connection.d.ts.map +1 -1
- package/build/src/database/operation-lease.d.ts +4 -4
- package/build/src/database/operation-lease.d.ts.map +1 -1
- package/build/src/database/operation.d.ts +38 -7
- package/build/src/database/operation.d.ts.map +1 -1
- package/build/src/database/operation.js +55 -8
- package/build/src/database/pool/async-tracked-multi-connection.d.ts +174 -79
- package/build/src/database/pool/async-tracked-multi-connection.d.ts.map +1 -1
- package/build/src/database/pool/async-tracked-multi-connection.js +70 -25
- package/build/src/database/pool/base-methods-forward.d.ts.map +1 -1
- package/build/src/database/pool/base-methods-forward.js +3 -3
- package/build/src/database/pool/base.d.ts +93 -71
- package/build/src/database/pool/base.d.ts.map +1 -1
- package/build/src/database/pool/base.js +47 -17
- package/build/src/database/pool/single-multi-use.d.ts +243 -10
- package/build/src/database/pool/single-multi-use.d.ts.map +1 -1
- package/build/src/database/pool/single-multi-use.js +467 -103
- package/build/src/database/query/alter-table-base.d.ts +8 -3
- package/build/src/database/query/alter-table-base.d.ts.map +1 -1
- package/build/src/database/query/base.d.ts +3 -3
- package/build/src/database/query/base.d.ts.map +1 -1
- package/build/src/database/query/create-database-base.d.ts +28 -22
- package/build/src/database/query/create-database-base.d.ts.map +1 -1
- package/build/src/database/query/create-index-base.d.ts +32 -30
- package/build/src/database/query/create-index-base.d.ts.map +1 -1
- package/build/src/database/query/create-table-base.d.ts +7 -7
- package/build/src/database/query/create-table-base.d.ts.map +1 -1
- package/build/src/database/query/delete-base.d.ts +5 -5
- package/build/src/database/query/delete-base.d.ts.map +1 -1
- package/build/src/database/query/delete-base.js +2 -2
- package/build/src/database/query/drop-database-base.d.ts +22 -18
- package/build/src/database/query/drop-database-base.d.ts.map +1 -1
- package/build/src/database/query/drop-table-base.d.ts +11 -6
- package/build/src/database/query/drop-table-base.d.ts.map +1 -1
- package/build/src/database/query/from-base.d.ts.map +1 -1
- package/build/src/database/query/from-plain.d.ts +3 -2
- package/build/src/database/query/from-plain.d.ts.map +1 -1
- package/build/src/database/query/from-table.d.ts +3 -2
- package/build/src/database/query/from-table.d.ts.map +1 -1
- package/build/src/database/query/index.d.ts +92 -107
- package/build/src/database/query/index.d.ts.map +1 -1
- package/build/src/database/query/index.js +4 -4
- package/build/src/database/query/insert-base.d.ts +18 -18
- package/build/src/database/query/insert-base.d.ts.map +1 -1
- package/build/src/database/query/insert-base.js +5 -5
- package/build/src/database/query/join-base.d.ts +1 -1
- package/build/src/database/query/join-base.d.ts.map +1 -1
- package/build/src/database/query/join-object.d.ts +9 -15
- package/build/src/database/query/join-object.d.ts.map +1 -1
- package/build/src/database/query/join-plain.d.ts +2 -2
- package/build/src/database/query/join-plain.d.ts.map +1 -1
- package/build/src/database/query/join-tracker.d.ts +3 -3
- package/build/src/database/query/join-tracker.d.ts.map +1 -1
- package/build/src/database/query/model-class-query.d.ts +39 -36
- package/build/src/database/query/model-class-query.d.ts.map +1 -1
- package/build/src/database/query/model-class-query.js +40 -40
- package/build/src/database/query/order-base.d.ts +1 -1
- package/build/src/database/query/order-base.d.ts.map +1 -1
- package/build/src/database/query/order-column.d.ts +19 -22
- package/build/src/database/query/order-column.d.ts.map +1 -1
- package/build/src/database/query/order-plain.d.ts +3 -3
- package/build/src/database/query/order-plain.d.ts.map +1 -1
- package/build/src/database/query/preloader/belongs-to.d.ts +5 -5
- package/build/src/database/query/preloader/belongs-to.d.ts.map +1 -1
- package/build/src/database/query/preloader/belongs-to.js +3 -3
- package/build/src/database/query/preloader/ensure-model-class-initialized.d.ts +2 -1
- package/build/src/database/query/preloader/ensure-model-class-initialized.d.ts.map +1 -1
- package/build/src/database/query/preloader/ensure-model-class-initialized.js +4 -3
- package/build/src/database/query/preloader/has-many.d.ts +6 -6
- package/build/src/database/query/preloader/has-many.d.ts.map +1 -1
- package/build/src/database/query/preloader/has-many.js +4 -4
- package/build/src/database/query/preloader/has-one.d.ts +5 -5
- package/build/src/database/query/preloader/has-one.d.ts.map +1 -1
- package/build/src/database/query/preloader/has-one.js +2 -2
- package/build/src/database/query/preloader/query-for-model.d.ts.map +1 -1
- package/build/src/database/query/preloader/selection.d.ts +6 -6
- package/build/src/database/query/preloader/selection.d.ts.map +1 -1
- package/build/src/database/query/preloader.d.ts +8 -8
- package/build/src/database/query/preloader.d.ts.map +1 -1
- package/build/src/database/query/preloader.js +9 -3
- package/build/src/database/query/query-data.d.ts +43 -55
- package/build/src/database/query/query-data.d.ts.map +1 -1
- package/build/src/database/query/query-data.js +8 -8
- package/build/src/database/query/remove-index-base.d.ts +21 -19
- package/build/src/database/query/remove-index-base.d.ts.map +1 -1
- package/build/src/database/query/select-base.d.ts +1 -1
- package/build/src/database/query/select-base.d.ts.map +1 -1
- package/build/src/database/query/select-plain.d.ts +3 -2
- package/build/src/database/query/select-plain.d.ts.map +1 -1
- package/build/src/database/query/select-table-and-column.d.ts +4 -3
- package/build/src/database/query/select-table-and-column.d.ts.map +1 -1
- package/build/src/database/query/update-base.d.ts +10 -10
- package/build/src/database/query/update-base.d.ts.map +1 -1
- package/build/src/database/query/update-base.js +4 -4
- package/build/src/database/query/upsert-base.d.ts +9 -9
- package/build/src/database/query/upsert-base.d.ts.map +1 -1
- package/build/src/database/query/upsert-base.js +3 -3
- package/build/src/database/query/where-base.d.ts +1 -1
- package/build/src/database/query/where-base.d.ts.map +1 -1
- package/build/src/database/query/where-combinator.d.ts +9 -4
- package/build/src/database/query/where-combinator.d.ts.map +1 -1
- package/build/src/database/query/where-hash.d.ts +11 -9
- package/build/src/database/query/where-hash.d.ts.map +1 -1
- package/build/src/database/query/where-model-class-hash.d.ts +28 -26
- package/build/src/database/query/where-model-class-hash.d.ts.map +1 -1
- package/build/src/database/query/where-model-class-hash.js +14 -14
- package/build/src/database/query/where-not.d.ts +8 -3
- package/build/src/database/query/where-not.d.ts.map +1 -1
- package/build/src/database/query/where-plain.d.ts +4 -3
- package/build/src/database/query/where-plain.d.ts.map +1 -1
- package/build/src/database/query/with-count.d.ts +22 -28
- package/build/src/database/query/with-count.d.ts.map +1 -1
- package/build/src/database/query/with-count.js +12 -12
- package/build/src/database/query-aborted-error.d.ts +5 -5
- package/build/src/database/query-aborted-error.d.ts.map +1 -1
- package/build/src/database/query-parser/base-query-parser.d.ts +3 -3
- package/build/src/database/query-parser/base-query-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/from-parser.d.ts +2 -2
- package/build/src/database/query-parser/from-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/group-parser.d.ts +2 -2
- package/build/src/database/query-parser/group-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/joins-parser.d.ts +3 -3
- package/build/src/database/query-parser/joins-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/limit-parser.d.ts +2 -2
- package/build/src/database/query-parser/limit-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/options.d.ts +31 -34
- package/build/src/database/query-parser/options.d.ts.map +1 -1
- package/build/src/database/query-parser/options.js +3 -3
- package/build/src/database/query-parser/order-parser.d.ts +2 -2
- package/build/src/database/query-parser/order-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/select-parser.d.ts +2 -2
- package/build/src/database/query-parser/select-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/select-parser.js +2 -2
- package/build/src/database/query-parser/where-parser.d.ts +2 -2
- package/build/src/database/query-parser/where-parser.d.ts.map +1 -1
- package/build/src/database/record/acts-as-list.d.ts.map +1 -1
- package/build/src/database/record/acts-as-list.js +3 -3
- package/build/src/database/record/attachments/attachment-record.d.ts +7 -3
- package/build/src/database/record/attachments/attachment-record.d.ts.map +1 -1
- package/build/src/database/record/attachments/download.d.ts +9 -9
- package/build/src/database/record/attachments/download.d.ts.map +1 -1
- package/build/src/database/record/attachments/handle.d.ts +12 -12
- package/build/src/database/record/attachments/handle.d.ts.map +1 -1
- package/build/src/database/record/attachments/handle.js +7 -7
- package/build/src/database/record/attachments/normalize-input.d.ts +16 -22
- package/build/src/database/record/attachments/normalize-input.d.ts.map +1 -1
- package/build/src/database/record/attachments/normalize-input.js +12 -12
- package/build/src/database/record/attachments/storage-drivers/filesystem.d.ts +4 -4
- package/build/src/database/record/attachments/storage-drivers/filesystem.d.ts.map +1 -1
- package/build/src/database/record/attachments/storage-drivers/filesystem.js +2 -2
- package/build/src/database/record/attachments/storage-drivers/native.d.ts +12 -12
- package/build/src/database/record/attachments/storage-drivers/native.d.ts.map +1 -1
- package/build/src/database/record/attachments/storage-drivers/native.js +6 -6
- package/build/src/database/record/attachments/storage-drivers/s3.d.ts +17 -17
- package/build/src/database/record/attachments/storage-drivers/s3.d.ts.map +1 -1
- package/build/src/database/record/attachments/storage-drivers/s3.js +11 -11
- package/build/src/database/record/attachments/store.d.ts +38 -41
- package/build/src/database/record/attachments/store.d.ts.map +1 -1
- package/build/src/database/record/attachments/store.js +24 -21
- package/build/src/database/record/auditing.d.ts +67 -87
- package/build/src/database/record/auditing.d.ts.map +1 -1
- package/build/src/database/record/auditing.js +109 -30
- package/build/src/database/record/counter-cache-magnitude.d.ts +15 -35
- package/build/src/database/record/counter-cache-magnitude.d.ts.map +1 -1
- package/build/src/database/record/counter-cache-magnitude.js +12 -12
- package/build/src/database/record/index.d.ts +2390 -488
- package/build/src/database/record/index.d.ts.map +1 -1
- package/build/src/database/record/index.js +222 -172
- package/build/src/database/record/instance-relationships/base.d.ts +20 -23
- package/build/src/database/record/instance-relationships/base.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/base.js +5 -5
- package/build/src/database/record/instance-relationships/belongs-to.d.ts +9 -1
- package/build/src/database/record/instance-relationships/belongs-to.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/belongs-to.js +2 -2
- package/build/src/database/record/instance-relationships/has-many.d.ts +15 -3
- package/build/src/database/record/instance-relationships/has-many.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/has-many.js +4 -4
- package/build/src/database/record/instance-relationships/has-one.d.ts +19 -1
- package/build/src/database/record/instance-relationships/has-one.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/has-one.js +2 -2
- package/build/src/database/record/record-not-found-error.d.ts +1 -0
- package/build/src/database/record/record-not-found-error.d.ts.map +1 -1
- package/build/src/database/record/record-not-found-error.js +2 -1
- package/build/src/database/record/relationships/base.d.ts +83 -71
- package/build/src/database/record/relationships/base.d.ts.map +1 -1
- package/build/src/database/record/relationships/base.js +21 -1
- package/build/src/database/record/relationships/belongs-to.d.ts +11 -1
- package/build/src/database/record/relationships/belongs-to.d.ts.map +1 -1
- package/build/src/database/record/relationships/has-many.d.ts +11 -1
- package/build/src/database/record/relationships/has-many.d.ts.map +1 -1
- package/build/src/database/record/relationships/has-one.d.ts +11 -1
- package/build/src/database/record/relationships/has-one.d.ts.map +1 -1
- package/build/src/database/record/state-machine.d.ts +20 -29
- package/build/src/database/record/state-machine.d.ts.map +1 -1
- package/build/src/database/record/state-machine.js +7 -7
- package/build/src/database/record/user-module.d.ts +1 -1
- package/build/src/database/record/user-module.d.ts.map +1 -1
- package/build/src/database/record/validation-messages.d.ts +19 -22
- package/build/src/database/record/validation-messages.d.ts.map +1 -1
- package/build/src/database/record/validators/base.d.ts +4 -4
- package/build/src/database/record/validators/base.d.ts.map +1 -1
- package/build/src/database/record/validators/base.js +2 -2
- package/build/src/database/record/validators/format.d.ts +12 -1
- package/build/src/database/record/validators/format.d.ts.map +1 -1
- package/build/src/database/record/validators/length.d.ts +14 -1
- package/build/src/database/record/validators/length.d.ts.map +1 -1
- package/build/src/database/record/validators/presence.d.ts +11 -1
- package/build/src/database/record/validators/presence.d.ts.map +1 -1
- package/build/src/database/record/validators/uniqueness.d.ts +12 -1
- package/build/src/database/record/validators/uniqueness.d.ts.map +1 -1
- package/build/src/database/record-changes.d.ts +7 -18
- package/build/src/database/record-changes.d.ts.map +1 -1
- package/build/src/database/structure-sql-loader.d.ts +2 -2
- package/build/src/database/structure-sql-loader.d.ts.map +1 -1
- package/build/src/database/structure-sql-loader.js +4 -4
- package/build/src/database/table-data/index.d.ts +21 -24
- package/build/src/database/table-data/index.d.ts.map +1 -1
- package/build/src/database/table-data/table-column.d.ts +74 -80
- package/build/src/database/table-data/table-column.d.ts.map +1 -1
- package/build/src/database/table-data/table-column.js +4 -4
- package/build/src/database/table-data/table-foreign-key.d.ts +10 -10
- package/build/src/database/table-data/table-foreign-key.d.ts.map +1 -1
- package/build/src/database/table-data/table-index.d.ts +12 -15
- package/build/src/database/table-data/table-index.d.ts.map +1 -1
- package/build/src/database/table-data/table-reference.d.ts +2 -2
- package/build/src/database/table-data/table-reference.d.ts.map +1 -1
- package/build/src/database/tenants/data-copier.d.ts +7 -7
- package/build/src/database/tenants/data-copier.d.ts.map +1 -1
- package/build/src/database/tenants/schema-cloner.d.ts +3 -3
- package/build/src/database/tenants/schema-cloner.d.ts.map +1 -1
- package/build/src/database/tenants/tenant-table-plan.d.ts +20 -14
- package/build/src/database/tenants/tenant-table-plan.d.ts.map +1 -1
- package/build/src/database/tenants/tenant-table-plan.js +17 -1
- package/build/src/database/use-database.d.ts.map +1 -1
- package/build/src/database/use-live-query.d.ts +17 -29
- package/build/src/database/use-live-query.d.ts.map +1 -1
- package/build/src/database/use-live-query.js +4 -4
- package/build/src/environment-handlers/base.d.ts +112 -103
- package/build/src/environment-handlers/base.d.ts.map +1 -1
- package/build/src/environment-handlers/base.js +54 -38
- package/build/src/environment-handlers/browser.d.ts +63 -56
- package/build/src/environment-handlers/browser.d.ts.map +1 -1
- package/build/src/environment-handlers/browser.js +2 -2
- package/build/src/environment-handlers/node/attachment-path-source.d.ts +9 -9
- package/build/src/environment-handlers/node/attachment-path-source.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-main.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-main.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-runner.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-runner.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-worker.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-worker.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/beacon.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/beacon.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/cli-command-context.d.ts +7 -10
- package/build/src/environment-handlers/node/cli/commands/cli-command-context.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/console.d.ts +9 -7
- package/build/src/environment-handlers/node/cli/commands/console.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/console.js +5 -5
- package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/seed.d.ts +7 -5
- package/build/src/environment-handlers/node/cli/commands/db/seed.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/seed.js +3 -3
- package/build/src/environment-handlers/node/cli/commands/destroy/migration.d.ts +4 -7
- package/build/src/environment-handlers/node/cli/commands/destroy/migration.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/base-models.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/base-models.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/base-models.js +2 -2
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts +93 -108
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/generated-file-banner.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/migration.d.ts +9 -12
- package/build/src/environment-handlers/node/cli/commands/generate/migration.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/model.d.ts +8 -11
- package/build/src/environment-handlers/node/cli/commands/generate/model.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/init.d.ts +7 -9
- package/build/src/environment-handlers/node/cli/commands/init.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/lint/relationships.d.ts +7 -7
- package/build/src/environment-handlers/node/cli/commands/lint/relationships.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/routes.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/routes.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/run-script.d.ts +7 -5
- package/build/src/environment-handlers/node/cli/commands/run-script.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/run-script.js +3 -3
- package/build/src/environment-handlers/node/cli/commands/runner.d.ts +9 -7
- package/build/src/environment-handlers/node/cli/commands/runner.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/runner.js +3 -3
- package/build/src/environment-handlers/node/cli/commands/server.d.ts +24 -30
- package/build/src/environment-handlers/node/cli/commands/server.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/server.js +2 -2
- package/build/src/environment-handlers/node/cli/commands/test.d.ts +5 -5
- package/build/src/environment-handlers/node/cli/commands/test.d.ts.map +1 -1
- package/build/src/environment-handlers/node/source-peer-package.d.ts +5 -7
- package/build/src/environment-handlers/node/source-peer-package.d.ts.map +1 -1
- package/build/src/environment-handlers/node/source-peer-package.js +1 -1
- package/build/src/environment-handlers/node.d.ts +362 -13
- package/build/src/environment-handlers/node.d.ts.map +1 -1
- package/build/src/environment-handlers/node.js +37 -37
- package/build/src/error-logger.d.ts +3 -3
- package/build/src/error-logger.d.ts.map +1 -1
- package/build/src/error-logger.js +3 -3
- package/build/src/error-reporting/request-details.d.ts +1 -1
- package/build/src/error-reporting/request-details.d.ts.map +1 -1
- package/build/src/error-reporting/request-details.js +33 -33
- package/build/src/frontend-model-controller.d.ts +216 -230
- package/build/src/frontend-model-controller.d.ts.map +1 -1
- package/build/src/frontend-model-controller.js +217 -211
- package/build/src/frontend-model-resource/base-resource.d.ts +315 -365
- package/build/src/frontend-model-resource/base-resource.d.ts.map +1 -1
- package/build/src/frontend-model-resource/base-resource.js +45 -45
- package/build/src/frontend-model-resource/velocious-attachment-resource.d.ts +11 -5
- package/build/src/frontend-model-resource/velocious-attachment-resource.d.ts.map +1 -1
- package/build/src/frontend-model-resource/velocious-attachment-resource.js +2 -2
- package/build/src/frontend-models/base.d.ts +632 -726
- package/build/src/frontend-models/base.d.ts.map +1 -1
- package/build/src/frontend-models/base.js +147 -143
- package/build/src/frontend-models/built-in-resources.d.ts +2 -2
- package/build/src/frontend-models/built-in-resources.d.ts.map +1 -1
- package/build/src/frontend-models/clear-pending-debounced-callback.d.ts +2 -2
- package/build/src/frontend-models/clear-pending-debounced-callback.d.ts.map +1 -1
- package/build/src/frontend-models/clear-pending-debounced-callback.js +3 -3
- package/build/src/frontend-models/event-hook-models.d.ts +3 -6
- package/build/src/frontend-models/event-hook-models.d.ts.map +1 -1
- package/build/src/frontend-models/model-registry.d.ts +5 -5
- package/build/src/frontend-models/model-registry.d.ts.map +1 -1
- package/build/src/frontend-models/model-registry.js +5 -5
- package/build/src/frontend-models/outgoing-event-buffer.d.ts +20 -17
- package/build/src/frontend-models/outgoing-event-buffer.d.ts.map +1 -1
- package/build/src/frontend-models/outgoing-event-buffer.js +2 -2
- package/build/src/frontend-models/preloader.d.ts.map +1 -1
- package/build/src/frontend-models/preloader.js +2 -2
- package/build/src/frontend-models/query.d.ts +286 -331
- package/build/src/frontend-models/query.d.ts.map +1 -1
- package/build/src/frontend-models/query.js +61 -61
- package/build/src/frontend-models/resource-config-validation.d.ts +2 -2
- package/build/src/frontend-models/resource-config-validation.d.ts.map +1 -1
- package/build/src/frontend-models/resource-definition.d.ts +30 -33
- package/build/src/frontend-models/resource-definition.d.ts.map +1 -1
- package/build/src/frontend-models/resource-definition.js +10 -10
- package/build/src/frontend-models/transport-deadline.d.ts.map +1 -1
- package/build/src/frontend-models/transport-serialization.d.ts +26 -32
- package/build/src/frontend-models/transport-serialization.d.ts.map +1 -1
- package/build/src/frontend-models/transport-serialization.js +28 -28
- package/build/src/frontend-models/use-created-event.d.ts +4 -4
- package/build/src/frontend-models/use-created-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-destroyed-event.d.ts +8 -29
- package/build/src/frontend-models/use-destroyed-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-model-class-event.d.ts +9 -33
- package/build/src/frontend-models/use-model-class-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-updated-event.d.ts +8 -29
- package/build/src/frontend-models/use-updated-event.d.ts.map +1 -1
- package/build/src/frontend-models/websocket-channel.d.ts +30 -34
- package/build/src/frontend-models/websocket-channel.d.ts.map +1 -1
- package/build/src/frontend-models/websocket-channel.js +5 -5
- package/build/src/frontend-models/websocket-publishers.d.ts +4 -4
- package/build/src/frontend-models/websocket-publishers.d.ts.map +1 -1
- package/build/src/frontend-models/websocket-publishers.js +2 -2
- package/build/src/http-client/header.d.ts +2 -2
- package/build/src/http-client/header.d.ts.map +1 -1
- package/build/src/http-client/index.d.ts +23 -23
- package/build/src/http-client/index.d.ts.map +1 -1
- package/build/src/http-client/request.d.ts +9 -9
- package/build/src/http-client/request.d.ts.map +1 -1
- package/build/src/http-client/request.js +2 -2
- package/build/src/http-client/response.d.ts +12 -12
- package/build/src/http-client/response.d.ts.map +1 -1
- package/build/src/http-client/response.js +2 -2
- package/build/src/http-client/websocket-client.d.ts +20 -4
- package/build/src/http-client/websocket-client.d.ts.map +1 -1
- package/build/src/http-server/client/index.d.ts +26 -26
- package/build/src/http-server/client/index.d.ts.map +1 -1
- package/build/src/http-server/client/index.js +5 -5
- package/build/src/http-server/client/params-to-object.d.ts +11 -11
- package/build/src/http-server/client/params-to-object.d.ts.map +1 -1
- package/build/src/http-server/client/params-to-object.js +17 -17
- package/build/src/http-server/client/request-buffer/form-data-part.d.ts +9 -9
- package/build/src/http-server/client/request-buffer/form-data-part.d.ts.map +1 -1
- package/build/src/http-server/client/request-buffer/header.d.ts +3 -3
- package/build/src/http-server/client/request-buffer/header.d.ts.map +1 -1
- package/build/src/http-server/client/request-buffer/index.d.ts +28 -30
- package/build/src/http-server/client/request-buffer/index.d.ts.map +1 -1
- package/build/src/http-server/client/request-buffer/index.js +5 -3
- package/build/src/http-server/client/request-parser.d.ts +11 -11
- package/build/src/http-server/client/request-parser.d.ts.map +1 -1
- package/build/src/http-server/client/request-parser.js +3 -3
- package/build/src/http-server/client/request-runner.d.ts +11 -11
- package/build/src/http-server/client/request-runner.d.ts.map +1 -1
- package/build/src/http-server/client/request-runner.js +3 -3
- package/build/src/http-server/client/request-timing.d.ts +5 -11
- package/build/src/http-server/client/request-timing.d.ts.map +1 -1
- package/build/src/http-server/client/request.d.ts +10 -10
- package/build/src/http-server/client/request.d.ts.map +1 -1
- package/build/src/http-server/client/request.js +3 -3
- package/build/src/http-server/client/response-compression.d.ts +5 -5
- package/build/src/http-server/client/response-compression.d.ts.map +1 -1
- package/build/src/http-server/client/response.d.ts +13 -13
- package/build/src/http-server/client/response.d.ts.map +1 -1
- package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts +8 -2
- package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts.map +1 -1
- package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts +8 -2
- package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts.map +1 -1
- package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts +4 -4
- package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts.map +1 -1
- package/build/src/http-server/client/websocket-request.d.ts +26 -26
- package/build/src/http-server/client/websocket-request.d.ts.map +1 -1
- package/build/src/http-server/client/websocket-request.js +7 -7
- package/build/src/http-server/client/websocket-session.d.ts +105 -108
- package/build/src/http-server/client/websocket-session.d.ts.map +1 -1
- package/build/src/http-server/client/websocket-session.js +29 -29
- package/build/src/http-server/client-delivery-queue.d.ts +30 -30
- package/build/src/http-server/client-delivery-queue.d.ts.map +1 -1
- package/build/src/http-server/cookie.d.ts +80 -108
- package/build/src/http-server/cookie.d.ts.map +1 -1
- package/build/src/http-server/cookie.js +3 -3
- package/build/src/http-server/development-reloader.d.ts +24 -24
- package/build/src/http-server/development-reloader.d.ts.map +1 -1
- package/build/src/http-server/development-reloader.js +2 -2
- package/build/src/http-server/index.d.ts +66 -72
- package/build/src/http-server/index.d.ts.map +1 -1
- package/build/src/http-server/index.js +6 -6
- package/build/src/http-server/remote-address.d.ts.map +1 -1
- package/build/src/http-server/remote-address.js +2 -2
- package/build/src/http-server/server-client.d.ts +9 -9
- package/build/src/http-server/server-client.d.ts.map +1 -1
- package/build/src/http-server/server-lock.d.ts +11 -11
- package/build/src/http-server/server-lock.d.ts.map +1 -1
- package/build/src/http-server/server-lock.js +5 -5
- package/build/src/http-server/websocket-channel-subscribers.d.ts +11 -10
- package/build/src/http-server/websocket-channel-subscribers.d.ts.map +1 -1
- package/build/src/http-server/websocket-channel-subscribers.js +6 -6
- package/build/src/http-server/websocket-channel.d.ts +8 -14
- package/build/src/http-server/websocket-channel.d.ts.map +1 -1
- package/build/src/http-server/websocket-channel.js +2 -2
- package/build/src/http-server/websocket-connection.d.ts +10 -10
- package/build/src/http-server/websocket-connection.d.ts.map +1 -1
- package/build/src/http-server/websocket-connection.js +4 -4
- package/build/src/http-server/websocket-event-log-store.d.ts +58 -64
- package/build/src/http-server/websocket-event-log-store.d.ts.map +1 -1
- package/build/src/http-server/websocket-event-log-store.js +10 -10
- package/build/src/http-server/websocket-events-host.d.ts +17 -16
- package/build/src/http-server/websocket-events-host.d.ts.map +1 -1
- package/build/src/http-server/websocket-events-host.js +8 -8
- package/build/src/http-server/websocket-events.d.ts +9 -9
- package/build/src/http-server/websocket-events.d.ts.map +1 -1
- package/build/src/http-server/websocket-events.js +5 -5
- package/build/src/http-server/worker-handler/channel-subscriber-dispatch.d.ts +2 -2
- package/build/src/http-server/worker-handler/channel-subscriber-dispatch.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/channel-subscriber-dispatch.js +2 -2
- package/build/src/http-server/worker-handler/in-process.d.ts +22 -22
- package/build/src/http-server/worker-handler/in-process.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/in-process.js +6 -6
- package/build/src/http-server/worker-handler/index.d.ts +50 -50
- package/build/src/http-server/worker-handler/index.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/index.js +11 -11
- package/build/src/http-server/worker-handler/worker-thread.d.ts +61 -61
- package/build/src/http-server/worker-handler/worker-thread.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/worker-thread.js +9 -9
- package/build/src/initializer.d.ts +2 -2
- package/build/src/initializer.d.ts.map +1 -1
- package/build/src/jobs/mail-delivery.d.ts +7 -2
- package/build/src/jobs/mail-delivery.d.ts.map +1 -1
- package/build/src/jobs/prune-terminal-background-jobs.d.ts +15 -2
- package/build/src/jobs/prune-terminal-background-jobs.d.ts.map +1 -1
- package/build/src/jobs/prune-terminal-background-jobs.js +1 -1
- package/build/src/logger/base-logger.d.ts.map +1 -1
- package/build/src/logger/base-logger.js +2 -2
- package/build/src/logger/console-logger.d.ts +3 -3
- package/build/src/logger/console-logger.d.ts.map +1 -1
- package/build/src/logger/file-logger.d.ts +4 -4
- package/build/src/logger/file-logger.d.ts.map +1 -1
- package/build/src/logger/outputs/array-output.d.ts +9 -12
- package/build/src/logger/outputs/array-output.d.ts.map +1 -1
- package/build/src/logger/outputs/console-output.d.ts +1 -4
- package/build/src/logger/outputs/console-output.d.ts.map +1 -1
- package/build/src/logger/outputs/file-output.d.ts +13 -16
- package/build/src/logger/outputs/file-output.d.ts.map +1 -1
- package/build/src/logger/outputs/stdout-output.d.ts +1 -4
- package/build/src/logger/outputs/stdout-output.d.ts.map +1 -1
- package/build/src/logger.d.ts +30 -29
- package/build/src/logger.d.ts.map +1 -1
- package/build/src/logger.js +13 -13
- package/build/src/mailer/backends/smtp.d.ts +8 -11
- package/build/src/mailer/backends/smtp.d.ts.map +1 -1
- package/build/src/mailer/backends/smtp.js +4 -4
- package/build/src/mailer/base.d.ts +61 -61
- package/build/src/mailer/base.d.ts.map +1 -1
- package/build/src/mailer/base.js +15 -15
- package/build/src/mailer/delivery.d.ts +16 -16
- package/build/src/mailer/delivery.d.ts.map +1 -1
- package/build/src/mailer/delivery.js +4 -4
- package/build/src/mailer/index.d.ts +8 -13
- package/build/src/mailer/index.d.ts.map +1 -1
- package/build/src/mailer/index.js +2 -2
- package/build/src/mailer.d.ts +9 -7
- package/build/src/mailer.d.ts.map +1 -1
- package/build/src/mailer.js +2 -2
- package/build/src/packages/velocious-package.d.ts +5 -5
- package/build/src/packages/velocious-package.d.ts.map +1 -1
- package/build/src/plugins/sqljs-wasm-route-controller.d.ts +1 -1
- package/build/src/plugins/sqljs-wasm-route-controller.d.ts.map +1 -1
- package/build/src/plugins/sqljs-wasm-route-controller.js +2 -2
- package/build/src/plugins/sqljs-wasm-route.d.ts +14 -20
- package/build/src/plugins/sqljs-wasm-route.d.ts.map +1 -1
- package/build/src/plugins/sqljs-wasm-route.js +1 -1
- package/build/src/record-payload-values.d.ts +14 -14
- package/build/src/record-payload-values.d.ts.map +1 -1
- package/build/src/record-payload-values.js +4 -4
- package/build/src/routes/app-routes.d.ts.map +1 -1
- package/build/src/routes/base-route.d.ts +11 -10
- package/build/src/routes/base-route.d.ts.map +1 -1
- package/build/src/routes/base-route.js +6 -6
- package/build/src/routes/basic-route.d.ts +36 -3
- package/build/src/routes/basic-route.d.ts.map +1 -1
- package/build/src/routes/basic-route.js +5 -5
- package/build/src/routes/built-in/api-manifest/controller.d.ts +1 -1
- package/build/src/routes/built-in/api-manifest/controller.d.ts.map +1 -1
- package/build/src/routes/built-in/debug/controller.d.ts +1 -1
- package/build/src/routes/built-in/debug/controller.d.ts.map +1 -1
- package/build/src/routes/built-in/errors/controller.d.ts +1 -1
- package/build/src/routes/built-in/errors/controller.d.ts.map +1 -1
- package/build/src/routes/get-route.d.ts +19 -4
- package/build/src/routes/get-route.d.ts.map +1 -1
- package/build/src/routes/get-route.js +3 -3
- package/build/src/routes/hooks/frontend-model-command-route-hook.d.ts +1 -1
- package/build/src/routes/hooks/frontend-model-command-route-hook.d.ts.map +1 -1
- package/build/src/routes/hooks/frontend-model-command-route-hook.js +2 -2
- package/build/src/routes/index.d.ts +5 -5
- package/build/src/routes/index.d.ts.map +1 -1
- package/build/src/routes/index.js +4 -4
- package/build/src/routes/namespace-route.d.ts +19 -4
- package/build/src/routes/namespace-route.d.ts.map +1 -1
- package/build/src/routes/namespace-route.js +2 -2
- package/build/src/routes/plugin-routes.d.ts +16 -19
- package/build/src/routes/plugin-routes.d.ts.map +1 -1
- package/build/src/routes/plugin-routes.js +2 -2
- package/build/src/routes/post-route.d.ts +19 -4
- package/build/src/routes/post-route.d.ts.map +1 -1
- package/build/src/routes/post-route.js +3 -3
- package/build/src/routes/resolver.d.ts +16 -16
- package/build/src/routes/resolver.d.ts.map +1 -1
- package/build/src/routes/resolver.js +6 -6
- package/build/src/routes/resource-route.d.ts +23 -8
- package/build/src/routes/resource-route.d.ts.map +1 -1
- package/build/src/routes/resource-route.js +2 -2
- package/build/src/routes/root-route.d.ts +1 -1
- package/build/src/routes/root-route.d.ts.map +1 -1
- package/build/src/sync/conflict-strategy.d.ts +50 -35
- package/build/src/sync/conflict-strategy.d.ts.map +1 -1
- package/build/src/sync/conflict-strategy.js +2 -2
- package/build/src/sync/device-identity.d.ts +109 -79
- package/build/src/sync/device-identity.d.ts.map +1 -1
- package/build/src/sync/local-mutation-log.d.ts +115 -92
- package/build/src/sync/local-mutation-log.d.ts.map +1 -1
- package/build/src/sync/offline-grant.d.ts +80 -63
- package/build/src/sync/offline-grant.d.ts.map +1 -1
- package/build/src/sync/peer-mutation-bundle.d.ts +33 -39
- package/build/src/sync/peer-mutation-bundle.d.ts.map +1 -1
- package/build/src/sync/query-scope.d.ts +3 -3
- package/build/src/sync/query-scope.d.ts.map +1 -1
- package/build/src/sync/query-scope.js +8 -8
- package/build/src/sync/server-change-feed.d.ts +129 -129
- package/build/src/sync/server-change-feed.d.ts.map +1 -1
- package/build/src/sync/server-change-feed.js +14 -14
- package/build/src/sync/server-sequence-allocator.d.ts +36 -36
- package/build/src/sync/server-sequence-allocator.d.ts.map +1 -1
- package/build/src/sync/server-sequence-allocator.js +6 -6
- package/build/src/sync/signed-sync-envelope-replay-service.d.ts +60 -48
- package/build/src/sync/signed-sync-envelope-replay-service.d.ts.map +1 -1
- package/build/src/sync/signed-sync-envelope-replay-service.js +21 -21
- package/build/src/sync/stable-json.d.ts +2 -2
- package/build/src/sync/stable-json.d.ts.map +1 -1
- package/build/src/sync/stable-json.js +5 -5
- package/build/src/sync/sync-api-client-types.d.ts +98 -25
- package/build/src/sync/sync-api-client-types.d.ts.map +1 -1
- package/build/src/sync/sync-api-client-types.js +73 -1
- package/build/src/sync/sync-api-client.d.ts +71 -71
- package/build/src/sync/sync-api-client.d.ts.map +1 -1
- package/build/src/sync/sync-api-client.js +30 -30
- package/build/src/sync/sync-api-controller.d.ts +23 -23
- package/build/src/sync/sync-api-controller.d.ts.map +1 -1
- package/build/src/sync/sync-change-fanout.d.ts +32 -38
- package/build/src/sync/sync-change-fanout.d.ts.map +1 -1
- package/build/src/sync/sync-change-fanout.js +7 -7
- package/build/src/sync/sync-channel-name.d.ts +1 -1
- package/build/src/sync/sync-channel-name.d.ts.map +1 -1
- package/build/src/sync/sync-client-registry.d.ts +4 -4
- package/build/src/sync/sync-client-registry.d.ts.map +1 -1
- package/build/src/sync/sync-client-registry.js +4 -4
- package/build/src/sync/sync-client-types.d.ts +130 -82
- package/build/src/sync/sync-client-types.d.ts.map +1 -1
- package/build/src/sync/sync-client-types.js +89 -1
- package/build/src/sync/sync-client.d.ts +76 -76
- package/build/src/sync/sync-client.d.ts.map +1 -1
- package/build/src/sync/sync-client.js +19 -19
- package/build/src/sync/sync-envelope-replay-service.d.ts +266 -298
- package/build/src/sync/sync-envelope-replay-service.d.ts.map +1 -1
- package/build/src/sync/sync-envelope-replay-service.js +77 -77
- package/build/src/sync/sync-model-change-feed-service.d.ts +23 -23
- package/build/src/sync/sync-model-change-feed-service.d.ts.map +1 -1
- package/build/src/sync/sync-model-change-feed-service.js +8 -8
- package/build/src/sync/sync-publish-suppression.d.ts +5 -5
- package/build/src/sync/sync-publish-suppression.d.ts.map +1 -1
- package/build/src/sync/sync-publish-suppression.js +3 -3
- package/build/src/sync/sync-publisher-types.d.ts +98 -55
- package/build/src/sync/sync-publisher-types.d.ts.map +1 -1
- package/build/src/sync/sync-publisher-types.js +75 -1
- package/build/src/sync/sync-publisher.d.ts +43 -43
- package/build/src/sync/sync-publisher.d.ts.map +1 -1
- package/build/src/sync/sync-publisher.js +20 -20
- package/build/src/sync/sync-realtime-bridge.d.ts +23 -23
- package/build/src/sync/sync-realtime-bridge.d.ts.map +1 -1
- package/build/src/sync/sync-realtime-bridge.js +9 -9
- package/build/src/sync/sync-replay-upsert-applier.d.ts +70 -70
- package/build/src/sync/sync-replay-upsert-applier.d.ts.map +1 -1
- package/build/src/sync/sync-replay-upsert-applier.js +17 -17
- package/build/src/sync/sync-resource-base.d.ts +52 -51
- package/build/src/sync/sync-resource-base.d.ts.map +1 -1
- package/build/src/sync/sync-resource-base.js +15 -15
- package/build/src/sync/sync-scope-attributes.d.ts +2 -2
- package/build/src/sync/sync-scope-attributes.d.ts.map +1 -1
- package/build/src/sync/sync-scope-attributes.js +2 -2
- package/build/src/sync/sync-scope-store.d.ts +36 -36
- package/build/src/sync/sync-scope-store.d.ts.map +1 -1
- package/build/src/sync/sync-scope-store.js +6 -6
- package/build/src/sync/sync-websocket-channel.d.ts +11 -6
- package/build/src/sync/sync-websocket-channel.d.ts.map +1 -1
- package/build/src/sync/sync-websocket-channel.js +6 -6
- package/build/src/tenants/default-tenant-database-provisioning.d.ts +4 -4
- package/build/src/tenants/default-tenant-database-provisioning.d.ts.map +1 -1
- package/build/src/tenants/default-tenant-database-provisioning.js +2 -2
- package/build/src/tenants/tenant-aggregator.d.ts +81 -81
- package/build/src/tenants/tenant-aggregator.d.ts.map +1 -1
- package/build/src/tenants/tenant-aggregator.js +13 -13
- package/build/src/tenants/tenant-handle.d.ts +64 -0
- package/build/src/tenants/tenant-handle.d.ts.map +1 -0
- package/build/src/tenants/tenant-handle.js +221 -0
- package/build/src/tenants/tenant-iterator.d.ts +17 -17
- package/build/src/tenants/tenant-iterator.d.ts.map +1 -1
- package/build/src/tenants/tenant-iterator.js +7 -7
- package/build/src/tenants/tenant-model-scope.d.ts +73 -0
- package/build/src/tenants/tenant-model-scope.d.ts.map +1 -0
- package/build/src/tenants/tenant-model-scope.js +115 -0
- package/build/src/tenants/tenant.d.ts +16 -6
- package/build/src/tenants/tenant.d.ts.map +1 -1
- package/build/src/tenants/tenant.js +15 -3
- package/build/src/testing/base-expect.d.ts.map +1 -1
- package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts +19 -31
- package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts.map +1 -1
- package/build/src/testing/browser-test-app.js +6 -6
- package/build/src/testing/expect-to-change.d.ts +9 -7
- package/build/src/testing/expect-to-change.d.ts.map +1 -1
- package/build/src/testing/expect-to-change.js +2 -2
- package/build/src/testing/expect-utils.d.ts +30 -29
- package/build/src/testing/expect-utils.d.ts.map +1 -1
- package/build/src/testing/expect-utils.js +30 -30
- package/build/src/testing/expect.d.ts +30 -30
- package/build/src/testing/expect.d.ts.map +1 -1
- package/build/src/testing/expect.js +19 -19
- package/build/src/testing/factory/association-declaration.d.ts +16 -16
- package/build/src/testing/factory/association-declaration.d.ts.map +1 -1
- package/build/src/testing/factory/association-declaration.js +3 -3
- package/build/src/testing/factory/declarations.d.ts +90 -115
- package/build/src/testing/factory/declarations.d.ts.map +1 -1
- package/build/src/testing/factory/declarations.js +6 -6
- package/build/src/testing/factory/definition-builder.d.ts +72 -70
- package/build/src/testing/factory/definition-builder.d.ts.map +1 -1
- package/build/src/testing/factory/definition-builder.js +40 -40
- package/build/src/testing/factory/errors.d.ts +30 -29
- package/build/src/testing/factory/errors.d.ts.map +1 -1
- package/build/src/testing/factory/evaluation-context.d.ts +29 -29
- package/build/src/testing/factory/evaluation-context.d.ts.map +1 -1
- package/build/src/testing/factory/evaluation-context.js +17 -17
- package/build/src/testing/factory/events.d.ts +4 -5
- package/build/src/testing/factory/events.d.ts.map +1 -1
- package/build/src/testing/factory/factory-definition.d.ts +14 -14
- package/build/src/testing/factory/factory-definition.d.ts.map +1 -1
- package/build/src/testing/factory/factory-definition.js +3 -3
- package/build/src/testing/factory/factory-registry.d.ts +56 -54
- package/build/src/testing/factory/factory-registry.d.ts.map +1 -1
- package/build/src/testing/factory/factory-registry.js +35 -35
- package/build/src/testing/factory/factory-runner.d.ts +67 -73
- package/build/src/testing/factory/factory-runner.d.ts.map +1 -1
- package/build/src/testing/factory/factory-runner.js +9 -9
- package/build/src/testing/factory/index.d.ts +7 -7
- package/build/src/testing/factory/index.d.ts.map +1 -1
- package/build/src/testing/factory/linter.d.ts +7 -7
- package/build/src/testing/factory/linter.d.ts.map +1 -1
- package/build/src/testing/factory/linter.js +3 -3
- package/build/src/testing/factory/model-contract.d.ts +3 -3
- package/build/src/testing/factory/model-contract.d.ts.map +1 -1
- package/build/src/testing/factory/model-contract.js +4 -4
- package/build/src/testing/factory/node/load-definitions.d.ts +2 -2
- package/build/src/testing/factory/node/load-definitions.d.ts.map +1 -1
- package/build/src/testing/factory/sequence.d.ts +19 -23
- package/build/src/testing/factory/sequence.d.ts.map +1 -1
- package/build/src/testing/factory/sequence.js +3 -3
- package/build/src/testing/factory/strategies/attributes-for.d.ts +3 -3
- package/build/src/testing/factory/strategies/attributes-for.d.ts.map +1 -1
- package/build/src/testing/factory/strategies/attributes-for.js +2 -2
- package/build/src/testing/factory/strategies/base.d.ts +32 -32
- package/build/src/testing/factory/strategies/base.d.ts.map +1 -1
- package/build/src/testing/factory/strategies/base.js +25 -25
- package/build/src/testing/factory/strategies/build.d.ts +3 -3
- package/build/src/testing/factory/strategies/build.d.ts.map +1 -1
- package/build/src/testing/factory/strategies/build.js +3 -3
- package/build/src/testing/factory/strategies/create.d.ts +6 -6
- package/build/src/testing/factory/strategies/create.d.ts.map +1 -1
- package/build/src/testing/factory/strategies/create.js +5 -5
- package/build/src/testing/factory/trait-definition.d.ts +4 -4
- package/build/src/testing/factory/trait-definition.d.ts.map +1 -1
- package/build/src/testing/request-client.d.ts +19 -19
- package/build/src/testing/request-client.d.ts.map +1 -1
- package/build/src/testing/test-files-finder.d.ts +15 -15
- package/build/src/testing/test-files-finder.d.ts.map +1 -1
- package/build/src/testing/test-files-finder.js +2 -2
- package/build/src/testing/test-filter-parser.d.ts +19 -12
- package/build/src/testing/test-filter-parser.d.ts.map +1 -1
- package/build/src/testing/test-runner.d.ts +204 -251
- package/build/src/testing/test-runner.d.ts.map +1 -1
- package/build/src/testing/test-runner.js +15 -15
- package/build/src/testing/test-suite-splitter.d.ts +25 -31
- package/build/src/testing/test-suite-splitter.d.ts.map +1 -1
- package/build/src/testing/test.d.ts +51 -55
- package/build/src/testing/test.d.ts.map +1 -1
- package/build/src/testing/test.js +20 -18
- package/build/src/testing/wait-for-event.d.ts +25 -25
- package/build/src/testing/wait-for-event.d.ts.map +1 -1
- package/build/src/testing/wait-for-event.js +6 -6
- package/build/src/time-zone.d.ts +3 -3
- package/build/src/time-zone.d.ts.map +1 -1
- package/build/src/utils/backtrace-cleaner-node.d.ts +35 -2
- package/build/src/utils/backtrace-cleaner-node.d.ts.map +1 -1
- package/build/src/utils/backtrace-cleaner-node.js +1 -1
- package/build/src/utils/backtrace-cleaner.d.ts +33 -28
- package/build/src/utils/backtrace-cleaner.d.ts.map +1 -1
- package/build/src/utils/bearer-token.d.ts +2 -2
- package/build/src/utils/bearer-token.d.ts.map +1 -1
- package/build/src/utils/deburr-column-name.d.ts.map +1 -1
- package/build/src/utils/event-emitter.d.ts +1 -1
- package/build/src/utils/event-emitter.d.ts.map +1 -1
- package/build/src/utils/event-emitter.js +2 -2
- package/build/src/utils/file-exists.d.ts.map +1 -1
- package/build/src/utils/format-value.d.ts +9 -8
- package/build/src/utils/format-value.d.ts.map +1 -1
- package/build/src/utils/format-value.js +7 -7
- package/build/src/utils/is-date.d.ts +2 -2
- package/build/src/utils/is-date.d.ts.map +1 -1
- package/build/src/utils/is-date.js +2 -2
- package/build/src/utils/model-scope.d.ts +29 -24
- package/build/src/utils/model-scope.d.ts.map +1 -1
- package/build/src/utils/model-scope.js +11 -11
- package/build/src/utils/mount-prefix.d.ts +2 -2
- package/build/src/utils/mount-prefix.d.ts.map +1 -1
- package/build/src/utils/nest-callbacks.d.ts.map +1 -1
- package/build/src/utils/plain-object.d.ts +3 -3
- package/build/src/utils/plain-object.d.ts.map +1 -1
- package/build/src/utils/plain-object.js +3 -3
- package/build/src/utils/ransack.d.ts +69 -90
- package/build/src/utils/ransack.d.ts.map +1 -1
- package/build/src/utils/ransack.js +36 -36
- package/build/src/utils/rest-args-error.d.ts.map +1 -1
- package/build/src/utils/sha256-hex.d.ts.map +1 -1
- package/build/src/utils/shutdown-lifecycle.d.ts +1 -1
- package/build/src/utils/shutdown-lifecycle.d.ts.map +1 -1
- package/build/src/utils/singularize-model-name.d.ts.map +1 -1
- package/build/src/utils/split-sql-statements.d.ts.map +1 -1
- package/build/src/utils/to-import-specifier.d.ts.map +1 -1
- package/build/src/utils/with-tracked-stack-async-hooks.d.ts +6 -5
- package/build/src/utils/with-tracked-stack-async-hooks.d.ts.map +1 -1
- package/build/src/utils/with-tracked-stack-async-hooks.js +9 -9
- package/build/src/utils/with-tracked-stack.d.ts +6 -5
- package/build/src/utils/with-tracked-stack.d.ts.map +1 -1
- package/build/src/utils/with-tracked-stack.js +7 -7
- package/build/src/velocious-error.d.ts +27 -17
- package/build/src/velocious-error.d.ts.map +1 -1
- package/build/src/velocious-error.js +10 -4
- package/build/sync/conflict-strategy.js +1 -1
- package/build/sync/query-scope.js +7 -7
- package/build/sync/server-change-feed.js +13 -13
- package/build/sync/server-sequence-allocator.js +5 -5
- package/build/sync/signed-sync-envelope-replay-service.js +20 -20
- package/build/sync/stable-json.js +4 -4
- package/build/sync/sync-api-client-types.js +7 -7
- package/build/sync/sync-api-client.js +26 -26
- package/build/sync/sync-change-fanout.js +6 -6
- package/build/sync/sync-client-registry.js +3 -3
- package/build/sync/sync-client-types.js +10 -10
- package/build/sync/sync-client.js +18 -18
- package/build/sync/sync-envelope-replay-service.js +76 -76
- package/build/sync/sync-model-change-feed-service.js +7 -7
- package/build/sync/sync-publish-suppression.js +2 -2
- package/build/sync/sync-publisher-types.js +11 -11
- package/build/sync/sync-publisher.js +19 -19
- package/build/sync/sync-realtime-bridge.js +8 -8
- package/build/sync/sync-replay-upsert-applier.js +16 -16
- package/build/sync/sync-resource-base.js +14 -14
- package/build/sync/sync-scope-attributes.js +1 -1
- package/build/sync/sync-scope-store.js +5 -5
- package/build/sync/sync-websocket-channel.js +5 -5
- package/build/tenants/default-tenant-database-provisioning.js +1 -1
- package/build/tenants/tenant-aggregator.js +13 -13
- package/build/tenants/tenant-handle.js +252 -0
- package/build/tenants/tenant-iterator.js +6 -6
- package/build/tenants/tenant-model-scope.js +132 -0
- package/build/tenants/tenant.js +15 -2
- package/build/testing/browser-test-app.js +2 -2
- package/build/testing/expect-to-change.js +1 -1
- package/build/testing/expect-utils.js +29 -29
- package/build/testing/expect.js +18 -18
- package/build/testing/factory/association-declaration.js +2 -2
- package/build/testing/factory/declarations.js +5 -5
- package/build/testing/factory/definition-builder.js +39 -39
- package/build/testing/factory/evaluation-context.js +16 -16
- package/build/testing/factory/factory-definition.js +2 -2
- package/build/testing/factory/factory-registry.js +34 -34
- package/build/testing/factory/factory-runner.js +8 -8
- package/build/testing/factory/linter.js +2 -2
- package/build/testing/factory/model-contract.js +3 -3
- package/build/testing/factory/sequence.js +2 -2
- package/build/testing/factory/strategies/attributes-for.js +1 -1
- package/build/testing/factory/strategies/base.js +24 -24
- package/build/testing/factory/strategies/build.js +2 -2
- package/build/testing/factory/strategies/create.js +4 -4
- package/build/testing/test-files-finder.js +1 -1
- package/build/testing/test-runner.js +14 -14
- package/build/testing/test.js +19 -17
- package/build/testing/wait-for-event.js +5 -5
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/utils/event-emitter.js +1 -1
- package/build/utils/format-value.js +6 -6
- package/build/utils/is-date.js +1 -1
- package/build/utils/model-scope.js +10 -10
- package/build/utils/plain-object.js +2 -2
- package/build/utils/ransack.js +35 -35
- package/build/utils/with-tracked-stack-async-hooks.js +8 -8
- package/build/utils/with-tracked-stack.js +6 -6
- package/build/velocious-error.js +9 -3
- package/package.json +3 -3
- package/src/application.js +3 -3
- package/src/authorization/ability.js +6 -6
- package/src/authorization/base-resource.js +1 -1
- package/src/background-jobs/client.js +2 -2
- package/src/background-jobs/forked-runner-child.js +4 -4
- package/src/background-jobs/job-runner.js +2 -2
- package/src/background-jobs/job.js +6 -6
- package/src/background-jobs/json-socket.js +1 -1
- package/src/background-jobs/main.js +13 -13
- package/src/background-jobs/normalize-error.js +2 -2
- package/src/background-jobs/pooled-runner-child.js +3 -3
- package/src/background-jobs/scheduler.js +1 -1
- package/src/background-jobs/status-reporter.js +2 -2
- package/src/background-jobs/store.js +23 -23
- package/src/background-jobs/types.js +6 -6
- package/src/background-jobs/web/controller.js +6 -6
- package/src/background-jobs/web/counts-channel.js +1 -1
- package/src/background-jobs/worker.js +8 -8
- package/src/beacon/client.js +3 -3
- package/src/beacon/in-process-client.js +3 -3
- package/src/beacon/types.js +1 -1
- package/src/cli/base-command.js +1 -1
- package/src/cli/commands/console.js +1 -1
- package/src/cli/commands/db/schema/dump.js +1 -1
- package/src/cli/commands/db/schema/load.js +1 -1
- package/src/cli/commands/db/seed.js +1 -1
- package/src/cli/commands/generate/frontend-models.js +1 -1
- package/src/cli/commands/lint/relationships.js +1 -1
- package/src/cli/commands/run-script.js +1 -1
- package/src/cli/commands/runner.js +1 -1
- package/src/cli/index.js +2 -2
- package/src/cli/tenant-database-command-helper.js +2 -2
- package/src/configuration-types.js +48 -47
- package/src/configuration.js +150 -65
- package/src/controller.js +11 -8
- package/src/current.js +2 -2
- package/src/database/annotations-async-hooks.js +3 -3
- package/src/database/annotations.js +1 -1
- package/src/database/drivers/base-column.js +1 -1
- package/src/database/drivers/base-foreign-key.js +1 -1
- package/src/database/drivers/base-table.js +1 -1
- package/src/database/drivers/base.js +18 -18
- package/src/database/drivers/mssql/column.js +1 -1
- package/src/database/drivers/mssql/index.js +2 -2
- package/src/database/drivers/mssql/options.js +1 -1
- package/src/database/drivers/mssql/structure-sql.js +1 -1
- package/src/database/drivers/mssql/table.js +1 -1
- package/src/database/drivers/mysql/column.js +1 -1
- package/src/database/drivers/mysql/index.js +4 -4
- package/src/database/drivers/mysql/options.js +1 -1
- package/src/database/drivers/mysql/query.js +7 -7
- package/src/database/drivers/mysql/structure-sql.js +71 -10
- package/src/database/drivers/pgsql/column.js +1 -1
- package/src/database/drivers/pgsql/index.js +6 -6
- package/src/database/drivers/pgsql/structure-sql.js +1 -1
- package/src/database/drivers/sqlite/base.js +7 -7
- package/src/database/drivers/sqlite/column.js +1 -1
- package/src/database/drivers/sqlite/connection-sql-js.js +1 -1
- package/src/database/drivers/sqlite/foreign-key.js +1 -1
- package/src/database/drivers/sqlite/index.js +1 -1
- package/src/database/drivers/sqlite/index.native.js +2 -2
- package/src/database/drivers/sqlite/index.web.js +2 -2
- package/src/database/drivers/sqlite/query.js +2 -2
- package/src/database/drivers/sqlite/query.native.js +2 -2
- package/src/database/drivers/sqlite/query.web.js +2 -2
- package/src/database/drivers/sqlite/table-rebuilder.js +1 -1
- package/src/database/migration/index.js +2 -2
- package/src/database/migrator/types.js +2 -2
- package/src/database/operation.js +59 -6
- package/src/database/pool/async-tracked-multi-connection.js +75 -24
- package/src/database/pool/base-methods-forward.js +2 -2
- package/src/database/pool/base.js +48 -17
- package/src/database/pool/single-multi-use.js +501 -103
- package/src/database/query/delete-base.js +1 -1
- package/src/database/query/index.js +3 -3
- package/src/database/query/insert-base.js +4 -4
- package/src/database/query/model-class-query.js +39 -39
- package/src/database/query/preloader/belongs-to.js +2 -2
- package/src/database/query/preloader/ensure-model-class-initialized.js +3 -2
- package/src/database/query/preloader/has-many.js +3 -3
- package/src/database/query/preloader/has-one.js +1 -1
- package/src/database/query/preloader.js +9 -2
- package/src/database/query/query-data.js +7 -7
- package/src/database/query/update-base.js +3 -3
- package/src/database/query/upsert-base.js +2 -2
- package/src/database/query/where-model-class-hash.js +13 -13
- package/src/database/query/with-count.js +12 -12
- package/src/database/query-parser/options.js +2 -2
- package/src/database/query-parser/select-parser.js +1 -1
- package/src/database/record/acts-as-list.js +2 -2
- package/src/database/record/attachments/handle.js +6 -6
- package/src/database/record/attachments/normalize-input.js +11 -11
- package/src/database/record/attachments/storage-drivers/filesystem.js +1 -1
- package/src/database/record/attachments/storage-drivers/native.js +5 -5
- package/src/database/record/attachments/storage-drivers/s3.js +10 -10
- package/src/database/record/attachments/store.js +24 -20
- package/src/database/record/auditing.js +123 -29
- package/src/database/record/counter-cache-magnitude.js +11 -11
- package/src/database/record/index.js +227 -174
- package/src/database/record/instance-relationships/base.js +4 -4
- package/src/database/record/instance-relationships/belongs-to.js +1 -1
- package/src/database/record/instance-relationships/has-many.js +3 -3
- package/src/database/record/instance-relationships/has-one.js +1 -1
- package/src/database/record/record-not-found-error.js +1 -0
- package/src/database/record/relationships/base.js +22 -0
- package/src/database/record/state-machine.js +6 -6
- package/src/database/record/validators/base.js +1 -1
- package/src/database/structure-sql-loader.js +3 -3
- package/src/database/table-data/table-column.js +3 -3
- package/src/database/use-live-query.js +3 -3
- package/src/environment-handlers/base.js +56 -37
- package/src/environment-handlers/browser.js +1 -1
- package/src/environment-handlers/node/cli/commands/console.js +4 -4
- package/src/environment-handlers/node/cli/commands/db/seed.js +2 -2
- package/src/environment-handlers/node/cli/commands/generate/base-models.js +1 -1
- package/src/environment-handlers/node/cli/commands/run-script.js +2 -2
- package/src/environment-handlers/node/cli/commands/runner.js +2 -2
- package/src/environment-handlers/node/cli/commands/server.js +1 -1
- package/src/environment-handlers/node.js +36 -36
- package/src/error-logger.js +2 -2
- package/src/error-reporting/request-details.js +32 -32
- package/src/frontend-model-controller.js +215 -213
- package/src/frontend-model-resource/base-resource.js +44 -44
- package/src/frontend-model-resource/velocious-attachment-resource.js +1 -1
- package/src/frontend-models/base.js +146 -142
- package/src/frontend-models/clear-pending-debounced-callback.js +2 -2
- package/src/frontend-models/model-registry.js +4 -4
- package/src/frontend-models/outgoing-event-buffer.js +1 -1
- package/src/frontend-models/preloader.js +1 -1
- package/src/frontend-models/query.js +60 -60
- package/src/frontend-models/resource-definition.js +9 -9
- package/src/frontend-models/transport-serialization.js +27 -27
- package/src/frontend-models/websocket-channel.js +4 -4
- package/src/frontend-models/websocket-publishers.js +1 -1
- package/src/http-client/request.js +1 -1
- package/src/http-client/response.js +1 -1
- package/src/http-server/client/index.js +4 -4
- package/src/http-server/client/params-to-object.js +16 -16
- package/src/http-server/client/request-buffer/index.js +5 -2
- package/src/http-server/client/request-parser.js +2 -2
- package/src/http-server/client/request-runner.js +2 -2
- package/src/http-server/client/request.js +2 -2
- package/src/http-server/client/websocket-request.js +6 -6
- package/src/http-server/client/websocket-session.js +28 -28
- package/src/http-server/cookie.js +2 -2
- package/src/http-server/development-reloader.js +1 -1
- package/src/http-server/index.js +5 -5
- package/src/http-server/remote-address.js +1 -1
- package/src/http-server/server-lock.js +4 -4
- package/src/http-server/websocket-channel-subscribers.js +4 -4
- package/src/http-server/websocket-channel.js +1 -1
- package/src/http-server/websocket-connection.js +3 -3
- package/src/http-server/websocket-event-log-store.js +9 -9
- package/src/http-server/websocket-events-host.js +7 -7
- package/src/http-server/websocket-events.js +4 -4
- package/src/http-server/worker-handler/channel-subscriber-dispatch.js +1 -1
- package/src/http-server/worker-handler/in-process.js +5 -5
- package/src/http-server/worker-handler/index.js +10 -10
- package/src/http-server/worker-handler/worker-thread.js +8 -8
- package/src/logger/base-logger.js +1 -1
- package/src/logger.js +12 -12
- package/src/mailer/backends/smtp.js +3 -3
- package/src/mailer/base.js +14 -14
- package/src/mailer/delivery.js +3 -3
- package/src/mailer/index.js +1 -1
- package/src/mailer.js +1 -1
- package/src/plugins/sqljs-wasm-route-controller.js +1 -1
- package/src/record-payload-values.js +3 -3
- package/src/routes/base-route.js +5 -5
- package/src/routes/basic-route.js +4 -4
- package/src/routes/get-route.js +2 -2
- package/src/routes/hooks/frontend-model-command-route-hook.js +1 -1
- package/src/routes/index.js +3 -3
- package/src/routes/namespace-route.js +1 -1
- package/src/routes/plugin-routes.js +1 -1
- package/src/routes/post-route.js +2 -2
- package/src/routes/resolver.js +5 -5
- package/src/routes/resource-route.js +1 -1
- package/src/sync/conflict-strategy.js +1 -1
- package/src/sync/query-scope.js +7 -7
- package/src/sync/server-change-feed.js +13 -13
- package/src/sync/server-sequence-allocator.js +5 -5
- package/src/sync/signed-sync-envelope-replay-service.js +20 -20
- package/src/sync/stable-json.js +4 -4
- package/src/sync/sync-api-client-types.js +7 -7
- package/src/sync/sync-api-client.js +26 -26
- package/src/sync/sync-change-fanout.js +6 -6
- package/src/sync/sync-client-registry.js +3 -3
- package/src/sync/sync-client-types.js +10 -10
- package/src/sync/sync-client.js +18 -18
- package/src/sync/sync-envelope-replay-service.js +76 -76
- package/src/sync/sync-model-change-feed-service.js +7 -7
- package/src/sync/sync-publish-suppression.js +2 -2
- package/src/sync/sync-publisher-types.js +11 -11
- package/src/sync/sync-publisher.js +19 -19
- package/src/sync/sync-realtime-bridge.js +8 -8
- package/src/sync/sync-replay-upsert-applier.js +16 -16
- package/src/sync/sync-resource-base.js +14 -14
- package/src/sync/sync-scope-attributes.js +1 -1
- package/src/sync/sync-scope-store.js +5 -5
- package/src/sync/sync-websocket-channel.js +5 -5
- package/src/tenants/default-tenant-database-provisioning.js +1 -1
- package/src/tenants/tenant-aggregator.js +13 -13
- package/src/tenants/tenant-handle.js +252 -0
- package/src/tenants/tenant-iterator.js +6 -6
- package/src/tenants/tenant-model-scope.js +132 -0
- package/src/tenants/tenant.js +15 -2
- package/src/testing/browser-test-app.js +2 -2
- package/src/testing/expect-to-change.js +1 -1
- package/src/testing/expect-utils.js +29 -29
- package/src/testing/expect.js +18 -18
- package/src/testing/factory/association-declaration.js +2 -2
- package/src/testing/factory/declarations.js +5 -5
- package/src/testing/factory/definition-builder.js +39 -39
- package/src/testing/factory/evaluation-context.js +16 -16
- package/src/testing/factory/factory-definition.js +2 -2
- package/src/testing/factory/factory-registry.js +34 -34
- package/src/testing/factory/factory-runner.js +8 -8
- package/src/testing/factory/linter.js +2 -2
- package/src/testing/factory/model-contract.js +3 -3
- package/src/testing/factory/sequence.js +2 -2
- package/src/testing/factory/strategies/attributes-for.js +1 -1
- package/src/testing/factory/strategies/base.js +24 -24
- package/src/testing/factory/strategies/build.js +2 -2
- package/src/testing/factory/strategies/create.js +4 -4
- package/src/testing/test-files-finder.js +1 -1
- package/src/testing/test-runner.js +14 -14
- package/src/testing/test.js +19 -17
- package/src/testing/wait-for-event.js +5 -5
- package/src/utils/event-emitter.js +1 -1
- package/src/utils/format-value.js +6 -6
- package/src/utils/is-date.js +1 -1
- package/src/utils/model-scope.js +10 -10
- package/src/utils/plain-object.js +2 -2
- package/src/utils/ransack.js +35 -35
- package/src/utils/with-tracked-stack-async-hooks.js +8 -8
- package/src/utils/with-tracked-stack.js +6 -6
- package/src/velocious-error.js +9 -3
|
@@ -6,7 +6,7 @@ export default class VelociousDatabaseQueryDeleteBase extends QueryBase {
|
|
|
6
6
|
/**
|
|
7
7
|
* Runs constructor.
|
|
8
8
|
* @param {object} args - Options object.
|
|
9
|
-
* @param {Record<string,
|
|
9
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} args.conditions - Conditions.
|
|
10
10
|
* @param {import("../drivers/base.js").default} args.driver - Database driver instance.
|
|
11
11
|
* @param {string} args.tableName - Table name.
|
|
12
12
|
*/
|
|
@@ -190,7 +190,7 @@ export default class VelociousDatabaseQuery {
|
|
|
190
190
|
* @type {import("./where-base.js").default[]} */
|
|
191
191
|
this._wheres = wheres
|
|
192
192
|
|
|
193
|
-
const boundWhere = /** @type {
|
|
193
|
+
const boundWhere = /** @type {ReturnType<typeof JSON.parse>} */ (this.where.bind(this))
|
|
194
194
|
boundWhere.not = this.whereNot.bind(this)
|
|
195
195
|
this.where = boundWhere
|
|
196
196
|
}
|
|
@@ -240,7 +240,7 @@ export default class VelociousDatabaseQuery {
|
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
242
|
* Runs get joins.
|
|
243
|
-
* @returns {Array
|
|
243
|
+
* @returns {Array<ReturnType<typeof JSON.parse>>} - The joins.
|
|
244
244
|
*/
|
|
245
245
|
getJoins() { return this._joins }
|
|
246
246
|
|
|
@@ -264,7 +264,7 @@ export default class VelociousDatabaseQuery {
|
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
266
|
* Runs get orders.
|
|
267
|
-
* @returns {Array
|
|
267
|
+
* @returns {Array<ReturnType<typeof JSON.parse>>} - The orders.
|
|
268
268
|
*/
|
|
269
269
|
getOrders() { return this._orders }
|
|
270
270
|
|
|
@@ -6,13 +6,13 @@ export default class VelociousDatabaseQueryInsertBase {
|
|
|
6
6
|
/**
|
|
7
7
|
* Runs constructor.
|
|
8
8
|
* @param {object} args - Options object.
|
|
9
|
-
* @param {Record<string,
|
|
9
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} [args.data] - Data payload.
|
|
10
10
|
* @param {import("../drivers/base.js").default} args.driver - Database driver instance.
|
|
11
11
|
* @param {string} args.tableName - Table name.
|
|
12
12
|
* @param {Array<string>} [args.columns] - Column names.
|
|
13
13
|
* @param {boolean} [args.multiple] - Whether multiple.
|
|
14
14
|
* @param {string[]} [args.returnLastInsertedColumnNames] - Return last inserted column names.
|
|
15
|
-
* @param {Array<Array
|
|
15
|
+
* @param {Array<Array<ReturnType<typeof JSON.parse>>>} [args.rows] - Rows to insert.
|
|
16
16
|
*/
|
|
17
17
|
constructor({columns, data, driver, multiple, tableName, returnLastInsertedColumnNames, rows, ...restArgs}) {
|
|
18
18
|
if (!driver) throw new Error("No driver given to insert base")
|
|
@@ -39,7 +39,7 @@ export default class VelociousDatabaseQueryInsertBase {
|
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Runs format value.
|
|
42
|
-
* @param {
|
|
42
|
+
* @param {ReturnType<typeof JSON.parse>} value - Value to format.
|
|
43
43
|
* @returns {string | number} - SQL literal.
|
|
44
44
|
*/
|
|
45
45
|
formatValue(value) {
|
|
@@ -151,7 +151,7 @@ export default class VelociousDatabaseQueryInsertBase {
|
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
153
|
* Runs values sql.
|
|
154
|
-
* @param {Array
|
|
154
|
+
* @param {Array<ReturnType<typeof JSON.parse>>} data - Data payload.
|
|
155
155
|
* @returns {string} - SQL string.
|
|
156
156
|
*/
|
|
157
157
|
_valuesSql(data) {
|
|
@@ -467,12 +467,12 @@ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery
|
|
|
467
467
|
const froms = this.getFroms()
|
|
468
468
|
const lastFrom = froms[froms.length - 1]
|
|
469
469
|
|
|
470
|
-
if (lastFrom && typeof /** @type {
|
|
471
|
-
return /** @type {
|
|
470
|
+
if (lastFrom && typeof /** @type {ReturnType<typeof JSON.parse>} */ (lastFrom).tableName === "string") {
|
|
471
|
+
return /** @type {ReturnType<typeof JSON.parse>} */ (lastFrom).tableName
|
|
472
472
|
}
|
|
473
473
|
|
|
474
|
-
if (lastFrom && typeof /** @type {
|
|
475
|
-
const parsedReference = parseFromPlainTableReference(/** @type {
|
|
474
|
+
if (lastFrom && typeof /** @type {ReturnType<typeof JSON.parse>} */ (lastFrom).plain === "string") {
|
|
475
|
+
const parsedReference = parseFromPlainTableReference(/** @type {ReturnType<typeof JSON.parse>} */ (lastFrom).plain)
|
|
476
476
|
|
|
477
477
|
if (parsedReference) return parsedReference
|
|
478
478
|
}
|
|
@@ -754,7 +754,7 @@ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery
|
|
|
754
754
|
* Executes a bulk UPDATE on all rows matching the query's WHERE
|
|
755
755
|
* clause. Bypasses model lifecycle callbacks — use this for
|
|
756
756
|
* efficient batch updates where per-row hooks aren't needed.
|
|
757
|
-
* @param {Record<string,
|
|
757
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} data - camelCase attribute names → values.
|
|
758
758
|
* @returns {Promise<void>} - Resolves when the update completes.
|
|
759
759
|
*/
|
|
760
760
|
async updateAll(data) {
|
|
@@ -831,7 +831,7 @@ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery
|
|
|
831
831
|
/**
|
|
832
832
|
* Runs find or create by.
|
|
833
833
|
* @param {{[key: string]: string | number}} conditions - Conditions hash keyed by attribute name.
|
|
834
|
-
* @param {
|
|
834
|
+
* @param {(arg: InstanceType<MC>) => void} [callback] - Callback function.
|
|
835
835
|
* @returns {Promise<InstanceType<MC>>} - Resolves with the or create by.
|
|
836
836
|
*/
|
|
837
837
|
async findOrCreateBy(conditions, callback) {
|
|
@@ -861,8 +861,8 @@ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery
|
|
|
861
861
|
|
|
862
862
|
/**
|
|
863
863
|
* Runs find or initialize by.
|
|
864
|
-
* @param {Record<string,
|
|
865
|
-
* @param {
|
|
864
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} conditions - Conditions.
|
|
865
|
+
* @param {(arg: InstanceType<MC>) => void} [callback] - Callback function.
|
|
866
866
|
* @returns {Promise<InstanceType<MC>>} - Resolves with the or initialize by.
|
|
867
867
|
*/
|
|
868
868
|
async findOrInitializeBy(conditions, callback) {
|
|
@@ -881,7 +881,7 @@ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery
|
|
|
881
881
|
|
|
882
882
|
/**
|
|
883
883
|
* Builds a record owned by the query's operation, when present.
|
|
884
|
-
* @param {Record<string,
|
|
884
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} [attributes] - Initial attributes.
|
|
885
885
|
* @returns {InstanceType<MC>} - Built record.
|
|
886
886
|
*/
|
|
887
887
|
build(attributes = {}) {
|
|
@@ -895,7 +895,7 @@ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery
|
|
|
895
895
|
|
|
896
896
|
/**
|
|
897
897
|
* Creates a record owned by the query's operation, when present.
|
|
898
|
-
* @param {Record<string,
|
|
898
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} [attributes] - Initial attributes.
|
|
899
899
|
* @returns {Promise<InstanceType<MC>>} - Created record.
|
|
900
900
|
*/
|
|
901
901
|
async create(attributes = {}) {
|
|
@@ -1003,7 +1003,7 @@ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery
|
|
|
1003
1003
|
/**
|
|
1004
1004
|
* Plucks one or more columns directly from the database without instantiating models.
|
|
1005
1005
|
* @param {...string|string[]} columns - Column names.
|
|
1006
|
-
* @returns {Promise<Array
|
|
1006
|
+
* @returns {Promise<Array<ReturnType<typeof JSON.parse>>>} - Resolves with the pluck.
|
|
1007
1007
|
*/
|
|
1008
1008
|
async pluck(...columns) {
|
|
1009
1009
|
const flatColumns = columns.flat()
|
|
@@ -1030,11 +1030,11 @@ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery
|
|
|
1030
1030
|
|
|
1031
1031
|
if (columnNames.length === 1) {
|
|
1032
1032
|
const [columnName] = columnNames
|
|
1033
|
-
return rows.map((row) => /** @type {Record<string,
|
|
1033
|
+
return rows.map((row) => /** @type {Record<string, ReturnType<typeof JSON.parse>>} */ (row)[columnName])
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
1036
1036
|
return rows.map((row) => {
|
|
1037
|
-
const rowHash = /** @type {Record<string,
|
|
1037
|
+
const rowHash = /** @type {Record<string, ReturnType<typeof JSON.parse>>} */ (row)
|
|
1038
1038
|
|
|
1039
1039
|
return columnNames.map((columnName) => rowHash[columnName])
|
|
1040
1040
|
})
|
|
@@ -1080,7 +1080,7 @@ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery
|
|
|
1080
1080
|
|
|
1081
1081
|
/**
|
|
1082
1082
|
* Runs ransack.
|
|
1083
|
-
* @param {Record<string,
|
|
1083
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} params - Ransack-style params hash. Supports `s` key for sorting (e.g., `{s: "name asc"}`).
|
|
1084
1084
|
* @returns {this} - Query with Ransack filters and sort applied.
|
|
1085
1085
|
*/
|
|
1086
1086
|
ransack(params) {
|
|
@@ -1149,7 +1149,7 @@ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery
|
|
|
1149
1149
|
|
|
1150
1150
|
/**
|
|
1151
1151
|
* Declares this query as a sync scope on the current sync client.
|
|
1152
|
-
* @returns {Promise
|
|
1152
|
+
* @returns {Promise<ReturnType<typeof JSON.parse>>} - Declared scope and pull result.
|
|
1153
1153
|
*/
|
|
1154
1154
|
async sync() {
|
|
1155
1155
|
return await currentSyncClient().sync(this)
|
|
@@ -1168,7 +1168,7 @@ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery
|
|
|
1168
1168
|
* Runs apply ransack group.
|
|
1169
1169
|
* @param {object} args - Options.
|
|
1170
1170
|
* @param {import("../../utils/ransack.js").RansackGroup} args.group - Normalized Ransack group.
|
|
1171
|
-
* @param {import("./model-class-query.js").default
|
|
1171
|
+
* @param {import("./model-class-query.js").default<ReturnType<typeof JSON.parse>>} args.query - Query instance.
|
|
1172
1172
|
* @returns {void}
|
|
1173
1173
|
*/
|
|
1174
1174
|
function applyRansackGroup({group, query}) {
|
|
@@ -1183,7 +1183,7 @@ function applyRansackGroup({group, query}) {
|
|
|
1183
1183
|
* Runs build ransack group where.
|
|
1184
1184
|
* @param {object} args - Options.
|
|
1185
1185
|
* @param {import("../../utils/ransack.js").RansackGroup} args.group - Normalized Ransack group.
|
|
1186
|
-
* @param {import("./model-class-query.js").default
|
|
1186
|
+
* @param {import("./model-class-query.js").default<ReturnType<typeof JSON.parse>>} args.query - Query instance.
|
|
1187
1187
|
* @returns {import("./where-base.js").default | null} - Combined where clause.
|
|
1188
1188
|
*/
|
|
1189
1189
|
function buildRansackGroupWhere({group, query}) {
|
|
@@ -1218,7 +1218,7 @@ function buildRansackGroupWhere({group, query}) {
|
|
|
1218
1218
|
* Runs build ransack condition where.
|
|
1219
1219
|
* @param {object} args - Options.
|
|
1220
1220
|
* @param {import("../../utils/ransack.js").RansackCondition} args.condition - Normalized Ransack condition.
|
|
1221
|
-
* @param {import("./model-class-query.js").default
|
|
1221
|
+
* @param {import("./model-class-query.js").default<ReturnType<typeof JSON.parse>>} args.query - Query instance.
|
|
1222
1222
|
* @returns {import("./where-base.js").default | null} - Condition where clause.
|
|
1223
1223
|
*/
|
|
1224
1224
|
function buildRansackConditionWhere({condition, query}) {
|
|
@@ -1246,7 +1246,7 @@ function buildRansackConditionWhere({condition, query}) {
|
|
|
1246
1246
|
* @param {object} args - Options.
|
|
1247
1247
|
* @param {import("../../utils/ransack.js").RansackAttribute} args.attribute - Normalized Ransack attribute.
|
|
1248
1248
|
* @param {import("../../utils/ransack.js").RansackCondition} args.condition - Normalized Ransack condition.
|
|
1249
|
-
* @param {import("./model-class-query.js").default
|
|
1249
|
+
* @param {import("./model-class-query.js").default<ReturnType<typeof JSON.parse>>} args.query - Query instance.
|
|
1250
1250
|
* @returns {import("./where-base.js").default} - Attribute where clause.
|
|
1251
1251
|
*/
|
|
1252
1252
|
function buildRansackAttributeWhere({attribute, condition, query}) {
|
|
@@ -1280,7 +1280,7 @@ function buildRansackAttributeWhere({attribute, condition, query}) {
|
|
|
1280
1280
|
* @param {object} args - Options.
|
|
1281
1281
|
* @param {import("../../utils/ransack.js").RansackAttribute} args.attribute - Normalized Ransack attribute.
|
|
1282
1282
|
* @param {import("../../utils/ransack.js").RansackCondition} args.condition - Normalized Ransack condition.
|
|
1283
|
-
* @returns {Record<string,
|
|
1283
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - Nested hash suitable for query where nodes.
|
|
1284
1284
|
*/
|
|
1285
1285
|
function buildRansackAttributeHash({attribute, condition}) {
|
|
1286
1286
|
if (condition.predicate === "eq" || condition.predicate === "in" || condition.predicate === "not_eq" || condition.predicate === "not_in") {
|
|
@@ -1302,13 +1302,13 @@ function buildRansackAttributeHash({attribute, condition}) {
|
|
|
1302
1302
|
* Runs build nested ransack hash.
|
|
1303
1303
|
* @param {object} args - Options.
|
|
1304
1304
|
* @param {import("../../utils/ransack.js").RansackAttribute} args.attribute - Normalized Ransack attribute.
|
|
1305
|
-
* @param {
|
|
1306
|
-
* @returns {Record<string,
|
|
1305
|
+
* @param {ReturnType<typeof JSON.parse>} args.value - Final value.
|
|
1306
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - Nested hash suitable for query where nodes.
|
|
1307
1307
|
*/
|
|
1308
1308
|
function buildNestedRansackHash({attribute, value}) {
|
|
1309
1309
|
/**
|
|
1310
1310
|
* Hash.
|
|
1311
|
-
* @type {Record<string,
|
|
1311
|
+
* @type {Record<string, ReturnType<typeof JSON.parse>>} */
|
|
1312
1312
|
let hash = {[attribute.attributeName]: value}
|
|
1313
1313
|
|
|
1314
1314
|
for (let index = attribute.path.length - 1; index >= 0; index -= 1) {
|
|
@@ -1323,13 +1323,13 @@ function buildNestedRansackHash({attribute, value}) {
|
|
|
1323
1323
|
* @param {object} args - Options.
|
|
1324
1324
|
* @param {import("../../utils/ransack.js").RansackAttribute} args.attribute - Normalized Ransack attribute.
|
|
1325
1325
|
* @param {"gt" | "gteq" | "lt" | "lteq" | "like"} args.operator - Tuple operator.
|
|
1326
|
-
* @param {
|
|
1327
|
-
* @returns {Record<string,
|
|
1326
|
+
* @param {ReturnType<typeof JSON.parse>} args.value - Final value.
|
|
1327
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - Nested tuple hash suitable for query.where.
|
|
1328
1328
|
*/
|
|
1329
1329
|
function buildNestedRansackTupleHash({attribute, operator, value}) {
|
|
1330
1330
|
/**
|
|
1331
1331
|
* Hash.
|
|
1332
|
-
* @type {Record<string,
|
|
1332
|
+
* @type {Record<string, ReturnType<typeof JSON.parse>>} */
|
|
1333
1333
|
let hash = {
|
|
1334
1334
|
[attribute.attributeName]: [[attribute.attributeName, operator, value]]
|
|
1335
1335
|
}
|
|
@@ -1357,7 +1357,7 @@ function ransackTupleOperator(predicate) {
|
|
|
1357
1357
|
/**
|
|
1358
1358
|
* Runs ransack tuple value.
|
|
1359
1359
|
* @param {import("../../utils/ransack.js").RansackCondition} condition - Ransack condition.
|
|
1360
|
-
* @returns {
|
|
1360
|
+
* @returns {ReturnType<typeof JSON.parse>} - Query tuple value.
|
|
1361
1361
|
*/
|
|
1362
1362
|
function ransackTupleValue(condition) {
|
|
1363
1363
|
if (condition.predicate === "cont") return `%${condition.value}%`
|
|
@@ -1397,18 +1397,18 @@ function resolveColumnName(modelClass, key) {
|
|
|
1397
1397
|
/**
|
|
1398
1398
|
* Runs split where hash.
|
|
1399
1399
|
* @param {object} args - Options.
|
|
1400
|
-
* @param {Record<string,
|
|
1400
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} args.hash - Where hash.
|
|
1401
1401
|
* @param {typeof import("../record/index.js").default} args.modelClass - Model class.
|
|
1402
|
-
* @returns {{resolvedHash: Record<string,
|
|
1402
|
+
* @returns {{resolvedHash: Record<string, ReturnType<typeof JSON.parse>>, fallbackHash: Record<string, ReturnType<typeof JSON.parse>>}} - Split hashes.
|
|
1403
1403
|
*/
|
|
1404
1404
|
function splitWhereHash({hash, modelClass}) {
|
|
1405
1405
|
/**
|
|
1406
1406
|
* Resolved hash.
|
|
1407
|
-
* @type {Record<string,
|
|
1407
|
+
* @type {Record<string, ReturnType<typeof JSON.parse>>} */
|
|
1408
1408
|
const resolvedHash = {}
|
|
1409
1409
|
/**
|
|
1410
1410
|
* Fallback hash.
|
|
1411
|
-
* @type {Record<string,
|
|
1411
|
+
* @type {Record<string, ReturnType<typeof JSON.parse>>} */
|
|
1412
1412
|
const fallbackHash = {}
|
|
1413
1413
|
|
|
1414
1414
|
for (const key in hash) {
|
|
@@ -1459,14 +1459,14 @@ function splitWhereHash({hash, modelClass}) {
|
|
|
1459
1459
|
/**
|
|
1460
1460
|
* Runs build join object from where hash.
|
|
1461
1461
|
* @param {object} args - Options.
|
|
1462
|
-
* @param {Record<string,
|
|
1462
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} args.hash - Where hash.
|
|
1463
1463
|
* @param {typeof import("../record/index.js").default} args.modelClass - Model class.
|
|
1464
|
-
* @returns {Record<string,
|
|
1464
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - Join object.
|
|
1465
1465
|
*/
|
|
1466
1466
|
function buildJoinObjectFromWhereHash({hash, modelClass}) {
|
|
1467
1467
|
/**
|
|
1468
1468
|
* Join object.
|
|
1469
|
-
* @type {Record<string,
|
|
1469
|
+
* @type {Record<string, ReturnType<typeof JSON.parse>>} */
|
|
1470
1470
|
const joinObject = {}
|
|
1471
1471
|
|
|
1472
1472
|
for (const key in hash) {
|
|
@@ -1514,7 +1514,7 @@ function normalizeRelationshipWhereOperator(operator) {
|
|
|
1514
1514
|
|
|
1515
1515
|
/**
|
|
1516
1516
|
* Runs is relationship where operator tuple.
|
|
1517
|
-
* @param {
|
|
1517
|
+
* @param {ReturnType<typeof JSON.parse>} tupleValue - Candidate tuple.
|
|
1518
1518
|
* @returns {boolean} - Whether this is a relationship where tuple.
|
|
1519
1519
|
*/
|
|
1520
1520
|
function isRelationshipWhereOperatorTuple(tupleValue) {
|
|
@@ -1529,7 +1529,7 @@ function isRelationshipWhereOperatorTuple(tupleValue) {
|
|
|
1529
1529
|
|
|
1530
1530
|
/**
|
|
1531
1531
|
* Runs normalize relationship where operator tuples.
|
|
1532
|
-
* @param {
|
|
1532
|
+
* @param {ReturnType<typeof JSON.parse>} value - Candidate value.
|
|
1533
1533
|
* @returns {Array<[string, "eq" | "notEq" | "gt" | "gteq" | "lt" | "lteq" | "like", unknown]>} - Normalized tuples.
|
|
1534
1534
|
*/
|
|
1535
1535
|
function normalizeRelationshipWhereOperatorTuples(value) {
|
|
@@ -1543,7 +1543,7 @@ function normalizeRelationshipWhereOperatorTuples(value) {
|
|
|
1543
1543
|
const normalized = []
|
|
1544
1544
|
/**
|
|
1545
1545
|
* Add condition.
|
|
1546
|
-
* @param {
|
|
1546
|
+
* @param {ReturnType<typeof JSON.parse>} conditionValue - Candidate nested condition.
|
|
1547
1547
|
*/
|
|
1548
1548
|
const addCondition = (conditionValue) => {
|
|
1549
1549
|
if (isRelationshipWhereOperatorTuple(conditionValue)) {
|
|
@@ -1569,7 +1569,7 @@ function normalizeRelationshipWhereOperatorTuples(value) {
|
|
|
1569
1569
|
throw new Error("Relationship where conditions must be tuples")
|
|
1570
1570
|
}
|
|
1571
1571
|
|
|
1572
|
-
/** @type {Array
|
|
1572
|
+
/** @type {Array<ReturnType<typeof JSON.parse>>} */ (conditionValue).forEach((nestedConditionValue) => {
|
|
1573
1573
|
addCondition(nestedConditionValue)
|
|
1574
1574
|
})
|
|
1575
1575
|
}
|
|
@@ -1585,7 +1585,7 @@ function normalizeRelationshipWhereOperatorTuples(value) {
|
|
|
1585
1585
|
|
|
1586
1586
|
/**
|
|
1587
1587
|
* Runs has relationship where operator tuples.
|
|
1588
|
-
* @param {
|
|
1588
|
+
* @param {ReturnType<typeof JSON.parse>} value - Candidate relationship where value.
|
|
1589
1589
|
* @returns {boolean} - Whether value can be normalized to relationship tuples.
|
|
1590
1590
|
*/
|
|
1591
1591
|
function hasRelationshipWhereOperatorTuples(value) {
|
|
@@ -85,7 +85,7 @@ export default class VelociousDatabaseQueryPreloaderBelongsTo {
|
|
|
85
85
|
|
|
86
86
|
// Only query when at least one model has a non-null foreign key.
|
|
87
87
|
if (foreignKeyValues.size > 0) {
|
|
88
|
-
await ensureModelClassInitialized(targetModelClass, this.relationship.getConfiguration())
|
|
88
|
+
await ensureModelClassInitialized(targetModelClass, this.relationship.getConfiguration(), modelsToLoad[0])
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Where args.
|
|
@@ -203,7 +203,7 @@ export default class VelociousDatabaseQueryPreloaderBelongsTo {
|
|
|
203
203
|
for (const targetType in foreignKeyValuesByType) {
|
|
204
204
|
const targetModelClass = configuration.getModelClass(targetType)
|
|
205
205
|
|
|
206
|
-
await ensureModelClassInitialized(targetModelClass, configuration)
|
|
206
|
+
await ensureModelClassInitialized(targetModelClass, configuration, this.models[0])
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
209
|
* Where args.
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Runs ensure model class initialized.
|
|
5
5
|
* @param {typeof import("../../record/index.js").default} modelClass - Model class to initialize.
|
|
6
6
|
* @param {import("../../../configuration.js").default} configuration - Current configuration.
|
|
7
|
+
* @param {import("../../record/index.js").default} sourceModel - Operation-owning source record.
|
|
7
8
|
* @returns {Promise<void>} - Resolves when the model class is initialized.
|
|
8
9
|
*/
|
|
9
|
-
export default async function ensureModelClassInitialized(modelClass, configuration) {
|
|
10
|
+
export default async function ensureModelClassInitialized(modelClass, configuration, sourceModel) {
|
|
10
11
|
if (modelClass.isInitialized()) return
|
|
11
12
|
|
|
12
|
-
await
|
|
13
|
+
await sourceModel.ensureModelClassInitialized(modelClass, configuration)
|
|
13
14
|
}
|
|
@@ -124,8 +124,8 @@ export default class VelociousDatabaseQueryPreloaderHasMany {
|
|
|
124
124
|
|
|
125
125
|
const configuration = this.relationship.getConfiguration()
|
|
126
126
|
|
|
127
|
-
await ensureModelClassInitialized(throughModelClass, configuration)
|
|
128
|
-
await ensureModelClassInitialized(targetModelClass, configuration)
|
|
127
|
+
await ensureModelClassInitialized(throughModelClass, configuration, modelsToLoad[0])
|
|
128
|
+
await ensureModelClassInitialized(targetModelClass, configuration, modelsToLoad[0])
|
|
129
129
|
|
|
130
130
|
const throughForeignKey = throughRelationship.getForeignKey()
|
|
131
131
|
|
|
@@ -298,7 +298,7 @@ export default class VelociousDatabaseQueryPreloaderHasMany {
|
|
|
298
298
|
whereArgs[typeColumn] = this.relationship.getModelClass().getModelName()
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
await ensureModelClassInitialized(targetModelClass, this.relationship.getConfiguration())
|
|
301
|
+
await ensureModelClassInitialized(targetModelClass, this.relationship.getConfiguration(), modelsToLoad[0])
|
|
302
302
|
|
|
303
303
|
let query = preloadQueryForModel(modelsToLoad, targetModelClass).where(whereArgs)
|
|
304
304
|
|
|
@@ -85,7 +85,7 @@ export default class VelociousDatabaseQueryPreloaderHasOne {
|
|
|
85
85
|
whereArgs[typeColumn] = this.relationship.getModelClass().getModelName()
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
await ensureModelClassInitialized(targetModelClass, this.relationship.getConfiguration())
|
|
88
|
+
await ensureModelClassInitialized(targetModelClass, this.relationship.getConfiguration(), this.models[0])
|
|
89
89
|
|
|
90
90
|
// Load target models to be preloaded on the given models
|
|
91
91
|
let query = preloadQueryForModel(this.models, targetModelClass).where(whereArgs)
|
|
@@ -94,7 +94,7 @@ export default class VelociousDatabaseQueryPreloader {
|
|
|
94
94
|
// instead of duplicating it here.
|
|
95
95
|
const query = isQuery
|
|
96
96
|
? /** @type {import("./model-class-query.js").default} */ (queryOrSpec)
|
|
97
|
-
: modelClass.preload(/** @type {
|
|
97
|
+
: modelClass.preload(/** @type {ReturnType<typeof JSON.parse>} */ (queryOrSpec))
|
|
98
98
|
|
|
99
99
|
const preloader = new VelociousDatabaseQueryPreloader({
|
|
100
100
|
modelClass,
|
|
@@ -131,7 +131,14 @@ export default class VelociousDatabaseQueryPreloader {
|
|
|
131
131
|
|
|
132
132
|
async run() {
|
|
133
133
|
for (const preloadRelationshipName in this.preload) {
|
|
134
|
-
const
|
|
134
|
+
const modelClassRelationship = this.modelClass.getRelationshipByName(preloadRelationshipName)
|
|
135
|
+
const relationship = this.models.length > 0 ? modelClassRelationship.resolveForRecord(this.models[0]) : modelClassRelationship
|
|
136
|
+
|
|
137
|
+
for (const model of this.models) {
|
|
138
|
+
if (modelClassRelationship.resolveForRecord(model) !== relationship) {
|
|
139
|
+
throw new Error(`Cannot preload ${this.modelClass.name}#${preloadRelationshipName} across physical database identities`)
|
|
140
|
+
}
|
|
141
|
+
}
|
|
135
142
|
let preloadResult
|
|
136
143
|
|
|
137
144
|
if (relationship.getType() == "belongsTo") {
|
|
@@ -11,7 +11,7 @@ import {isPlainObject} from "is-plain-object"
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Defines this typedef.
|
|
14
|
-
* @typedef {string | Array<string | Record<string,
|
|
14
|
+
* @typedef {string | Array<string | Record<string, ReturnType<typeof JSON.parse>>> | {[key: string]: true | false | string | string[] | Record<string, ReturnType<typeof JSON.parse>>}} QueryDataSpec
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -69,7 +69,7 @@ export function normalizeQueryDataSpec(spec, chain = []) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
if (isPlainObject(item)) {
|
|
72
|
-
for (const nested of normalizeQueryDataSpec(/** @type {
|
|
72
|
+
for (const nested of normalizeQueryDataSpec(/** @type {ReturnType<typeof JSON.parse>} */ (item), chain)) {
|
|
73
73
|
entries.push(nested)
|
|
74
74
|
}
|
|
75
75
|
continue
|
|
@@ -96,7 +96,7 @@ export function normalizeQueryDataSpec(spec, chain = []) {
|
|
|
96
96
|
if (value === false) continue
|
|
97
97
|
|
|
98
98
|
if (typeof value === "string" || Array.isArray(value) || isPlainObject(value)) {
|
|
99
|
-
for (const nested of normalizeQueryDataSpec(/** @type {
|
|
99
|
+
for (const nested of normalizeQueryDataSpec(/** @type {ReturnType<typeof JSON.parse>} */ (value), [...chain, key])) {
|
|
100
100
|
entries.push(nested)
|
|
101
101
|
}
|
|
102
102
|
continue
|
|
@@ -117,14 +117,14 @@ export function normalizeQueryDataSpec(spec, chain = []) {
|
|
|
117
117
|
* the runner can reuse the existing `joins` path-registration machinery
|
|
118
118
|
* (JoinTracker, alias generation, scope application).
|
|
119
119
|
* @param {string[]} chain - Relationship chain.
|
|
120
|
-
* @returns {true | Record<string,
|
|
120
|
+
* @returns {true | Record<string, ReturnType<typeof JSON.parse>>} - Nested join descriptor, or `true` when the chain is empty.
|
|
121
121
|
*/
|
|
122
122
|
function buildNestedJoinDescriptor(chain) {
|
|
123
123
|
if (chain.length === 0) return true
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* Obj.
|
|
127
|
-
* @type {Record<string,
|
|
127
|
+
* @type {Record<string, ReturnType<typeof JSON.parse>>} */
|
|
128
128
|
const obj = {}
|
|
129
129
|
let cursor = obj
|
|
130
130
|
|
|
@@ -269,7 +269,7 @@ function prepareEntry({entry, entryIndex, primaryKey, rootIds, rootModelClass, s
|
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
271
|
* Root where.
|
|
272
|
-
* @type {Record<string,
|
|
272
|
+
* @type {Record<string, ReturnType<typeof JSON.parse>>} */
|
|
273
273
|
const rootWhere = {}
|
|
274
274
|
rootWhere[primaryKey] = rootIds
|
|
275
275
|
query.where(rootWhere)
|
|
@@ -341,7 +341,7 @@ function selectedAliases(query) {
|
|
|
341
341
|
* @returns {Promise<void>}
|
|
342
342
|
*/
|
|
343
343
|
async function executeEntryQuery({primaryKey, query, rootModels}) {
|
|
344
|
-
const rows = /** @type {Array<Record<string,
|
|
344
|
+
const rows = /** @type {Array<Record<string, ReturnType<typeof JSON.parse>>>} */ (await query._executeQuery())
|
|
345
345
|
const byParent = new Map()
|
|
346
346
|
|
|
347
347
|
for (const row of rows) {
|
|
@@ -4,8 +4,8 @@ export default class VelociousDatabaseQueryUpdateBase {
|
|
|
4
4
|
/**
|
|
5
5
|
* Runs constructor.
|
|
6
6
|
* @param {object} args - Options object.
|
|
7
|
-
* @param {Record<string,
|
|
8
|
-
* @param {Record<string,
|
|
7
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} args.conditions - Conditions.
|
|
8
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} args.data - Data payload.
|
|
9
9
|
* @param {import("../drivers/base.js").default} args.driver - Database driver instance.
|
|
10
10
|
* @param {string} args.tableName - Table name.
|
|
11
11
|
*/
|
|
@@ -26,7 +26,7 @@ export default class VelociousDatabaseQueryUpdateBase {
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Runs format value.
|
|
29
|
-
* @param {
|
|
29
|
+
* @param {ReturnType<typeof JSON.parse>} value - Value to format.
|
|
30
30
|
* @returns {string | number} - SQL literal.
|
|
31
31
|
*/
|
|
32
32
|
formatValue(value) {
|
|
@@ -7,7 +7,7 @@ export default class VelociousDatabaseQueryUpsertBase {
|
|
|
7
7
|
* Runs constructor.
|
|
8
8
|
* @param {object} args - Options object.
|
|
9
9
|
* @param {Array<string>} args.conflictColumns - Columns that identify duplicates.
|
|
10
|
-
* @param {Record<string,
|
|
10
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} args.data - Data payload.
|
|
11
11
|
* @param {import("../drivers/base.js").default} args.driver - Database driver instance.
|
|
12
12
|
* @param {Array<string>} args.updateColumns - Columns to update on conflict.
|
|
13
13
|
* @param {string} args.tableName - Table name.
|
|
@@ -47,7 +47,7 @@ export default class VelociousDatabaseQueryUpsertBase {
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Runs format value.
|
|
50
|
-
* @param {
|
|
50
|
+
* @param {ReturnType<typeof JSON.parse>} value - Value to format.
|
|
51
51
|
* @returns {string | number} - SQL literal.
|
|
52
52
|
*/
|
|
53
53
|
formatValue(value) {
|
|
@@ -6,7 +6,7 @@ import WhereBase from "./where-base.js"
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* No match.
|
|
9
|
-
* @typedef {{[key: string]: string | number | boolean | null | Array<string | number | boolean | null> | Record<string,
|
|
9
|
+
* @typedef {{[key: string]: string | number | boolean | null | Array<string | number | boolean | null> | Record<string, ReturnType<typeof JSON.parse>>}} WhereHash
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
const NO_MATCH = Symbol("no-match")
|
|
@@ -107,7 +107,7 @@ export default class VelociousDatabaseQueryWhereModelClassHash extends WhereBase
|
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* Runs is relationship where operator tuple.
|
|
110
|
-
* @param {
|
|
110
|
+
* @param {ReturnType<typeof JSON.parse>} tupleValue - Candidate tuple.
|
|
111
111
|
* @returns {boolean} - Whether this is a relationship where tuple.
|
|
112
112
|
*/
|
|
113
113
|
_isRelationshipWhereOperatorTuple(tupleValue) {
|
|
@@ -122,7 +122,7 @@ export default class VelociousDatabaseQueryWhereModelClassHash extends WhereBase
|
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* Runs normalize relationship where operator tuples.
|
|
125
|
-
* @param {
|
|
125
|
+
* @param {ReturnType<typeof JSON.parse>} value - Candidate relationship where value.
|
|
126
126
|
* @returns {Array<[string, "eq" | "notEq" | "gt" | "gteq" | "lt" | "lteq" | "like", unknown]>} - Normalized tuples.
|
|
127
127
|
*/
|
|
128
128
|
_normalizeRelationshipWhereOperatorTuples(value) {
|
|
@@ -136,7 +136,7 @@ export default class VelociousDatabaseQueryWhereModelClassHash extends WhereBase
|
|
|
136
136
|
const normalized = []
|
|
137
137
|
/**
|
|
138
138
|
* Add condition.
|
|
139
|
-
* @param {
|
|
139
|
+
* @param {ReturnType<typeof JSON.parse>} conditionValue - Candidate nested condition.
|
|
140
140
|
*/
|
|
141
141
|
const addCondition = (conditionValue) => {
|
|
142
142
|
if (this._isRelationshipWhereOperatorTuple(conditionValue)) {
|
|
@@ -178,7 +178,7 @@ export default class VelociousDatabaseQueryWhereModelClassHash extends WhereBase
|
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
180
|
* Runs is relationship where operator tuple container.
|
|
181
|
-
* @param {
|
|
181
|
+
* @param {ReturnType<typeof JSON.parse>} value - Candidate relationship where value.
|
|
182
182
|
* @returns {boolean} - Whether value can be normalized to relationship tuples.
|
|
183
183
|
*/
|
|
184
184
|
_isRelationshipWhereOperatorTupleContainer(value) {
|
|
@@ -302,8 +302,8 @@ export default class VelociousDatabaseQueryWhereModelClassHash extends WhereBase
|
|
|
302
302
|
* @param {object} args - Options object.
|
|
303
303
|
* @param {typeof import("../record/index.js").default} args.modelClass - Model class.
|
|
304
304
|
* @param {string} args.columnName - Column name.
|
|
305
|
-
* @param {
|
|
306
|
-
* @returns {
|
|
305
|
+
* @param {ReturnType<typeof JSON.parse>} args.value - Value to normalize.
|
|
306
|
+
* @returns {ReturnType<typeof JSON.parse>} - Normalized value.
|
|
307
307
|
*/
|
|
308
308
|
_normalizeSqliteBooleanValue({modelClass, columnName, value}) {
|
|
309
309
|
if (modelClass.getDatabaseType() != "sqlite") return value
|
|
@@ -315,8 +315,8 @@ export default class VelociousDatabaseQueryWhereModelClassHash extends WhereBase
|
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
317
|
* Normalize.
|
|
318
|
-
* @param {
|
|
319
|
-
* @returns {
|
|
318
|
+
* @param {ReturnType<typeof JSON.parse>} entry - Value to normalize.
|
|
319
|
+
* @returns {ReturnType<typeof JSON.parse>} - SQLite predicate value with booleans encoded as 1 or 0.
|
|
320
320
|
*/
|
|
321
321
|
const normalize = (entry) => {
|
|
322
322
|
if (entry === true) return 1
|
|
@@ -336,8 +336,8 @@ export default class VelociousDatabaseQueryWhereModelClassHash extends WhereBase
|
|
|
336
336
|
* @param {object} args - Options object.
|
|
337
337
|
* @param {typeof import("../record/index.js").default} args.modelClass - Model class.
|
|
338
338
|
* @param {string} args.columnName - Column name.
|
|
339
|
-
* @param {
|
|
340
|
-
* @returns {
|
|
339
|
+
* @param {ReturnType<typeof JSON.parse>} args.value - Value to normalize.
|
|
340
|
+
* @returns {ReturnType<typeof JSON.parse>} - Normalized value.
|
|
341
341
|
*/
|
|
342
342
|
_normalizeValueForColumnType({modelClass, columnName, value}) {
|
|
343
343
|
const columnType = modelClass.getColumnTypeByName(columnName)
|
|
@@ -353,8 +353,8 @@ export default class VelociousDatabaseQueryWhereModelClassHash extends WhereBase
|
|
|
353
353
|
|
|
354
354
|
/**
|
|
355
355
|
* Normalize.
|
|
356
|
-
* @param {
|
|
357
|
-
* @returns {
|
|
356
|
+
* @param {ReturnType<typeof JSON.parse>} entry - Value to normalize.
|
|
357
|
+
* @returns {ReturnType<typeof JSON.parse>} - Column-compatible predicate value, or the no-match sentinel for numeric UUIDs.
|
|
358
358
|
*/
|
|
359
359
|
const normalize = (entry) => {
|
|
360
360
|
if (isUuidType && typeof entry === "number") return NO_MATCH
|