spindb 0.37.2 → 0.38.0
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/dist/cli/bin.js +9 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/commands/attach.js +102 -0
- package/dist/cli/commands/attach.js.map +1 -0
- package/dist/cli/commands/backup.js +197 -0
- package/dist/cli/commands/backup.js.map +1 -0
- package/dist/cli/commands/backups.js +190 -0
- package/dist/cli/commands/backups.js.map +1 -0
- package/dist/cli/commands/clone.js +119 -0
- package/dist/cli/commands/clone.js.map +1 -0
- package/dist/cli/commands/config.js +276 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/connect.js +559 -0
- package/dist/cli/commands/connect.js.map +1 -0
- package/dist/cli/commands/create.js +952 -0
- package/dist/cli/commands/create.js.map +1 -0
- package/dist/cli/commands/databases.js +485 -0
- package/dist/cli/commands/databases.js.map +1 -0
- package/dist/cli/commands/delete.js +106 -0
- package/dist/cli/commands/delete.js.map +1 -0
- package/dist/cli/commands/deps.js +238 -0
- package/dist/cli/commands/deps.js.map +1 -0
- package/dist/cli/commands/detach.js +81 -0
- package/dist/cli/commands/detach.js.map +1 -0
- package/dist/cli/commands/doctor.js +567 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/duckdb.js +207 -0
- package/dist/cli/commands/duckdb.js.map +1 -0
- package/dist/cli/commands/edit.js +524 -0
- package/dist/cli/commands/edit.js.map +1 -0
- package/dist/cli/commands/engines.js +1414 -0
- package/dist/cli/commands/engines.js.map +1 -0
- package/dist/cli/commands/export.js +383 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/info.js +270 -0
- package/dist/cli/commands/info.js.map +1 -0
- package/dist/cli/commands/list.js +215 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/logs.js +81 -0
- package/dist/cli/commands/logs.js.map +1 -0
- package/dist/cli/commands/menu/backup-handlers.js +1202 -0
- package/dist/cli/commands/menu/backup-handlers.js.map +1 -0
- package/dist/cli/commands/menu/container-handlers.js +1788 -0
- package/dist/cli/commands/menu/container-handlers.js.map +1 -0
- package/dist/cli/commands/menu/engine-handlers.js +235 -0
- package/dist/cli/commands/menu/engine-handlers.js.map +1 -0
- package/dist/cli/commands/menu/index.js +266 -0
- package/dist/cli/commands/menu/index.js.map +1 -0
- package/dist/cli/commands/menu/settings-handlers.js +320 -0
- package/dist/cli/commands/menu/settings-handlers.js.map +1 -0
- package/dist/cli/commands/menu/shared.js +13 -0
- package/dist/cli/commands/menu/shared.js.map +1 -0
- package/dist/cli/commands/menu/shell-handlers.js +1573 -0
- package/dist/cli/commands/menu/shell-handlers.js.map +1 -0
- package/dist/cli/commands/menu/sql-handlers.js +185 -0
- package/dist/cli/commands/menu/sql-handlers.js.map +1 -0
- package/dist/cli/commands/menu/update-handlers.js +322 -0
- package/dist/cli/commands/menu/update-handlers.js.map +1 -0
- package/dist/cli/commands/menu/validators.js +9 -0
- package/dist/cli/commands/menu/validators.js.map +1 -0
- package/dist/cli/commands/ports.js +166 -0
- package/dist/cli/commands/ports.js.map +1 -0
- package/dist/cli/commands/pull.js +166 -0
- package/dist/cli/commands/pull.js.map +1 -0
- package/dist/cli/commands/query.js +180 -0
- package/dist/cli/commands/query.js.map +1 -0
- package/dist/cli/commands/restore.js +428 -0
- package/dist/cli/commands/restore.js.map +1 -0
- package/dist/cli/commands/run.js +115 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/commands/self-update.js +99 -0
- package/dist/cli/commands/self-update.js.map +1 -0
- package/dist/cli/commands/sqlite.js +207 -0
- package/dist/cli/commands/sqlite.js.map +1 -0
- package/dist/cli/commands/start.js +196 -0
- package/dist/cli/commands/start.js.map +1 -0
- package/dist/cli/commands/stop.js +182 -0
- package/dist/cli/commands/stop.js.map +1 -0
- package/dist/cli/commands/url.js +88 -0
- package/dist/cli/commands/url.js.map +1 -0
- package/dist/cli/commands/users.js +189 -0
- package/dist/cli/commands/users.js.map +1 -0
- package/dist/cli/commands/version.js +52 -0
- package/dist/cli/commands/version.js.map +1 -0
- package/dist/cli/commands/which.js +258 -0
- package/dist/cli/commands/which.js.map +1 -0
- package/dist/cli/constants.js +212 -0
- package/dist/cli/constants.js.map +1 -0
- package/dist/cli/helpers.js +1120 -0
- package/dist/cli/helpers.js.map +1 -0
- package/dist/cli/index.js +146 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/ui/prompts.js +1002 -0
- package/dist/cli/ui/prompts.js.map +1 -0
- package/dist/cli/ui/spinner.js +74 -0
- package/dist/cli/ui/spinner.js.map +1 -0
- package/dist/cli/ui/theme.js +99 -0
- package/dist/cli/ui/theme.js.map +1 -0
- package/dist/cli/utils/file-follower.js +79 -0
- package/dist/cli/utils/file-follower.js.map +1 -0
- package/dist/config/backup-formats.js +363 -0
- package/dist/config/backup-formats.js.map +1 -0
- package/dist/config/defaults.js +25 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/engine-defaults.js +303 -0
- package/dist/config/engine-defaults.js.map +1 -0
- package/dist/config/engines-registry.js +103 -0
- package/dist/config/engines-registry.js.map +1 -0
- package/dist/config/os-dependencies.js +767 -0
- package/dist/config/os-dependencies.js.map +1 -0
- package/dist/config/paths.js +156 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/config/version.js +3 -0
- package/dist/config/version.js.map +1 -0
- package/dist/core/backup-restore.js +219 -0
- package/dist/core/backup-restore.js.map +1 -0
- package/dist/core/base-binary-manager.js +403 -0
- package/dist/core/base-binary-manager.js.map +1 -0
- package/dist/core/base-document-binary-manager.js +364 -0
- package/dist/core/base-document-binary-manager.js.map +1 -0
- package/dist/core/base-embedded-binary-manager.js +364 -0
- package/dist/core/base-embedded-binary-manager.js.map +1 -0
- package/dist/core/base-server-binary-manager.js +368 -0
- package/dist/core/base-server-binary-manager.js.map +1 -0
- package/dist/core/config-manager.js +495 -0
- package/dist/core/config-manager.js.map +1 -0
- package/dist/core/container-manager.js +609 -0
- package/dist/core/container-manager.js.map +1 -0
- package/dist/core/credential-generator.js +67 -0
- package/dist/core/credential-generator.js.map +1 -0
- package/dist/core/credential-manager.js +211 -0
- package/dist/core/credential-manager.js.map +1 -0
- package/dist/core/dblab-utils.js +105 -0
- package/dist/core/dblab-utils.js.map +1 -0
- package/dist/core/dependency-manager.js +359 -0
- package/dist/core/dependency-manager.js.map +1 -0
- package/dist/core/docker-exporter.js +1077 -0
- package/dist/core/docker-exporter.js.map +1 -0
- package/dist/core/error-handler.js +295 -0
- package/dist/core/error-handler.js.map +1 -0
- package/dist/core/fs-error-utils.js +74 -0
- package/dist/core/fs-error-utils.js.map +1 -0
- package/dist/core/homebrew-version-manager.js +280 -0
- package/dist/core/homebrew-version-manager.js.map +1 -0
- package/dist/core/hostdb-client.js +252 -0
- package/dist/core/hostdb-client.js.map +1 -0
- package/dist/core/hostdb-metadata.js +243 -0
- package/dist/core/hostdb-metadata.js.map +1 -0
- package/dist/core/hostdb-releases-factory.js +161 -0
- package/dist/core/hostdb-releases-factory.js.map +1 -0
- package/dist/core/library-env.js +88 -0
- package/dist/core/library-env.js.map +1 -0
- package/dist/core/pgweb-utils.js +53 -0
- package/dist/core/pgweb-utils.js.map +1 -0
- package/dist/core/platform-service.js +632 -0
- package/dist/core/platform-service.js.map +1 -0
- package/dist/core/port-manager.js +136 -0
- package/dist/core/port-manager.js.map +1 -0
- package/dist/core/process-manager.js +445 -0
- package/dist/core/process-manager.js.map +1 -0
- package/dist/core/pull-manager.js +418 -0
- package/dist/core/pull-manager.js.map +1 -0
- package/dist/core/query-parser.js +449 -0
- package/dist/core/query-parser.js.map +1 -0
- package/dist/core/spawn-utils.js +90 -0
- package/dist/core/spawn-utils.js.map +1 -0
- package/dist/core/start-with-retry.js +90 -0
- package/dist/core/start-with-retry.js.map +1 -0
- package/dist/core/test-cleanup.js +85 -0
- package/dist/core/test-cleanup.js.map +1 -0
- package/dist/core/tls-generator.js +84 -0
- package/dist/core/tls-generator.js.map +1 -0
- package/dist/core/transaction-manager.js +139 -0
- package/dist/core/transaction-manager.js.map +1 -0
- package/dist/core/update-manager.js +241 -0
- package/dist/core/update-manager.js.map +1 -0
- package/dist/core/version-migration.js +260 -0
- package/dist/core/version-migration.js.map +1 -0
- package/dist/core/version-utils.js +91 -0
- package/dist/core/version-utils.js.map +1 -0
- package/dist/engines/base-engine.js +179 -0
- package/dist/engines/base-engine.js.map +1 -0
- package/dist/engines/clickhouse/backup.js +289 -0
- package/dist/engines/clickhouse/backup.js.map +1 -0
- package/dist/engines/clickhouse/binary-manager.js +145 -0
- package/dist/engines/clickhouse/binary-manager.js.map +1 -0
- package/dist/engines/clickhouse/binary-urls.js +100 -0
- package/dist/engines/clickhouse/binary-urls.js.map +1 -0
- package/dist/engines/clickhouse/cli-utils.js +143 -0
- package/dist/engines/clickhouse/cli-utils.js.map +1 -0
- package/dist/engines/clickhouse/hostdb-releases.js +24 -0
- package/dist/engines/clickhouse/hostdb-releases.js.map +1 -0
- package/dist/engines/clickhouse/index.js +1077 -0
- package/dist/engines/clickhouse/index.js.map +1 -0
- package/dist/engines/clickhouse/restore.js +335 -0
- package/dist/engines/clickhouse/restore.js.map +1 -0
- package/dist/engines/clickhouse/version-maps.js +83 -0
- package/dist/engines/clickhouse/version-maps.js.map +1 -0
- package/dist/engines/clickhouse/version-validator.js +133 -0
- package/dist/engines/clickhouse/version-validator.js.map +1 -0
- package/dist/engines/cockroachdb/backup.js +261 -0
- package/dist/engines/cockroachdb/backup.js.map +1 -0
- package/dist/engines/cockroachdb/binary-manager.js +33 -0
- package/dist/engines/cockroachdb/binary-manager.js.map +1 -0
- package/dist/engines/cockroachdb/binary-urls.js +33 -0
- package/dist/engines/cockroachdb/binary-urls.js.map +1 -0
- package/dist/engines/cockroachdb/cli-utils.js +338 -0
- package/dist/engines/cockroachdb/cli-utils.js.map +1 -0
- package/dist/engines/cockroachdb/hostdb-releases.js +21 -0
- package/dist/engines/cockroachdb/hostdb-releases.js.map +1 -0
- package/dist/engines/cockroachdb/index.js +1016 -0
- package/dist/engines/cockroachdb/index.js.map +1 -0
- package/dist/engines/cockroachdb/restore.js +323 -0
- package/dist/engines/cockroachdb/restore.js.map +1 -0
- package/dist/engines/cockroachdb/version-maps.js +37 -0
- package/dist/engines/cockroachdb/version-maps.js.map +1 -0
- package/dist/engines/couchdb/api-client.js +64 -0
- package/dist/engines/couchdb/api-client.js.map +1 -0
- package/dist/engines/couchdb/backup.js +90 -0
- package/dist/engines/couchdb/backup.js.map +1 -0
- package/dist/engines/couchdb/binary-manager.js +62 -0
- package/dist/engines/couchdb/binary-manager.js.map +1 -0
- package/dist/engines/couchdb/binary-urls.js +92 -0
- package/dist/engines/couchdb/binary-urls.js.map +1 -0
- package/dist/engines/couchdb/hostdb-releases.js +21 -0
- package/dist/engines/couchdb/hostdb-releases.js.map +1 -0
- package/dist/engines/couchdb/index.js +1043 -0
- package/dist/engines/couchdb/index.js.map +1 -0
- package/dist/engines/couchdb/restore.js +198 -0
- package/dist/engines/couchdb/restore.js.map +1 -0
- package/dist/engines/couchdb/version-maps.js +67 -0
- package/dist/engines/couchdb/version-maps.js.map +1 -0
- package/dist/engines/couchdb/version-validator.js +88 -0
- package/dist/engines/couchdb/version-validator.js.map +1 -0
- package/dist/engines/duckdb/binary-manager.js +33 -0
- package/dist/engines/duckdb/binary-manager.js.map +1 -0
- package/{engines/duckdb/binary-urls.ts → dist/engines/duckdb/binary-urls.js} +11 -16
- package/dist/engines/duckdb/binary-urls.js.map +1 -0
- package/dist/engines/duckdb/hostdb-releases.js +21 -0
- package/dist/engines/duckdb/hostdb-releases.js.map +1 -0
- package/dist/engines/duckdb/index.js +594 -0
- package/dist/engines/duckdb/index.js.map +1 -0
- package/dist/engines/duckdb/registry.js +265 -0
- package/dist/engines/duckdb/registry.js.map +1 -0
- package/dist/engines/duckdb/scanner.js +12 -0
- package/dist/engines/duckdb/scanner.js.map +1 -0
- package/dist/engines/duckdb/version-maps.js +67 -0
- package/dist/engines/duckdb/version-maps.js.map +1 -0
- package/dist/engines/duckdb/version-validator.js +62 -0
- package/dist/engines/duckdb/version-validator.js.map +1 -0
- package/dist/engines/ferretdb/backup.js +170 -0
- package/dist/engines/ferretdb/backup.js.map +1 -0
- package/dist/engines/ferretdb/binary-manager.js +765 -0
- package/dist/engines/ferretdb/binary-manager.js.map +1 -0
- package/dist/engines/ferretdb/binary-urls.js +135 -0
- package/dist/engines/ferretdb/binary-urls.js.map +1 -0
- package/dist/engines/ferretdb/index.js +1517 -0
- package/dist/engines/ferretdb/index.js.map +1 -0
- package/dist/engines/ferretdb/restore.js +310 -0
- package/dist/engines/ferretdb/restore.js.map +1 -0
- package/{engines/ferretdb/version-maps.ts → dist/engines/ferretdb/version-maps.js} +62 -79
- package/dist/engines/ferretdb/version-maps.js.map +1 -0
- package/dist/engines/file-based-utils.js +184 -0
- package/dist/engines/file-based-utils.js.map +1 -0
- package/dist/engines/index.js +124 -0
- package/dist/engines/index.js.map +1 -0
- package/dist/engines/influxdb/api-client.js +54 -0
- package/dist/engines/influxdb/api-client.js.map +1 -0
- package/dist/engines/influxdb/backup.js +119 -0
- package/dist/engines/influxdb/backup.js.map +1 -0
- package/dist/engines/influxdb/binary-manager.js +87 -0
- package/dist/engines/influxdb/binary-manager.js.map +1 -0
- package/dist/engines/influxdb/binary-urls.js +56 -0
- package/dist/engines/influxdb/binary-urls.js.map +1 -0
- package/dist/engines/influxdb/hostdb-releases.js +21 -0
- package/dist/engines/influxdb/hostdb-releases.js.map +1 -0
- package/dist/engines/influxdb/index.js +962 -0
- package/dist/engines/influxdb/index.js.map +1 -0
- package/dist/engines/influxdb/restore.js +329 -0
- package/dist/engines/influxdb/restore.js.map +1 -0
- package/dist/engines/influxdb/version-maps.js +64 -0
- package/dist/engines/influxdb/version-maps.js.map +1 -0
- package/dist/engines/influxdb/version-validator.js +109 -0
- package/dist/engines/influxdb/version-validator.js.map +1 -0
- package/dist/engines/mariadb/backup.js +178 -0
- package/dist/engines/mariadb/backup.js.map +1 -0
- package/dist/engines/mariadb/binary-manager.js +33 -0
- package/dist/engines/mariadb/binary-manager.js.map +1 -0
- package/{engines/mariadb/binary-urls.ts → dist/engines/mariadb/binary-urls.js} +38 -55
- package/dist/engines/mariadb/binary-urls.js.map +1 -0
- package/dist/engines/mariadb/hostdb-releases.js +21 -0
- package/dist/engines/mariadb/hostdb-releases.js.map +1 -0
- package/dist/engines/mariadb/index.js +1011 -0
- package/dist/engines/mariadb/index.js.map +1 -0
- package/dist/engines/mariadb/restore.js +322 -0
- package/dist/engines/mariadb/restore.js.map +1 -0
- package/dist/engines/mariadb/version-maps.js +63 -0
- package/dist/engines/mariadb/version-maps.js.map +1 -0
- package/dist/engines/mariadb/version-validator.js +143 -0
- package/dist/engines/mariadb/version-validator.js.map +1 -0
- package/dist/engines/meilisearch/api-client.js +50 -0
- package/dist/engines/meilisearch/api-client.js.map +1 -0
- package/dist/engines/meilisearch/backup.js +167 -0
- package/dist/engines/meilisearch/backup.js.map +1 -0
- package/dist/engines/meilisearch/binary-manager.js +31 -0
- package/dist/engines/meilisearch/binary-manager.js.map +1 -0
- package/dist/engines/meilisearch/binary-urls.js +56 -0
- package/dist/engines/meilisearch/binary-urls.js.map +1 -0
- package/dist/engines/meilisearch/hostdb-releases.js +21 -0
- package/dist/engines/meilisearch/hostdb-releases.js.map +1 -0
- package/dist/engines/meilisearch/index.js +992 -0
- package/dist/engines/meilisearch/index.js.map +1 -0
- package/dist/engines/meilisearch/restore.js +167 -0
- package/dist/engines/meilisearch/restore.js.map +1 -0
- package/dist/engines/meilisearch/version-maps.js +67 -0
- package/dist/engines/meilisearch/version-maps.js.map +1 -0
- package/dist/engines/meilisearch/version-validator.js +109 -0
- package/dist/engines/meilisearch/version-validator.js.map +1 -0
- package/dist/engines/mongodb/backup.js +109 -0
- package/dist/engines/mongodb/backup.js.map +1 -0
- package/dist/engines/mongodb/binary-manager.js +36 -0
- package/dist/engines/mongodb/binary-manager.js.map +1 -0
- package/dist/engines/mongodb/binary-urls.js +46 -0
- package/dist/engines/mongodb/binary-urls.js.map +1 -0
- package/dist/engines/mongodb/cli-utils.js +131 -0
- package/dist/engines/mongodb/cli-utils.js.map +1 -0
- package/dist/engines/mongodb/hostdb-releases.js +77 -0
- package/dist/engines/mongodb/hostdb-releases.js.map +1 -0
- package/dist/engines/mongodb/index.js +873 -0
- package/dist/engines/mongodb/index.js.map +1 -0
- package/dist/engines/mongodb/restore.js +276 -0
- package/dist/engines/mongodb/restore.js.map +1 -0
- package/dist/engines/mongodb/version-maps.js +79 -0
- package/dist/engines/mongodb/version-maps.js.map +1 -0
- package/dist/engines/mongodb/version-validator.js +133 -0
- package/dist/engines/mongodb/version-validator.js.map +1 -0
- package/dist/engines/mysql/backup.js +210 -0
- package/dist/engines/mysql/backup.js.map +1 -0
- package/dist/engines/mysql/binary-detection.js +325 -0
- package/dist/engines/mysql/binary-detection.js.map +1 -0
- package/dist/engines/mysql/binary-manager.js +30 -0
- package/dist/engines/mysql/binary-manager.js.map +1 -0
- package/dist/engines/mysql/binary-urls.js +87 -0
- package/dist/engines/mysql/binary-urls.js.map +1 -0
- package/{engines/mysql/hostdb-releases.ts → dist/engines/mysql/hostdb-releases.js} +20 -23
- package/dist/engines/mysql/hostdb-releases.js.map +1 -0
- package/dist/engines/mysql/index.js +1066 -0
- package/dist/engines/mysql/index.js.map +1 -0
- package/dist/engines/mysql/restore.js +361 -0
- package/dist/engines/mysql/restore.js.map +1 -0
- package/dist/engines/mysql/version-maps.js +79 -0
- package/dist/engines/mysql/version-maps.js.map +1 -0
- package/dist/engines/mysql/version-validator.js +266 -0
- package/dist/engines/mysql/version-validator.js.map +1 -0
- package/dist/engines/postgresql/backup.js +118 -0
- package/dist/engines/postgresql/backup.js.map +1 -0
- package/dist/engines/postgresql/binary-manager.js +85 -0
- package/dist/engines/postgresql/binary-manager.js.map +1 -0
- package/dist/engines/postgresql/binary-urls.js +80 -0
- package/dist/engines/postgresql/binary-urls.js.map +1 -0
- package/dist/engines/postgresql/hostdb-releases.js +21 -0
- package/dist/engines/postgresql/hostdb-releases.js.map +1 -0
- package/dist/engines/postgresql/index.js +852 -0
- package/dist/engines/postgresql/index.js.map +1 -0
- package/dist/engines/postgresql/remote-version.js +109 -0
- package/dist/engines/postgresql/remote-version.js.map +1 -0
- package/dist/engines/postgresql/restore.js +254 -0
- package/dist/engines/postgresql/restore.js.map +1 -0
- package/dist/engines/postgresql/version-maps.js +73 -0
- package/dist/engines/postgresql/version-maps.js.map +1 -0
- package/dist/engines/postgresql/version-validator.js +286 -0
- package/dist/engines/postgresql/version-validator.js.map +1 -0
- package/dist/engines/qdrant/api-client.js +50 -0
- package/dist/engines/qdrant/api-client.js.map +1 -0
- package/dist/engines/qdrant/backup.js +115 -0
- package/dist/engines/qdrant/backup.js.map +1 -0
- package/dist/engines/qdrant/binary-manager.js +31 -0
- package/dist/engines/qdrant/binary-manager.js.map +1 -0
- package/dist/engines/qdrant/binary-urls.js +92 -0
- package/dist/engines/qdrant/binary-urls.js.map +1 -0
- package/dist/engines/qdrant/cli-utils.js +39 -0
- package/dist/engines/qdrant/cli-utils.js.map +1 -0
- package/dist/engines/qdrant/hostdb-releases.js +21 -0
- package/dist/engines/qdrant/hostdb-releases.js.map +1 -0
- package/dist/engines/qdrant/index.js +1002 -0
- package/dist/engines/qdrant/index.js.map +1 -0
- package/dist/engines/qdrant/restore.js +154 -0
- package/dist/engines/qdrant/restore.js.map +1 -0
- package/dist/engines/qdrant/version-maps.js +67 -0
- package/dist/engines/qdrant/version-maps.js.map +1 -0
- package/dist/engines/qdrant/version-validator.js +109 -0
- package/dist/engines/qdrant/version-validator.js.map +1 -0
- package/dist/engines/questdb/backup.js +191 -0
- package/dist/engines/questdb/backup.js.map +1 -0
- package/dist/engines/questdb/binary-manager.js +247 -0
- package/dist/engines/questdb/binary-manager.js.map +1 -0
- package/dist/engines/questdb/binary-urls.js +27 -0
- package/dist/engines/questdb/binary-urls.js.map +1 -0
- package/dist/engines/questdb/hostdb-releases.js +21 -0
- package/dist/engines/questdb/hostdb-releases.js.map +1 -0
- package/dist/engines/questdb/index.js +814 -0
- package/dist/engines/questdb/index.js.map +1 -0
- package/dist/engines/questdb/restore.js +202 -0
- package/dist/engines/questdb/restore.js.map +1 -0
- package/dist/engines/questdb/version-maps.js +33 -0
- package/dist/engines/questdb/version-maps.js.map +1 -0
- package/dist/engines/questdb/version-validator.js +99 -0
- package/dist/engines/questdb/version-validator.js.map +1 -0
- package/dist/engines/redis/backup.js +292 -0
- package/dist/engines/redis/backup.js.map +1 -0
- package/dist/engines/redis/binary-manager.js +32 -0
- package/dist/engines/redis/binary-manager.js.map +1 -0
- package/dist/engines/redis/binary-urls.js +96 -0
- package/dist/engines/redis/binary-urls.js.map +1 -0
- package/dist/engines/redis/cli-utils.js +38 -0
- package/dist/engines/redis/cli-utils.js.map +1 -0
- package/dist/engines/redis/hostdb-releases.js +21 -0
- package/dist/engines/redis/hostdb-releases.js.map +1 -0
- package/dist/engines/redis/index.js +1263 -0
- package/dist/engines/redis/index.js.map +1 -0
- package/dist/engines/redis/restore.js +338 -0
- package/dist/engines/redis/restore.js.map +1 -0
- package/dist/engines/redis/version-maps.js +70 -0
- package/dist/engines/redis/version-maps.js.map +1 -0
- package/dist/engines/redis/version-validator.js +109 -0
- package/dist/engines/redis/version-validator.js.map +1 -0
- package/dist/engines/sqlite/binary-manager.js +39 -0
- package/dist/engines/sqlite/binary-manager.js.map +1 -0
- package/{engines/sqlite/binary-urls.ts → dist/engines/sqlite/binary-urls.js} +11 -16
- package/dist/engines/sqlite/binary-urls.js.map +1 -0
- package/dist/engines/sqlite/hostdb-releases.js +21 -0
- package/dist/engines/sqlite/hostdb-releases.js.map +1 -0
- package/dist/engines/sqlite/index.js +493 -0
- package/dist/engines/sqlite/index.js.map +1 -0
- package/dist/engines/sqlite/registry.js +163 -0
- package/dist/engines/sqlite/registry.js.map +1 -0
- package/dist/engines/sqlite/scanner.js +12 -0
- package/dist/engines/sqlite/scanner.js.map +1 -0
- package/dist/engines/sqlite/version-maps.js +57 -0
- package/dist/engines/sqlite/version-maps.js.map +1 -0
- package/dist/engines/surrealdb/backup.js +97 -0
- package/dist/engines/surrealdb/backup.js.map +1 -0
- package/dist/engines/surrealdb/binary-manager.js +33 -0
- package/dist/engines/surrealdb/binary-manager.js.map +1 -0
- package/dist/engines/surrealdb/binary-urls.js +33 -0
- package/dist/engines/surrealdb/binary-urls.js.map +1 -0
- package/dist/engines/surrealdb/cli-utils.js +147 -0
- package/dist/engines/surrealdb/cli-utils.js.map +1 -0
- package/dist/engines/surrealdb/hostdb-releases.js +21 -0
- package/dist/engines/surrealdb/hostdb-releases.js.map +1 -0
- package/dist/engines/surrealdb/index.js +1022 -0
- package/dist/engines/surrealdb/index.js.map +1 -0
- package/dist/engines/surrealdb/restore.js +224 -0
- package/dist/engines/surrealdb/restore.js.map +1 -0
- package/dist/engines/surrealdb/version-maps.js +36 -0
- package/dist/engines/surrealdb/version-maps.js.map +1 -0
- package/dist/engines/tigerbeetle/backup.js +36 -0
- package/dist/engines/tigerbeetle/backup.js.map +1 -0
- package/dist/engines/tigerbeetle/binary-manager.js +72 -0
- package/dist/engines/tigerbeetle/binary-manager.js.map +1 -0
- package/dist/engines/tigerbeetle/binary-urls.js +49 -0
- package/dist/engines/tigerbeetle/binary-urls.js.map +1 -0
- package/dist/engines/tigerbeetle/hostdb-releases.js +21 -0
- package/dist/engines/tigerbeetle/hostdb-releases.js.map +1 -0
- package/dist/engines/tigerbeetle/index.js +559 -0
- package/dist/engines/tigerbeetle/index.js.map +1 -0
- package/dist/engines/tigerbeetle/restore.js +91 -0
- package/dist/engines/tigerbeetle/restore.js.map +1 -0
- package/{engines/tigerbeetle/version-maps.ts → dist/engines/tigerbeetle/version-maps.js} +22 -31
- package/dist/engines/tigerbeetle/version-maps.js.map +1 -0
- package/dist/engines/tigerbeetle/version-validator.js +108 -0
- package/dist/engines/tigerbeetle/version-validator.js.map +1 -0
- package/dist/engines/typedb/backup.js +129 -0
- package/dist/engines/typedb/backup.js.map +1 -0
- package/dist/engines/typedb/binary-manager.js +151 -0
- package/dist/engines/typedb/binary-manager.js.map +1 -0
- package/dist/engines/typedb/binary-urls.js +33 -0
- package/dist/engines/typedb/binary-urls.js.map +1 -0
- package/dist/engines/typedb/cli-utils.js +163 -0
- package/dist/engines/typedb/cli-utils.js.map +1 -0
- package/dist/engines/typedb/hostdb-releases.js +21 -0
- package/dist/engines/typedb/hostdb-releases.js.map +1 -0
- package/dist/engines/typedb/index.js +1003 -0
- package/dist/engines/typedb/index.js.map +1 -0
- package/dist/engines/typedb/restore.js +279 -0
- package/dist/engines/typedb/restore.js.map +1 -0
- package/dist/engines/typedb/version-maps.js +40 -0
- package/dist/engines/typedb/version-maps.js.map +1 -0
- package/dist/engines/typedb/version-validator.js +103 -0
- package/dist/engines/typedb/version-validator.js.map +1 -0
- package/dist/engines/valkey/backup.js +292 -0
- package/dist/engines/valkey/backup.js.map +1 -0
- package/dist/engines/valkey/binary-manager.js +33 -0
- package/dist/engines/valkey/binary-manager.js.map +1 -0
- package/dist/engines/valkey/binary-urls.js +98 -0
- package/dist/engines/valkey/binary-urls.js.map +1 -0
- package/dist/engines/valkey/cli-utils.js +38 -0
- package/dist/engines/valkey/cli-utils.js.map +1 -0
- package/dist/engines/valkey/hostdb-releases.js +21 -0
- package/dist/engines/valkey/hostdb-releases.js.map +1 -0
- package/dist/engines/valkey/index.js +1257 -0
- package/dist/engines/valkey/index.js.map +1 -0
- package/dist/engines/valkey/restore.js +340 -0
- package/dist/engines/valkey/restore.js.map +1 -0
- package/dist/engines/valkey/version-maps.js +70 -0
- package/dist/engines/valkey/version-maps.js.map +1 -0
- package/dist/engines/valkey/version-validator.js +112 -0
- package/dist/engines/valkey/version-validator.js.map +1 -0
- package/dist/engines/weaviate/api-client.js +50 -0
- package/dist/engines/weaviate/api-client.js.map +1 -0
- package/dist/engines/weaviate/backup.js +95 -0
- package/dist/engines/weaviate/backup.js.map +1 -0
- package/dist/engines/weaviate/binary-manager.js +58 -0
- package/dist/engines/weaviate/binary-manager.js.map +1 -0
- package/dist/engines/weaviate/binary-urls.js +92 -0
- package/dist/engines/weaviate/binary-urls.js.map +1 -0
- package/dist/engines/weaviate/cli-utils.js +39 -0
- package/dist/engines/weaviate/cli-utils.js.map +1 -0
- package/dist/engines/weaviate/hostdb-releases.js +21 -0
- package/dist/engines/weaviate/hostdb-releases.js.map +1 -0
- package/dist/engines/weaviate/index.js +871 -0
- package/dist/engines/weaviate/index.js.map +1 -0
- package/dist/engines/weaviate/restore.js +185 -0
- package/dist/engines/weaviate/restore.js.map +1 -0
- package/dist/engines/weaviate/version-maps.js +67 -0
- package/dist/engines/weaviate/version-maps.js.map +1 -0
- package/dist/engines/weaviate/version-validator.js +109 -0
- package/dist/engines/weaviate/version-validator.js.map +1 -0
- package/dist/types/index.js +102 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +12 -9
- package/bin/cli.js +0 -68
- package/cli/bin.ts +0 -10
- package/cli/commands/attach.ts +0 -139
- package/cli/commands/backup.ts +0 -290
- package/cli/commands/backups.ts +0 -247
- package/cli/commands/clone.ts +0 -159
- package/cli/commands/config.ts +0 -367
- package/cli/commands/connect.ts +0 -684
- package/cli/commands/create.ts +0 -1201
- package/cli/commands/databases.ts +0 -630
- package/cli/commands/delete.ts +0 -133
- package/cli/commands/deps.ts +0 -342
- package/cli/commands/detach.ts +0 -107
- package/cli/commands/doctor.ts +0 -689
- package/cli/commands/duckdb.ts +0 -273
- package/cli/commands/edit.ts +0 -683
- package/cli/commands/engines.ts +0 -1914
- package/cli/commands/export.ts +0 -544
- package/cli/commands/info.ts +0 -340
- package/cli/commands/list.ts +0 -284
- package/cli/commands/logs.ts +0 -102
- package/cli/commands/menu/backup-handlers.ts +0 -1571
- package/cli/commands/menu/container-handlers.ts +0 -2288
- package/cli/commands/menu/engine-handlers.ts +0 -355
- package/cli/commands/menu/index.ts +0 -342
- package/cli/commands/menu/settings-handlers.ts +0 -365
- package/cli/commands/menu/shared.ts +0 -23
- package/cli/commands/menu/shell-handlers.ts +0 -1811
- package/cli/commands/menu/sql-handlers.ts +0 -231
- package/cli/commands/menu/update-handlers.ts +0 -378
- package/cli/commands/menu/validators.ts +0 -8
- package/cli/commands/ports.ts +0 -211
- package/cli/commands/pull.ts +0 -223
- package/cli/commands/query.ts +0 -241
- package/cli/commands/restore.ts +0 -587
- package/cli/commands/run.ts +0 -178
- package/cli/commands/self-update.ts +0 -121
- package/cli/commands/sqlite.ts +0 -273
- package/cli/commands/start.ts +0 -218
- package/cli/commands/stop.ts +0 -241
- package/cli/commands/url.ts +0 -104
- package/cli/commands/users.ts +0 -264
- package/cli/commands/version.ts +0 -55
- package/cli/commands/which.ts +0 -290
- package/cli/constants.ts +0 -233
- package/cli/helpers.ts +0 -1593
- package/cli/index.ts +0 -162
- package/cli/ui/prompts.ts +0 -1525
- package/cli/ui/spinner.ts +0 -88
- package/cli/ui/theme.ts +0 -128
- package/cli/utils/file-follower.ts +0 -93
- package/config/backup-formats.ts +0 -446
- package/config/defaults.ts +0 -56
- package/config/engine-defaults.ts +0 -336
- package/config/engines-registry.ts +0 -150
- package/config/engines.schema.json +0 -135
- package/config/os-dependencies.ts +0 -888
- package/config/paths.ts +0 -200
- package/core/backup-restore.ts +0 -330
- package/core/base-binary-manager.ts +0 -562
- package/core/base-document-binary-manager.ts +0 -523
- package/core/base-embedded-binary-manager.ts +0 -547
- package/core/base-server-binary-manager.ts +0 -523
- package/core/config-manager.ts +0 -652
- package/core/container-manager.ts +0 -787
- package/core/credential-generator.ts +0 -93
- package/core/credential-manager.ts +0 -259
- package/core/dblab-utils.ts +0 -113
- package/core/dependency-manager.ts +0 -512
- package/core/docker-exporter.ts +0 -1345
- package/core/error-handler.ts +0 -419
- package/core/fs-error-utils.ts +0 -82
- package/core/homebrew-version-manager.ts +0 -352
- package/core/hostdb-client.ts +0 -344
- package/core/hostdb-metadata.ts +0 -350
- package/core/hostdb-releases-factory.ts +0 -237
- package/core/library-env.ts +0 -118
- package/core/pgweb-utils.ts +0 -62
- package/core/platform-service.ts +0 -829
- package/core/port-manager.ts +0 -165
- package/core/process-manager.ts +0 -576
- package/core/pull-manager.ts +0 -511
- package/core/query-parser.ts +0 -514
- package/core/spawn-utils.ts +0 -122
- package/core/start-with-retry.ts +0 -130
- package/core/test-cleanup.ts +0 -108
- package/core/tls-generator.ts +0 -116
- package/core/transaction-manager.ts +0 -158
- package/core/update-manager.ts +0 -308
- package/core/version-migration.ts +0 -346
- package/core/version-utils.ts +0 -104
- package/engines/base-engine.ts +0 -340
- package/engines/clickhouse/README.md +0 -231
- package/engines/clickhouse/backup.ts +0 -398
- package/engines/clickhouse/binary-manager.ts +0 -201
- package/engines/clickhouse/binary-urls.ts +0 -125
- package/engines/clickhouse/cli-utils.ts +0 -176
- package/engines/clickhouse/hostdb-releases.ts +0 -30
- package/engines/clickhouse/index.ts +0 -1345
- package/engines/clickhouse/restore.ts +0 -466
- package/engines/clickhouse/version-maps.ts +0 -95
- package/engines/clickhouse/version-validator.ts +0 -154
- package/engines/cockroachdb/README.md +0 -170
- package/engines/cockroachdb/backup.ts +0 -376
- package/engines/cockroachdb/binary-manager.ts +0 -45
- package/engines/cockroachdb/binary-urls.ts +0 -40
- package/engines/cockroachdb/cli-utils.ts +0 -384
- package/engines/cockroachdb/hostdb-releases.ts +0 -26
- package/engines/cockroachdb/index.ts +0 -1276
- package/engines/cockroachdb/restore.ts +0 -455
- package/engines/cockroachdb/version-maps.ts +0 -42
- package/engines/couchdb/README.md +0 -257
- package/engines/couchdb/api-client.ts +0 -81
- package/engines/couchdb/backup.ts +0 -137
- package/engines/couchdb/binary-manager.ts +0 -86
- package/engines/couchdb/binary-urls.ts +0 -115
- package/engines/couchdb/hostdb-releases.ts +0 -23
- package/engines/couchdb/index.ts +0 -1429
- package/engines/couchdb/restore.ts +0 -290
- package/engines/couchdb/version-maps.ts +0 -78
- package/engines/couchdb/version-validator.ts +0 -111
- package/engines/duckdb/README.md +0 -154
- package/engines/duckdb/binary-manager.ts +0 -45
- package/engines/duckdb/hostdb-releases.ts +0 -23
- package/engines/duckdb/index.ts +0 -749
- package/engines/duckdb/registry.ts +0 -303
- package/engines/duckdb/scanner.ts +0 -22
- package/engines/duckdb/version-maps.ts +0 -78
- package/engines/duckdb/version-validator.ts +0 -78
- package/engines/ferretdb/README.md +0 -262
- package/engines/ferretdb/backup.ts +0 -173
- package/engines/ferretdb/binary-manager.ts +0 -1095
- package/engines/ferretdb/binary-urls.ts +0 -183
- package/engines/ferretdb/index.ts +0 -1907
- package/engines/ferretdb/restore.ts +0 -357
- package/engines/file-based-utils.ts +0 -262
- package/engines/index.ts +0 -131
- package/engines/influxdb/README.md +0 -180
- package/engines/influxdb/api-client.ts +0 -64
- package/engines/influxdb/backup.ts +0 -160
- package/engines/influxdb/binary-manager.ts +0 -110
- package/engines/influxdb/binary-urls.ts +0 -69
- package/engines/influxdb/hostdb-releases.ts +0 -23
- package/engines/influxdb/index.ts +0 -1272
- package/engines/influxdb/restore.ts +0 -417
- package/engines/influxdb/version-maps.ts +0 -75
- package/engines/influxdb/version-validator.ts +0 -128
- package/engines/mariadb/README.md +0 -141
- package/engines/mariadb/backup.ts +0 -233
- package/engines/mariadb/binary-manager.ts +0 -45
- package/engines/mariadb/hostdb-releases.ts +0 -23
- package/engines/mariadb/index.ts +0 -1300
- package/engines/mariadb/restore.ts +0 -447
- package/engines/mariadb/version-maps.ts +0 -72
- package/engines/mariadb/version-validator.ts +0 -181
- package/engines/meilisearch/README.md +0 -255
- package/engines/meilisearch/api-client.ts +0 -61
- package/engines/meilisearch/backup.ts +0 -233
- package/engines/meilisearch/binary-manager.ts +0 -43
- package/engines/meilisearch/binary-urls.ts +0 -69
- package/engines/meilisearch/hostdb-releases.ts +0 -26
- package/engines/meilisearch/index.ts +0 -1292
- package/engines/meilisearch/restore.ts +0 -219
- package/engines/meilisearch/version-maps.ts +0 -78
- package/engines/meilisearch/version-validator.ts +0 -128
- package/engines/mongodb/README.md +0 -162
- package/engines/mongodb/backup.ts +0 -127
- package/engines/mongodb/binary-manager.ts +0 -48
- package/engines/mongodb/binary-urls.ts +0 -63
- package/engines/mongodb/cli-utils.ts +0 -171
- package/engines/mongodb/hostdb-releases.ts +0 -91
- package/engines/mongodb/index.ts +0 -1118
- package/engines/mongodb/restore.ts +0 -361
- package/engines/mongodb/version-maps.ts +0 -91
- package/engines/mongodb/version-validator.ts +0 -160
- package/engines/mysql/README.md +0 -142
- package/engines/mysql/backup.ts +0 -270
- package/engines/mysql/binary-detection.ts +0 -408
- package/engines/mysql/binary-manager.ts +0 -42
- package/engines/mysql/binary-urls.ts +0 -104
- package/engines/mysql/index.ts +0 -1361
- package/engines/mysql/restore.ts +0 -500
- package/engines/mysql/version-maps.ts +0 -91
- package/engines/mysql/version-validator.ts +0 -369
- package/engines/postgresql/README.md +0 -158
- package/engines/postgresql/backup.ts +0 -151
- package/engines/postgresql/binary-manager.ts +0 -114
- package/engines/postgresql/binary-urls.ts +0 -99
- package/engines/postgresql/hostdb-releases.ts +0 -26
- package/engines/postgresql/index.ts +0 -1143
- package/engines/postgresql/remote-version.ts +0 -161
- package/engines/postgresql/restore.ts +0 -342
- package/engines/postgresql/version-maps.ts +0 -83
- package/engines/postgresql/version-validator.ts +0 -413
- package/engines/qdrant/README.md +0 -222
- package/engines/qdrant/api-client.ts +0 -61
- package/engines/qdrant/backup.ts +0 -165
- package/engines/qdrant/binary-manager.ts +0 -43
- package/engines/qdrant/binary-urls.ts +0 -115
- package/engines/qdrant/cli-utils.ts +0 -43
- package/engines/qdrant/hostdb-releases.ts +0 -23
- package/engines/qdrant/index.ts +0 -1312
- package/engines/qdrant/restore.ts +0 -203
- package/engines/qdrant/version-maps.ts +0 -78
- package/engines/qdrant/version-validator.ts +0 -128
- package/engines/questdb/README.md +0 -334
- package/engines/questdb/backup.ts +0 -220
- package/engines/questdb/binary-manager.ts +0 -310
- package/engines/questdb/binary-urls.ts +0 -34
- package/engines/questdb/hostdb-releases.ts +0 -23
- package/engines/questdb/index.ts +0 -1023
- package/engines/questdb/restore.ts +0 -260
- package/engines/questdb/version-maps.ts +0 -37
- package/engines/questdb/version-validator.ts +0 -121
- package/engines/redis/README.md +0 -173
- package/engines/redis/backup.ts +0 -389
- package/engines/redis/binary-manager.ts +0 -44
- package/engines/redis/binary-urls.ts +0 -117
- package/engines/redis/cli-utils.ts +0 -42
- package/engines/redis/hostdb-releases.ts +0 -23
- package/engines/redis/index.ts +0 -1583
- package/engines/redis/restore.ts +0 -443
- package/engines/redis/version-maps.ts +0 -81
- package/engines/redis/version-validator.ts +0 -131
- package/engines/sqlite/README.md +0 -162
- package/engines/sqlite/binary-manager.ts +0 -52
- package/engines/sqlite/hostdb-releases.ts +0 -23
- package/engines/sqlite/index.ts +0 -641
- package/engines/sqlite/registry.ts +0 -198
- package/engines/sqlite/scanner.ts +0 -22
- package/engines/sqlite/version-maps.ts +0 -64
- package/engines/surrealdb/README.md +0 -218
- package/engines/surrealdb/backup.ts +0 -131
- package/engines/surrealdb/binary-manager.ts +0 -45
- package/engines/surrealdb/binary-urls.ts +0 -40
- package/engines/surrealdb/cli-utils.ts +0 -173
- package/engines/surrealdb/hostdb-releases.ts +0 -23
- package/engines/surrealdb/index.ts +0 -1246
- package/engines/surrealdb/restore.ts +0 -302
- package/engines/surrealdb/version-maps.ts +0 -41
- package/engines/tigerbeetle/README.md +0 -61
- package/engines/tigerbeetle/backup.ts +0 -49
- package/engines/tigerbeetle/binary-manager.ts +0 -95
- package/engines/tigerbeetle/binary-urls.ts +0 -62
- package/engines/tigerbeetle/hostdb-releases.ts +0 -26
- package/engines/tigerbeetle/index.ts +0 -746
- package/engines/tigerbeetle/restore.ts +0 -130
- package/engines/tigerbeetle/version-validator.ts +0 -126
- package/engines/typedb/backup.ts +0 -167
- package/engines/typedb/binary-manager.ts +0 -200
- package/engines/typedb/binary-urls.ts +0 -40
- package/engines/typedb/cli-utils.ts +0 -210
- package/engines/typedb/hostdb-releases.ts +0 -23
- package/engines/typedb/index.ts +0 -1275
- package/engines/typedb/restore.ts +0 -377
- package/engines/typedb/version-maps.ts +0 -48
- package/engines/typedb/version-validator.ts +0 -127
- package/engines/valkey/README.md +0 -219
- package/engines/valkey/backup.ts +0 -389
- package/engines/valkey/binary-manager.ts +0 -45
- package/engines/valkey/binary-urls.ts +0 -122
- package/engines/valkey/cli-utils.ts +0 -42
- package/engines/valkey/hostdb-releases.ts +0 -23
- package/engines/valkey/index.ts +0 -1585
- package/engines/valkey/restore.ts +0 -446
- package/engines/valkey/version-maps.ts +0 -81
- package/engines/valkey/version-validator.ts +0 -131
- package/engines/weaviate/README.md +0 -302
- package/engines/weaviate/api-client.ts +0 -61
- package/engines/weaviate/backup.ts +0 -145
- package/engines/weaviate/binary-manager.ts +0 -80
- package/engines/weaviate/binary-urls.ts +0 -115
- package/engines/weaviate/cli-utils.ts +0 -43
- package/engines/weaviate/hostdb-releases.ts +0 -23
- package/engines/weaviate/index.ts +0 -1139
- package/engines/weaviate/restore.ts +0 -235
- package/engines/weaviate/version-maps.ts +0 -78
- package/engines/weaviate/version-validator.ts +0 -128
- package/types/index.ts +0 -624
- /package/{config → dist/config}/engines.json +0 -0
package/core/version-utils.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared version comparison utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides robust version comparison that handles prerelease suffixes
|
|
5
|
-
* like "11.8.0-rc1" or "7.4.7-beta2".
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Parse a version segment into numeric prefix and suffix
|
|
10
|
-
*
|
|
11
|
-
* Expected format: optional digits followed by optional suffix
|
|
12
|
-
* Examples:
|
|
13
|
-
* "7" -> { num: 7, suffix: "" }
|
|
14
|
-
* "7-rc1" -> { num: 7, suffix: "-rc1" }
|
|
15
|
-
* "0" -> { num: 0, suffix: "" }
|
|
16
|
-
*
|
|
17
|
-
* Non-numeric segments (no leading digits):
|
|
18
|
-
* "abc" -> { num: -1, suffix: "abc" }
|
|
19
|
-
* "" -> { num: -1, suffix: "" }
|
|
20
|
-
*
|
|
21
|
-
* Use num === -1 to detect non-numeric segments. When comparing versions,
|
|
22
|
-
* non-numeric segments sort before numeric ones (since -1 < 0).
|
|
23
|
-
*
|
|
24
|
-
* @param segment - A single version segment (part between dots)
|
|
25
|
-
* @returns Object with numeric prefix and remaining suffix
|
|
26
|
-
*/
|
|
27
|
-
export function parseVersionSegment(segment: string): {
|
|
28
|
-
num: number
|
|
29
|
-
suffix: string
|
|
30
|
-
} {
|
|
31
|
-
const match = segment.match(/^(\d+)(.*)$/)
|
|
32
|
-
if (!match) {
|
|
33
|
-
// Non-numeric segment: use -1 as sentinel so callers can distinguish
|
|
34
|
-
return { num: -1, suffix: segment }
|
|
35
|
-
}
|
|
36
|
-
return { num: parseInt(match[1], 10), suffix: match[2] }
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Compare two version strings (e.g., "11.8.5" vs "11.8.4")
|
|
41
|
-
* Handles prerelease suffixes like "11.8.0-rc1" - empty suffix sorts after prerelease
|
|
42
|
-
* Returns positive if a > b, negative if a < b, 0 if equal
|
|
43
|
-
*/
|
|
44
|
-
export function compareVersions(a: string, b: string): number {
|
|
45
|
-
const partsA = a.split('.')
|
|
46
|
-
const partsB = b.split('.')
|
|
47
|
-
|
|
48
|
-
for (let i = 0; i < Math.max(partsA.length, partsB.length); i++) {
|
|
49
|
-
const segA = parseVersionSegment(partsA[i] || '0')
|
|
50
|
-
const segB = parseVersionSegment(partsB[i] || '0')
|
|
51
|
-
|
|
52
|
-
// Compare numeric parts first
|
|
53
|
-
if (segA.num !== segB.num) {
|
|
54
|
-
return segA.num - segB.num
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// If numeric parts equal, compare suffixes
|
|
58
|
-
// Empty suffix (release) > prerelease suffix (e.g., "-rc1")
|
|
59
|
-
if (segA.suffix !== segB.suffix) {
|
|
60
|
-
if (segA.suffix === '') return 1 // a is release, b is prerelease
|
|
61
|
-
if (segB.suffix === '') return -1 // b is release, a is prerelease
|
|
62
|
-
// NOTE: Lexicographic comparison means -rc10 < -rc2 (incorrect for numeric suffixes).
|
|
63
|
-
// This is acceptable for hostdb versions which use single-digit prereleases.
|
|
64
|
-
// If multi-digit prereleases are needed, parse numeric suffix separately.
|
|
65
|
-
return segA.suffix.localeCompare(segB.suffix)
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return 0
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Check if versionA is newer than versionB
|
|
73
|
-
* Convenience wrapper around compareVersions
|
|
74
|
-
*/
|
|
75
|
-
export function isNewerVersion(versionA: string, versionB: string): boolean {
|
|
76
|
-
return compareVersions(versionA, versionB) > 0
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Regex pattern for validating semver-like version strings.
|
|
81
|
-
* Matches: X, X.Y, or X.Y.Z where each component is numeric.
|
|
82
|
-
* Examples: "8", "8.0", "8.0.40", "17", "17.7.0"
|
|
83
|
-
*/
|
|
84
|
-
export const SEMVER_LIKE_PATTERN = /^\d+(\.\d+){0,2}$/
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Validate that a version string matches semver-like format (X, X.Y, or X.Y.Z).
|
|
88
|
-
* Used by engines that require strict version format validation (MySQL, PostgreSQL).
|
|
89
|
-
*
|
|
90
|
-
* @param version - Version string to validate
|
|
91
|
-
* @param engineName - Engine name for error message (e.g., 'MySQL', 'PostgreSQL')
|
|
92
|
-
* @throws TypeError if version format is invalid
|
|
93
|
-
*/
|
|
94
|
-
export function validateSemverLikeVersion(
|
|
95
|
-
version: string,
|
|
96
|
-
engineName: string,
|
|
97
|
-
): void {
|
|
98
|
-
if (!SEMVER_LIKE_PATTERN.test(version)) {
|
|
99
|
-
throw new TypeError(
|
|
100
|
-
`Invalid ${engineName} version format: "${version}". ` +
|
|
101
|
-
`Expected format: X, X.Y, or X.Y.Z (e.g., "8", "8.0", "8.0.40")`,
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
}
|
package/engines/base-engine.ts
DELETED
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ContainerConfig,
|
|
3
|
-
ProgressCallback,
|
|
4
|
-
BackupFormat,
|
|
5
|
-
BackupOptions,
|
|
6
|
-
BackupResult,
|
|
7
|
-
RestoreResult,
|
|
8
|
-
DumpResult,
|
|
9
|
-
StatusResult,
|
|
10
|
-
QueryResult,
|
|
11
|
-
QueryOptions,
|
|
12
|
-
CreateUserOptions,
|
|
13
|
-
UserCredentials,
|
|
14
|
-
} from '../types'
|
|
15
|
-
import { UnsupportedOperationError } from '../core/error-handler'
|
|
16
|
-
import { stopPgweb } from '../core/pgweb-utils'
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Base class for database engines
|
|
20
|
-
* All engines (PostgreSQL, MySQL, SQLite) should extend this class
|
|
21
|
-
*/
|
|
22
|
-
export abstract class BaseEngine {
|
|
23
|
-
abstract name: string
|
|
24
|
-
abstract displayName: string
|
|
25
|
-
abstract defaultPort: number
|
|
26
|
-
abstract supportedVersions: string[]
|
|
27
|
-
|
|
28
|
-
// Get the download URL for binaries
|
|
29
|
-
abstract getBinaryUrl(version: string, platform: string, arch: string): string
|
|
30
|
-
|
|
31
|
-
// Verify that the binaries are working correctly
|
|
32
|
-
abstract verifyBinary(binPath: string): Promise<boolean>
|
|
33
|
-
|
|
34
|
-
// Initialize a new data directory
|
|
35
|
-
abstract initDataDir(
|
|
36
|
-
containerName: string,
|
|
37
|
-
version: string,
|
|
38
|
-
options?: Record<string, unknown>,
|
|
39
|
-
): Promise<string>
|
|
40
|
-
|
|
41
|
-
// Start the database server
|
|
42
|
-
abstract start(
|
|
43
|
-
container: ContainerConfig,
|
|
44
|
-
onProgress?: ProgressCallback,
|
|
45
|
-
): Promise<{ port: number; connectionString: string }>
|
|
46
|
-
|
|
47
|
-
// Stop the database server
|
|
48
|
-
abstract stop(container: ContainerConfig): Promise<void>
|
|
49
|
-
|
|
50
|
-
// Get the status of the database server
|
|
51
|
-
abstract status(container: ContainerConfig): Promise<StatusResult>
|
|
52
|
-
|
|
53
|
-
// Detect the format of a backup file
|
|
54
|
-
abstract detectBackupFormat(filePath: string): Promise<BackupFormat>
|
|
55
|
-
|
|
56
|
-
// Restore a backup to the database
|
|
57
|
-
abstract restore(
|
|
58
|
-
container: ContainerConfig,
|
|
59
|
-
backupPath: string,
|
|
60
|
-
options?: Record<string, unknown>,
|
|
61
|
-
): Promise<RestoreResult>
|
|
62
|
-
|
|
63
|
-
// Get the connection string for a container
|
|
64
|
-
abstract getConnectionString(
|
|
65
|
-
container: ContainerConfig,
|
|
66
|
-
database?: string,
|
|
67
|
-
): string
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Get the path to the psql client if available
|
|
71
|
-
* Default implementation throws; engines that can provide a bundled or
|
|
72
|
-
* configured psql should override this method.
|
|
73
|
-
*/
|
|
74
|
-
async getPsqlPath(): Promise<string> {
|
|
75
|
-
throw new Error('psql not found')
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Get the path to the mysql client if available
|
|
80
|
-
* Default implementation throws; engines that can provide a bundled or
|
|
81
|
-
* configured mysql should override this method.
|
|
82
|
-
*/
|
|
83
|
-
async getMysqlClientPath(): Promise<string> {
|
|
84
|
-
throw new Error('mysql client not found')
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Get the path to the mariadb client if available
|
|
89
|
-
* Default implementation throws; MariaDB engine overrides this method.
|
|
90
|
-
*/
|
|
91
|
-
async getMariadbClientPath(): Promise<string> {
|
|
92
|
-
throw new Error('mariadb client not found')
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Get the path to the mysqladmin client if available
|
|
97
|
-
* Default implementation throws; engines that can provide a bundled or
|
|
98
|
-
* configured mysqladmin should override this method.
|
|
99
|
-
*/
|
|
100
|
-
async getMysqladminPath(): Promise<string> {
|
|
101
|
-
throw new Error('mysqladmin not found')
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Get the path to the mongosh client if available
|
|
106
|
-
* Default implementation throws; engines that can provide a bundled or
|
|
107
|
-
* configured mongosh should override this method.
|
|
108
|
-
*/
|
|
109
|
-
async getMongoshPath(): Promise<string> {
|
|
110
|
-
throw new Error('mongosh not found')
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Get the path to the redis-cli client if available
|
|
115
|
-
* Default implementation throws; engines that can provide a bundled or
|
|
116
|
-
* configured redis-cli should override this method.
|
|
117
|
-
*/
|
|
118
|
-
async getRedisCliPath(): Promise<string> {
|
|
119
|
-
throw new Error('redis-cli not found')
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Get the path to the valkey-cli client if available
|
|
124
|
-
* Default implementation throws; engines that can provide a bundled or
|
|
125
|
-
* configured valkey-cli should override this method.
|
|
126
|
-
*/
|
|
127
|
-
async getValkeyCliPath(): Promise<string> {
|
|
128
|
-
throw new Error('valkey-cli not found')
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Get the path to the clickhouse client if available
|
|
133
|
-
* Default implementation throws; engines that can provide a bundled or
|
|
134
|
-
* configured clickhouse should override this method.
|
|
135
|
-
*/
|
|
136
|
-
async getClickHouseClientPath(): Promise<string> {
|
|
137
|
-
throw new Error('clickhouse client not found')
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Get the path to the cockroach binary if available
|
|
142
|
-
* Default implementation throws; CockroachDB engine overrides this method.
|
|
143
|
-
*/
|
|
144
|
-
async getCockroachPath(_version?: string): Promise<string> {
|
|
145
|
-
throw new Error('cockroach not found')
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Get the path to the surreal binary if available
|
|
150
|
-
* Default implementation throws; SurrealDB engine overrides this method.
|
|
151
|
-
*/
|
|
152
|
-
async getSurrealPath(_version?: string): Promise<string> {
|
|
153
|
-
throw new Error('surreal not found')
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Get the path to the typedb console binary if available
|
|
158
|
-
* Default implementation throws; TypeDB engine overrides this method.
|
|
159
|
-
*/
|
|
160
|
-
async getTypeDBConsolePath(_version?: string): Promise<string> {
|
|
161
|
-
throw new Error('typedb_console_bin not found')
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Get the path to the influxdb3 binary if available
|
|
166
|
-
* Default implementation throws; InfluxDB engine overrides this method.
|
|
167
|
-
*/
|
|
168
|
-
async getInfluxDBPath(_version?: string): Promise<string> {
|
|
169
|
-
throw new Error('influxdb3 not found')
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Get the path to the tigerbeetle binary if available
|
|
174
|
-
* Default implementation throws; TigerBeetle engine overrides this method.
|
|
175
|
-
*/
|
|
176
|
-
async getTigerBeetlePath(_version?: string): Promise<string> {
|
|
177
|
-
throw new Error('tigerbeetle not found')
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Get the path to the sqlite3 client if available
|
|
182
|
-
* Default implementation returns null; SQLite engine overrides this method.
|
|
183
|
-
*/
|
|
184
|
-
async getSqlite3Path(_version?: string): Promise<string | null> {
|
|
185
|
-
return null
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Get the path to the duckdb client if available
|
|
190
|
-
* Default implementation returns null; DuckDB engine overrides this method.
|
|
191
|
-
*/
|
|
192
|
-
async getDuckDBPath(_version?: string): Promise<string | null> {
|
|
193
|
-
return null
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// Open an interactive shell/CLI connection
|
|
197
|
-
abstract connect(container: ContainerConfig, database?: string): Promise<void>
|
|
198
|
-
|
|
199
|
-
// Create a new database within the container
|
|
200
|
-
abstract createDatabase(
|
|
201
|
-
container: ContainerConfig,
|
|
202
|
-
database: string,
|
|
203
|
-
): Promise<void>
|
|
204
|
-
|
|
205
|
-
// Drop a database within the container
|
|
206
|
-
abstract dropDatabase(
|
|
207
|
-
container: ContainerConfig,
|
|
208
|
-
database: string,
|
|
209
|
-
): Promise<void>
|
|
210
|
-
|
|
211
|
-
// Check if binaries are installed
|
|
212
|
-
abstract isBinaryInstalled(version: string): Promise<boolean>
|
|
213
|
-
|
|
214
|
-
// Ensure binaries are available, downloading if necessary
|
|
215
|
-
abstract ensureBinaries(
|
|
216
|
-
version: string,
|
|
217
|
-
onProgress?: ProgressCallback,
|
|
218
|
-
): Promise<string>
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Fetch all available versions from remote source (grouped by major version)
|
|
222
|
-
* Returns a map of major version -> array of full versions (sorted latest first)
|
|
223
|
-
* Falls back to hardcoded versions if network fails
|
|
224
|
-
*/
|
|
225
|
-
async fetchAvailableVersions(): Promise<Record<string, string[]>> {
|
|
226
|
-
// Default implementation returns supported versions as single-item arrays
|
|
227
|
-
const versions: Record<string, string[]> = {}
|
|
228
|
-
for (const v of this.supportedVersions) {
|
|
229
|
-
versions[v] = [v]
|
|
230
|
-
}
|
|
231
|
-
return versions
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
// Create a dump from a remote database using a connection string
|
|
235
|
-
abstract dumpFromConnectionString(
|
|
236
|
-
connectionString: string,
|
|
237
|
-
outputPath: string,
|
|
238
|
-
): Promise<DumpResult>
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Get the size of a database in bytes
|
|
242
|
-
* Returns null if the container is not running or size cannot be determined
|
|
243
|
-
*/
|
|
244
|
-
abstract getDatabaseSize(container: ContainerConfig): Promise<number | null>
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Create a backup of a database
|
|
248
|
-
* @param container - The container configuration
|
|
249
|
-
* @param outputPath - Path to write the backup file
|
|
250
|
-
* @param options - Backup options including database name and format
|
|
251
|
-
*/
|
|
252
|
-
abstract backup(
|
|
253
|
-
container: ContainerConfig,
|
|
254
|
-
outputPath: string,
|
|
255
|
-
options: BackupOptions,
|
|
256
|
-
): Promise<BackupResult>
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Run a SQL file or inline SQL statement against the database
|
|
260
|
-
* @param container - The container configuration
|
|
261
|
-
* @param options - Options including file path or SQL statement, and target database
|
|
262
|
-
*/
|
|
263
|
-
abstract runScript(
|
|
264
|
-
container: ContainerConfig,
|
|
265
|
-
options: {
|
|
266
|
-
file?: string
|
|
267
|
-
sql?: string
|
|
268
|
-
database?: string
|
|
269
|
-
transactionType?: 'read' | 'write' | 'schema'
|
|
270
|
-
},
|
|
271
|
-
): Promise<void>
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Terminate all active connections to a database.
|
|
275
|
-
* Required before dropping a database that may have active connections.
|
|
276
|
-
* Default implementation is a no-op - engines that need it should override.
|
|
277
|
-
* @param container - The container configuration
|
|
278
|
-
* @param database - The database name to terminate connections for
|
|
279
|
-
*/
|
|
280
|
-
async terminateConnections(
|
|
281
|
-
_container: ContainerConfig,
|
|
282
|
-
_database: string,
|
|
283
|
-
): Promise<void> {
|
|
284
|
-
// Default: no-op. Override in engines that support connection termination.
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Stop pgweb if running for this container.
|
|
289
|
-
* Called from stop() in engines that support pgweb (PostgreSQL, CockroachDB, FerretDB).
|
|
290
|
-
*/
|
|
291
|
-
protected async stopPgweb(containerName: string): Promise<void> {
|
|
292
|
-
await stopPgweb(containerName, this.name)
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Execute a query and return results in a structured format.
|
|
297
|
-
* @param container - The container configuration
|
|
298
|
-
* @param query - The query to execute (SQL, JavaScript, Redis commands, or REST API request)
|
|
299
|
-
* @param options - Query options including target database
|
|
300
|
-
* @returns QueryResult with columns, rows, and row count
|
|
301
|
-
*/
|
|
302
|
-
abstract executeQuery(
|
|
303
|
-
container: ContainerConfig,
|
|
304
|
-
query: string,
|
|
305
|
-
options?: QueryOptions,
|
|
306
|
-
): Promise<QueryResult>
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* List all user databases on the server, excluding system databases.
|
|
310
|
-
* Used to sync the registry with actual databases on the server.
|
|
311
|
-
*
|
|
312
|
-
* System databases excluded by default:
|
|
313
|
-
* - PostgreSQL: template0, template1, postgres
|
|
314
|
-
* - MySQL/MariaDB: information_schema, mysql, performance_schema, sys
|
|
315
|
-
* - CockroachDB: defaultdb, postgres, system
|
|
316
|
-
*
|
|
317
|
-
* @param container - The container configuration
|
|
318
|
-
* @returns Array of database names (excluding system databases)
|
|
319
|
-
* @throws Error if the engine doesn't support multiple databases or listing
|
|
320
|
-
*/
|
|
321
|
-
async listDatabases(_container: ContainerConfig): Promise<string[]> {
|
|
322
|
-
throw new UnsupportedOperationError('listDatabases', this.displayName)
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* Create a database user with the given credentials.
|
|
327
|
-
* Returns credentials including connection string.
|
|
328
|
-
*
|
|
329
|
-
* @param container - The container configuration
|
|
330
|
-
* @param options - Username, password, and optional target database
|
|
331
|
-
* @returns UserCredentials with connection info
|
|
332
|
-
* @throws UnsupportedOperationError for engines that don't support users (SQLite, DuckDB, QuestDB)
|
|
333
|
-
*/
|
|
334
|
-
async createUser(
|
|
335
|
-
_container: ContainerConfig,
|
|
336
|
-
_options: CreateUserOptions,
|
|
337
|
-
): Promise<UserCredentials> {
|
|
338
|
-
throw new UnsupportedOperationError('createUser', this.displayName)
|
|
339
|
-
}
|
|
340
|
-
}
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
# ClickHouse Engine Implementation
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
ClickHouse is a high-performance columnar OLAP database. It uses a single unified binary that handles server, client, and local modes.
|
|
6
|
-
|
|
7
|
-
## Platform Support
|
|
8
|
-
|
|
9
|
-
| Platform | Architecture | Status | Notes |
|
|
10
|
-
|----------|--------------|--------|-------|
|
|
11
|
-
| darwin | x64 | Supported | Uses hostdb binaries |
|
|
12
|
-
| darwin | arm64 | Supported | Uses hostdb binaries (Apple Silicon) |
|
|
13
|
-
| linux | x64 | Supported | Uses hostdb binaries |
|
|
14
|
-
| linux | arm64 | Supported | Uses hostdb binaries |
|
|
15
|
-
| win32 | x64 | **NOT SUPPORTED** | See "Windows Support" section |
|
|
16
|
-
|
|
17
|
-
### Windows Support - Extensive Investigation
|
|
18
|
-
|
|
19
|
-
ClickHouse on Windows is **not supported** after extensive investigation:
|
|
20
|
-
|
|
21
|
-
1. **No official Windows binaries**: ClickHouse does not provide official Windows builds
|
|
22
|
-
2. **hostdb build attempts**: Multiple attempts were made to build ClickHouse for Windows in hostdb
|
|
23
|
-
3. **Compilation failures**: The Windows build process has significant issues with the ClickHouse codebase
|
|
24
|
-
4. **WSL recommended**: Users on Windows should use WSL (Windows Subsystem for Linux)
|
|
25
|
-
|
|
26
|
-
This is one of the unsolved platform limitations in SpinDB. The decision was made to put a pin in Windows support and document it clearly rather than continue spending time on an unviable path.
|
|
27
|
-
|
|
28
|
-
## Binary Packaging
|
|
29
|
-
|
|
30
|
-
### Archive Format
|
|
31
|
-
- **Unix (macOS/Linux)**: `tar.gz`
|
|
32
|
-
- **Windows**: Not applicable (unsupported)
|
|
33
|
-
|
|
34
|
-
### Archive Structure - Potentially Flat
|
|
35
|
-
|
|
36
|
-
ClickHouse archives may have either structure:
|
|
37
|
-
|
|
38
|
-
**Standard structure:**
|
|
39
|
-
```
|
|
40
|
-
clickhouse/
|
|
41
|
-
└── bin/
|
|
42
|
-
└── clickhouse # Unified binary
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**Flat structure:**
|
|
46
|
-
```
|
|
47
|
-
clickhouse # Unified binary (no subdirectory)
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
The binary manager handles both cases with custom `moveExtractedEntries()`.
|
|
51
|
-
|
|
52
|
-
### Unified Binary
|
|
53
|
-
|
|
54
|
-
ClickHouse uses a single `clickhouse` binary for all operations:
|
|
55
|
-
- `clickhouse server` - Run server
|
|
56
|
-
- `clickhouse client` - Interactive client
|
|
57
|
-
- `clickhouse local` - Local query processing
|
|
58
|
-
|
|
59
|
-
### Version Map Sync
|
|
60
|
-
|
|
61
|
-
**Important**: ClickHouse uses YY.MM versioning, not semver:
|
|
62
|
-
|
|
63
|
-
```typescript
|
|
64
|
-
export const CLICKHOUSE_VERSION_MAP: Record<string, string> = {
|
|
65
|
-
'25.12': '25.12.3.21', // YY.MM.patch.build format
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Implementation Details
|
|
70
|
-
|
|
71
|
-
### Binary Manager
|
|
72
|
-
|
|
73
|
-
ClickHouse uses `BaseServerBinaryManager` with several overrides:
|
|
74
|
-
- `extractWindowsBinaries()` - Throws error (Windows unsupported)
|
|
75
|
-
- `moveExtractedEntries()` - Handles flat archive structure
|
|
76
|
-
- `verify()` - Custom YY.MM version matching
|
|
77
|
-
|
|
78
|
-
### Version Format - YY.MM
|
|
79
|
-
|
|
80
|
-
ClickHouse versions are **year.month** based:
|
|
81
|
-
- `25.12.3.21` means 2025, December, patch 3, build 21
|
|
82
|
-
- Version matching compares first two parts (YY.MM)
|
|
83
|
-
|
|
84
|
-
### Version Parsing
|
|
85
|
-
|
|
86
|
-
- **Version output format**: `ClickHouse client version 25.12.3.21`
|
|
87
|
-
- **Parse pattern**: `/(\d+\.\d+\.\d+\.\d+)/` (4-part version)
|
|
88
|
-
- **Major version matching**: Compares `YY.MM` portion
|
|
89
|
-
|
|
90
|
-
### XML Configuration
|
|
91
|
-
|
|
92
|
-
ClickHouse uses XML configuration (not YAML):
|
|
93
|
-
|
|
94
|
-
```xml
|
|
95
|
-
<?xml version="1.0"?>
|
|
96
|
-
<clickhouse>
|
|
97
|
-
<http_port>8124</http_port>
|
|
98
|
-
<tcp_port>9000</tcp_port>
|
|
99
|
-
<listen_host>127.0.0.1</listen_host>
|
|
100
|
-
<path>/data/</path>
|
|
101
|
-
<!-- ... -->
|
|
102
|
-
</clickhouse>
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Dual Ports
|
|
106
|
-
|
|
107
|
-
ClickHouse uses two ports:
|
|
108
|
-
- **TCP Port** (default 9000): Native protocol
|
|
109
|
-
- **HTTP Port** (default 8123): HTTP API and Play UI
|
|
110
|
-
|
|
111
|
-
### Default Configuration
|
|
112
|
-
|
|
113
|
-
- **Default TCP Port**: 9000 (auto-increments on conflict)
|
|
114
|
-
- **HTTP Port**: TCP port + 1
|
|
115
|
-
- **PID File**: `clickhouse.pid` in container directory
|
|
116
|
-
- **Web UI**: Play at `http://localhost:8123/play`
|
|
117
|
-
|
|
118
|
-
### PID File Handling
|
|
119
|
-
|
|
120
|
-
ClickHouse in daemon mode doesn't respect `<pid_file>` config. The engine manually finds the process by port and writes the PID file:
|
|
121
|
-
|
|
122
|
-
```typescript
|
|
123
|
-
const pids = await platformService.findProcessByPort(port)
|
|
124
|
-
if (pids.length > 0) {
|
|
125
|
-
await writeFile(pidFile, String(pids[0]), 'utf8')
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Startup Command
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
clickhouse server --config-file config.xml --daemon
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Connection String Format
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
clickhouse://127.0.0.1:{port}/{database}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## Backup & Restore
|
|
142
|
-
|
|
143
|
-
### Backup Formats
|
|
144
|
-
|
|
145
|
-
| Format | Extension | Tool | Notes |
|
|
146
|
-
|--------|-----------|------|-------|
|
|
147
|
-
| sql | `.sql` | clickhouse client | SQL export |
|
|
148
|
-
|
|
149
|
-
ClickHouse backup uses `SELECT * FORMAT SQLInsert` for data export.
|
|
150
|
-
|
|
151
|
-
## Integration Test Notes
|
|
152
|
-
|
|
153
|
-
### Extended Timeout
|
|
154
|
-
|
|
155
|
-
ClickHouse can take longer to start on CI runners (up to 90 seconds). The `waitForReady()` timeout is extended accordingly.
|
|
156
|
-
|
|
157
|
-
### Test Fixtures
|
|
158
|
-
|
|
159
|
-
Located in `tests/fixtures/clickhouse/seeds/`:
|
|
160
|
-
- SQL data for testing
|
|
161
|
-
|
|
162
|
-
## Docker E2E Test Notes
|
|
163
|
-
|
|
164
|
-
ClickHouse Docker E2E tests verify:
|
|
165
|
-
- Server lifecycle
|
|
166
|
-
- SQL operations via client
|
|
167
|
-
- HTTP API availability
|
|
168
|
-
- Backup/restore
|
|
169
|
-
|
|
170
|
-
### Linux-Only in CI
|
|
171
|
-
|
|
172
|
-
ClickHouse CI tests only run on Linux and macOS runners.
|
|
173
|
-
|
|
174
|
-
## Known Issues & Gotchas
|
|
175
|
-
|
|
176
|
-
### 1. Windows Not Supported
|
|
177
|
-
|
|
178
|
-
Extensive work was done trying to get ClickHouse working on Windows. It's not viable. Use WSL.
|
|
179
|
-
|
|
180
|
-
### 2. YY.MM Version Format
|
|
181
|
-
|
|
182
|
-
Don't expect semver. Version `25.12.3.21` is December 2025, not version 25.12.
|
|
183
|
-
|
|
184
|
-
### 3. Flat Archive Handling
|
|
185
|
-
|
|
186
|
-
Some ClickHouse archives have binaries at the root, not in `bin/`. The engine handles this but be aware when debugging.
|
|
187
|
-
|
|
188
|
-
### 4. XML Config
|
|
189
|
-
|
|
190
|
-
Unlike most databases, ClickHouse uses XML configuration. The engine generates `config.xml` and `users.xml`.
|
|
191
|
-
|
|
192
|
-
### 5. Long Startup Time
|
|
193
|
-
|
|
194
|
-
ClickHouse may take longer to start than other databases, especially on first run or on resource-constrained systems.
|
|
195
|
-
|
|
196
|
-
### 6. Memory Usage
|
|
197
|
-
|
|
198
|
-
ClickHouse is designed for high-performance analytics and may use significant memory. The default `mark_cache_size` is 5GB.
|
|
199
|
-
|
|
200
|
-
### 7. HTTP Port for Play UI
|
|
201
|
-
|
|
202
|
-
The Play UI (web-based query interface) is at the HTTP port, not TCP port:
|
|
203
|
-
- TCP: `clickhouse://localhost:9000`
|
|
204
|
-
- HTTP/UI: `http://localhost:8123/play`
|
|
205
|
-
|
|
206
|
-
## CI/CD Notes
|
|
207
|
-
|
|
208
|
-
### Skipped on Windows
|
|
209
|
-
|
|
210
|
-
ClickHouse CI tests are completely skipped on Windows runners.
|
|
211
|
-
|
|
212
|
-
### GitHub Actions Cache Step
|
|
213
|
-
|
|
214
|
-
```yaml
|
|
215
|
-
- name: Cache ClickHouse binaries
|
|
216
|
-
uses: actions/cache@v4
|
|
217
|
-
with:
|
|
218
|
-
path: ~/.spindb/bin/clickhouse-*
|
|
219
|
-
key: clickhouse-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('engines/clickhouse/version-maps.ts') }}
|
|
220
|
-
if: runner.os != 'Windows'
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
## Windows Alternative
|
|
224
|
-
|
|
225
|
-
For Windows users who need ClickHouse:
|
|
226
|
-
|
|
227
|
-
1. **WSL (Recommended)**: Install SpinDB in WSL and run ClickHouse there
|
|
228
|
-
2. **Docker**: Use official ClickHouse Docker images
|
|
229
|
-
3. **ClickHouse Cloud**: Use managed cloud service
|
|
230
|
-
|
|
231
|
-
There is no workaround for native Windows support at this time.
|