From e97c9ab5d7b90577c02c4db0523d1565d8cb62db Mon Sep 17 00:00:00 2001 From: zipg Date: Mon, 17 Aug 2026 03:27:44 +0800 Subject: [PATCH] feat(dynamodb): support querying, editing, and exporting --- .github/workflows/ci.yml | 8 +- .github/workflows/release.yml | 2 +- Cargo.lock | 545 ++++- Makefile | 2 +- .../public/icons/database/dynamodb.svg | 1 + .../connection/ConnectionDialog.vue | 58 +- .../components/document/DocumentBrowser.vue | 344 ++- .../DocumentBrowserFieldSearch.spec.ts | 364 ++- .../src/components/icons/DatabaseIcon.vue | 1 + .../src/components/sidebar/ConnectionTree.vue | 6 +- .../sidebar/SidebarTreeRuntimeHost.vue | 23 +- .../src/components/sidebar/TreeItem.vue | 4 +- .../desktop/src/components/ui/ErrorBanner.vue | 8 +- .../ui/__tests__/ErrorBannerClipboard.spec.ts | 79 + apps/desktop/src/i18n/locales/en.ts | 24 + apps/desktop/src/i18n/locales/es.ts | 24 + apps/desktop/src/i18n/locales/it.ts | 24 + apps/desktop/src/i18n/locales/ja.ts | 24 + apps/desktop/src/i18n/locales/ko.ts | 24 + apps/desktop/src/i18n/locales/pt-BR.ts | 24 + apps/desktop/src/i18n/locales/zh-CN.ts | 24 + apps/desktop/src/i18n/locales/zh-TW.ts | 24 + .../documentStoreProvider.dynamodb.spec.ts | 84 + .../dynamodbConnectionPresentation.spec.ts | 49 + .../database/databaseDriverManifest.spec.ts | 2 + .../sidebar/sidebarTreeItemLayout.spec.ts | 1 + .../__tests__/sidebar/treeNodeClick.spec.ts | 5 + .../__tests__/sql/sqlRisk.dynamodb.spec.ts | 19 + .../desktop/src/lib/app/documentJsonValues.ts | 7 + .../src/lib/app/documentStoreProvider.ts | 23 +- apps/desktop/src/lib/app/documentStoreSave.ts | 19 +- apps/desktop/src/lib/backend/api.ts | 5 + apps/desktop/src/lib/backend/http.ts | 17 +- apps/desktop/src/lib/backend/tauri.ts | 41 +- .../lib/connection/connectionPresentation.ts | 4 + .../src/lib/connection/connectionUrl.ts | 10 +- .../connection/connectionVisibleDatabases.ts | 2 +- .../lib/database/databaseNamespaceCreation.ts | 1 + .../lib/database/databasePropertyEditing.ts | 1 + .../src/lib/sidebar/sidebarTreeItemLayout.ts | 6 +- apps/desktop/src/lib/sidebar/treeNodeClick.ts | 3 +- apps/desktop/src/lib/sql/sqlRisk.ts | 21 +- apps/desktop/src/stores/connectionStore.ts | 45 +- apps/desktop/src/types/database.ts | 2 + crates/dbx-core/Cargo.toml | 4 +- .../assets/database-drivers.manifest.json | 29 + crates/dbx-core/src/connection.rs | 29 + crates/dbx-core/src/database_capabilities.rs | 1 + crates/dbx-core/src/db/document_result.rs | 5 + crates/dbx-core/src/db/dynamodb_driver.rs | 2129 +++++++++++++++++ .../src/db/dynamodb_driver_disabled.rs | 103 + .../dbx-core/src/db/elasticsearch_driver.rs | 1 + crates/dbx-core/src/db/meilisearch_driver.rs | 1 + crates/dbx-core/src/db/mod.rs | 6 + crates/dbx-core/src/db/mongo_driver.rs | 8 + crates/dbx-core/src/db/vector_driver.rs | 2 + crates/dbx-core/src/document_ops.rs | 84 +- crates/dbx-core/src/lib.rs | 2 + crates/dbx-core/src/models/connection.rs | 10 + crates/dbx-core/src/mongo_ops.rs | 5 + crates/dbx-core/src/query.rs | 60 + crates/dbx-core/src/query_execution_sql.rs | 33 + .../dbx-core/src/sql_dialect/ddl_profile.rs | 7 +- crates/dbx-web/Cargo.toml | 3 +- crates/dbx-web/src/main.rs | 2 + crates/dbx-web/src/routes/document_store.rs | 46 + crates/dbx-web/src/routes/mongo.rs | 1 + packages/app-tests/documentBrowser.test.ts | 2 +- src-tauri/Cargo.toml | 3 +- src-tauri/src/commands/connection.rs | 11 + src-tauri/src/commands/document_cmd.rs | 33 + src-tauri/src/commands/mongo_cmd.rs | 1 + src-tauri/src/lib.rs | 2 + 73 files changed, 4493 insertions(+), 134 deletions(-) create mode 100644 apps/desktop/public/icons/database/dynamodb.svg create mode 100644 apps/desktop/src/components/ui/__tests__/ErrorBannerClipboard.spec.ts create mode 100644 apps/desktop/src/lib/__tests__/app/documentStoreProvider.dynamodb.spec.ts create mode 100644 apps/desktop/src/lib/__tests__/connection/dynamodbConnectionPresentation.spec.ts create mode 100644 apps/desktop/src/lib/__tests__/sql/sqlRisk.dynamodb.spec.ts create mode 100644 crates/dbx-core/src/db/dynamodb_driver.rs create mode 100644 crates/dbx-core/src/db/dynamodb_driver_disabled.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf7a36797c..1552ad196e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -337,8 +337,8 @@ jobs: RUSTC_WRAPPER: sccache # The fast lane skips only system font discovery while retaining the other default capabilities. RUST_FEATURE_MODE: ${{ github.event_name == 'pull_request' && needs.changes.outputs.rust_full != 'true' && 'fast' || 'full' }} - RUST_FAST_FEATURES: dbx/duckdb-sidecar,dbx/mq-admin,dbx/sqlite-sqlcipher,dbx-core/duckdb-sidecar,dbx-core/mq-admin,dbx-core/sqlite-sqlcipher,dbx-web/duckdb-sidecar,dbx-web/mq-admin,dbx-web/sqlite-sqlcipher - RUST_FULL_FEATURES: dbx/duckdb-sidecar,dbx/mq-admin,dbx/sqlite-sqlcipher,dbx/system-fonts,dbx-core/duckdb-sidecar,dbx-core/mq-admin,dbx-core/sqlite-sqlcipher,dbx-core/system-fonts,dbx-web/duckdb-sidecar,dbx-web/mq-admin,dbx-web/sqlite-sqlcipher,dbx-web/system-fonts + RUST_FAST_FEATURES: dbx/duckdb-sidecar,dbx/dynamodb,dbx/mq-admin,dbx/sqlite-sqlcipher,dbx-core/duckdb-sidecar,dbx-core/dynamodb,dbx-core/mq-admin,dbx-core/sqlite-sqlcipher,dbx-web/duckdb-sidecar,dbx-web/dynamodb,dbx-web/mq-admin,dbx-web/sqlite-sqlcipher + RUST_FULL_FEATURES: dbx/duckdb-sidecar,dbx/dynamodb,dbx/mq-admin,dbx/sqlite-sqlcipher,dbx/system-fonts,dbx-core/duckdb-sidecar,dbx-core/dynamodb,dbx-core/mq-admin,dbx-core/sqlite-sqlcipher,dbx-core/system-fonts,dbx-web/duckdb-sidecar,dbx-web/dynamodb,dbx-web/mq-admin,dbx-web/sqlite-sqlcipher,dbx-web/system-fonts # Fork PRs cannot read repository secrets, so retain the GHA backend for them. SCCACHE_GHA_ENABLED: ${{ secrets.SCCACHE_S3_BUCKET == '' && 'true' || 'false' }} steps: @@ -416,8 +416,8 @@ jobs: RUSTC_WRAPPER: sccache # The fast lane skips only system font discovery while retaining the other default capabilities. RUST_FEATURE_MODE: ${{ github.event_name == 'pull_request' && needs.changes.outputs.rust_full != 'true' && 'fast' || 'full' }} - RUST_FAST_FEATURES: dbx/duckdb-sidecar,dbx/mq-admin,dbx/sqlite-sqlcipher,dbx-core/duckdb-sidecar,dbx-core/mq-admin,dbx-core/sqlite-sqlcipher,dbx-web/duckdb-sidecar,dbx-web/mq-admin,dbx-web/sqlite-sqlcipher - RUST_FULL_FEATURES: dbx/duckdb-sidecar,dbx/mq-admin,dbx/sqlite-sqlcipher,dbx/system-fonts,dbx-core/duckdb-sidecar,dbx-core/mq-admin,dbx-core/sqlite-sqlcipher,dbx-core/system-fonts,dbx-web/duckdb-sidecar,dbx-web/mq-admin,dbx-web/sqlite-sqlcipher,dbx-web/system-fonts + RUST_FAST_FEATURES: dbx/duckdb-sidecar,dbx/dynamodb,dbx/mq-admin,dbx/sqlite-sqlcipher,dbx-core/duckdb-sidecar,dbx-core/dynamodb,dbx-core/mq-admin,dbx-core/sqlite-sqlcipher,dbx-web/duckdb-sidecar,dbx-web/dynamodb,dbx-web/mq-admin,dbx-web/sqlite-sqlcipher + RUST_FULL_FEATURES: dbx/duckdb-sidecar,dbx/dynamodb,dbx/mq-admin,dbx/sqlite-sqlcipher,dbx/system-fonts,dbx-core/duckdb-sidecar,dbx-core/dynamodb,dbx-core/mq-admin,dbx-core/sqlite-sqlcipher,dbx-core/system-fonts,dbx-web/duckdb-sidecar,dbx-web/dynamodb,dbx-web/mq-admin,dbx-web/sqlite-sqlcipher,dbx-web/system-fonts # Fork PRs cannot read repository secrets, so retain the GHA backend for them. SCCACHE_GHA_ENABLED: ${{ secrets.SCCACHE_S3_BUCKET == '' && 'true' || 'false' }} steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97773e13fe..364e52b3f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -535,7 +535,7 @@ jobs: RUSTFLAGS: ${{ matrix.rustflags }} run: | cargo zigbuild --release -p dbx-web --target ${{ matrix.target }} \ - --no-default-features --features "duckdb-sidecar,mq-admin" + --no-default-features --features "duckdb-sidecar,dynamodb,mq-admin" - name: Package static browser runtime env: diff --git a/Cargo.lock b/Cargo.lock index 4a1f38c898..7150c38664 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -481,6 +481,18 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" +[[package]] +name = "aws-credential-types" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e93964ffdaf57857f544be3666a5f57570bb699e934700f11b49708f61bb556e" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "zeroize", +] + [[package]] name = "aws-lc-rs" version = "1.17.3" @@ -505,6 +517,307 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "aws-runtime" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9007227e10b5fed2f3e0a2beff489211e2b5604c400b7a9d5d81ca9d64c24bb" +dependencies = [ + "aws-credential-types", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-http 0.64.0", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "bytes-utils", + "fastrand", + "http 1.5.0", + "http-body 1.1.0", + "percent-encoding", + "pin-project-lite", + "tracing", + "uuid", +] + +[[package]] +name = "aws-sdk-dynamodb" +version = "1.104.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04c47115cc8d46dcc94a9a81e7a3384cea859283c1a737729691d4221f11584" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http 0.63.6", + "aws-smithy-json", + "aws-smithy-observability 0.2.6", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.5.0", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sigv4" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "723c2234ad7511ceef63eab016b7ba6ff7c55590fefb96fa8467af014a07309f" +dependencies = [ + "aws-credential-types", + "aws-smithy-http 0.64.0", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "form_urlencoded", + "hex", + "hmac 0.13.0", + "http 0.2.12", + "http 1.5.0", + "percent-encoding", + "sha2 0.11.0", + "time", + "tracing", +] + +[[package]] +name = "aws-smithy-async" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f02e407fb3b54891734224b9ffac8a71fdd35f542500fa1af95754a6b2beb316" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "aws-smithy-http" +version = "0.63.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1ab2dc1c2c3749ead27180d333c42f11be8b0e934058fb4b2258ee8dbe5231" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "futures-util", + "http 1.5.0", + "http-body 1.1.0", + "http-body-util", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] + +[[package]] +name = "aws-smithy-http" +version = "0.64.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37843d9add67c3aff5856f409c6dc315d3cdff60f9c0cb5b670dab1e9920306d" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "futures-util", + "http 1.5.0", + "http-body 1.1.0", + "http-body-util", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] + +[[package]] +name = "aws-smithy-http-client" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c1c8a04cb31ba74d0115af5a890bb8c0d48fba64b52812fa13929a6ef0cc83c" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "h2 0.3.27", + "h2 0.4.15", + "http 0.2.12", + "http 1.5.0", + "http-body 0.4.6", + "hyper 0.14.32", + "hyper 1.11.0", + "hyper-rustls 0.24.2", + "hyper-rustls 0.27.9", + "hyper-util", + "pin-project-lite", + "rustls 0.21.12", + "rustls 0.23.43", + "rustls-native-certs 0.8.4", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.4", + "tower", + "tracing", +] + +[[package]] +name = "aws-smithy-json" +version = "0.62.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "701a947f4797e52a911e114a898667c746c39feea467bbd1abd7b3721f702ffa" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-schema 0.1.0", + "aws-smithy-types", +] + +[[package]] +name = "aws-smithy-observability" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06c2315d173edbf1920da8ba3a7189695827002e4c0fc961973ab1c54abca9c" +dependencies = [ + "aws-smithy-runtime-api", +] + +[[package]] +name = "aws-smithy-observability" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e86338c869539a581bf161247762a6e87f92c5c075060057b5ed6d06632ed0c" +dependencies = [ + "aws-smithy-runtime-api", +] + +[[package]] +name = "aws-smithy-runtime" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "483b858ff67522011c4786310c5cd8fd88d0be7ea3d5f1a48328446300c4269e" +dependencies = [ + "aws-smithy-async", + "aws-smithy-http 0.64.0", + "aws-smithy-http-client", + "aws-smithy-observability 0.3.0", + "aws-smithy-runtime-api", + "aws-smithy-schema 0.2.0", + "aws-smithy-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.5.0", + "http-body 0.4.6", + "http-body 1.1.0", + "http-body-util", + "pin-project-lite", + "pin-utils", + "tokio", + "tracing", +] + +[[package]] +name = "aws-smithy-runtime-api" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b98f2e1fd67ec06618f9c291e5e495a468e60519e44c9c1979cd0521f3affdb" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api-macros", + "aws-smithy-types", + "bytes", + "http 0.2.12", + "http 1.5.0", + "pin-project-lite", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-runtime-api-macros" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "221eaa237ddf1ca79b60d1372aad77e47f9c0ea5b3ce5099da8c61d027dc77b3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "aws-smithy-schema" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7442cb268338f0eb8278140a107c046756aa01093d8ef5e99628d34ae09c94f5" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "http 1.5.0", +] + +[[package]] +name = "aws-smithy-schema" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d56e0a4e53127a632224e43633b0fe045fa9e1e3cfc68b9830f1115e103f910" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "http 1.5.0", +] + +[[package]] +name = "aws-smithy-types" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fce83ce9abbb198d25bc7131e468d0f9fe1257125e58c39f3f9fc9f5098c9647" +dependencies = [ + "base64-simd", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http 1.5.0", + "http-body 0.4.6", + "http-body 1.1.0", + "http-body-util", + "itoa", + "num-integer", + "pin-project-lite", + "pin-utils", + "ryu", + "serde", + "time", + "tokio", + "tokio-util", +] + +[[package]] +name = "aws-types" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eec1cd5469f328c782dc3e33d4153cf118a54e33cbb3356d60d16f89883e1f94" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-schema 0.2.0", + "aws-smithy-types", + "rustc_version", + "tracing", +] + [[package]] name = "axum" version = "0.8.9" @@ -516,10 +829,10 @@ dependencies = [ "bytes", "form_urlencoded", "futures-util", - "http", - "http-body", + "http 1.5.0", + "http-body 1.1.0", "http-body-util", - "hyper", + "hyper 1.11.0", "hyper-util", "itoa", "matchit", @@ -550,8 +863,8 @@ checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ "bytes", "futures-core", - "http", - "http-body", + "http 1.5.0", + "http-body 1.1.0", "http-body-util", "mime", "pin-project-lite", @@ -585,6 +898,16 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b25655df2c3cdd83c5e5b293b88acd880332b2ddadd7c30ac43144fdc0033da9" +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + [[package]] name = "base64ct" version = "1.8.3" @@ -872,6 +1195,16 @@ dependencies = [ "serde", ] +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +dependencies = [ + "bytes", + "either", +] + [[package]] name = "bzip2" version = "0.6.1" @@ -1725,6 +2058,7 @@ dependencies = [ "arc-swap", "argon2", "async-trait", + "aws-sdk-dynamodb", "base64 0.22.1", "bytes", "calamine", @@ -3106,6 +3440,25 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.14.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "h2" version = "0.4.15" @@ -3117,7 +3470,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http", + "http 1.5.0", "indexmap 2.14.0", "slab", "tokio", @@ -3331,6 +3684,17 @@ dependencies = [ "markup5ever", ] +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http" version = "1.5.0" @@ -3341,6 +3705,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + [[package]] name = "http-body" version = "1.1.0" @@ -3348,7 +3723,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", - "http", + "http 1.5.0", ] [[package]] @@ -3359,8 +3734,8 @@ checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" dependencies = [ "bytes", "futures-core", - "http", - "http-body", + "http 1.5.0", + "http-body 1.1.0", "pin-project-lite", ] @@ -3394,6 +3769,30 @@ dependencies = [ "zeroize", ] +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.27", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.10", + "tokio", + "tower-service", + "tracing", + "want", +] + [[package]] name = "hyper" version = "1.11.0" @@ -3404,9 +3803,9 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2", - "http", - "http-body", + "h2 0.4.15", + "http 1.5.0", + "http-body 1.1.0", "httparse", "httpdate", "itoa", @@ -3416,16 +3815,32 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.32", + "log", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] + [[package]] name = "hyper-rustls" version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ - "http", - "hyper", + "http 1.5.0", + "hyper 1.11.0", "hyper-util", "rustls 0.23.43", + "rustls-native-certs 0.8.4", "tokio", "tokio-rustls 0.26.4", "tower-service", @@ -3440,7 +3855,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper", + "hyper 1.11.0", "hyper-util", "native-tls", "tokio", @@ -3458,14 +3873,14 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http", - "http-body", - "hyper", + "http 1.5.0", + "http-body 1.1.0", + "hyper 1.11.0", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.5", "system-configuration", "tokio", "tower-service", @@ -3773,7 +4188,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d40460c0ce33d6ce4b0630ad68ff63d6661961c48b6dba35e5a4d81cfb48222" dependencies = [ - "socket2", + "socket2 0.6.5", "widestring", "windows-registry 0.6.1", "windows-result 0.4.1", @@ -4502,7 +4917,7 @@ dependencies = [ "serde_with", "sha1 0.11.0", "sha2 0.11.0", - "socket2", + "socket2 0.6.5", "stringprep", "strsim", "take_mut", @@ -4567,7 +4982,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http", + "http 1.5.0", "httparse", "memchr", "mime", @@ -4611,7 +5026,7 @@ dependencies = [ "rand 0.10.2", "rustls 0.23.43", "serde", - "socket2", + "socket2 0.6.5", "thiserror 2.0.19", "tokio", "tokio-rustls 0.26.4", @@ -5234,6 +5649,12 @@ dependencies = [ "thiserror 2.0.19", ] +[[package]] +name = "outref" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" + [[package]] name = "p256" version = "0.14.0-rc.7" @@ -5559,6 +5980,12 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "piper" version = "0.2.5" @@ -5985,7 +6412,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls 0.23.43", - "socket2", + "socket2 0.6.5", "thiserror 2.0.19", "tokio", "tracing", @@ -6023,7 +6450,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.6.5", "tracing", "windows-sys 0.61.2", ] @@ -6208,7 +6635,7 @@ dependencies = [ "rustls-native-certs 0.8.4", "ryu", "sha1_smol", - "socket2", + "socket2 0.6.5", "tokio", "tokio-rustls 0.26.4", "tokio-util", @@ -6278,6 +6705,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-lite" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" + [[package]] name = "regex-syntax" version = "0.8.11" @@ -6304,12 +6737,12 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.4.15", + "http 1.5.0", + "http-body 1.1.0", "http-body-util", - "hyper", - "hyper-rustls", + "hyper 1.11.0", + "hyper-rustls 0.27.9", "hyper-tls", "hyper-util", "js-sys", @@ -6350,11 +6783,11 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http", - "http-body", + "http 1.5.0", + "http-body 1.1.0", "http-body-util", - "hyper", - "hyper-rustls", + "hyper 1.11.0", + "hyper-rustls 0.27.9", "hyper-util", "js-sys", "log", @@ -6525,7 +6958,7 @@ dependencies = [ "bytes", "flume", "futures-util", - "http", + "http 1.5.0", "log", "rustls-native-certs 0.7.3", "rustls-pemfile 2.2.0", @@ -7558,6 +7991,16 @@ version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "socket2" version = "0.6.5" @@ -7995,7 +8438,7 @@ dependencies = [ "glob", "gtk", "heck 0.5.0", - "http", + "http 1.5.0", "jni 0.21.1", "libc", "log", @@ -8264,7 +8707,7 @@ dependencies = [ "dirs", "flate2", "futures-util", - "http", + "http 1.5.0", "infer", "log", "minisign-verify", @@ -8311,7 +8754,7 @@ dependencies = [ "cookie", "dpi", "gtk", - "http", + "http 1.5.0", "jni 0.21.1", "objc2", "objc2-ui-kit", @@ -8334,7 +8777,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e6fac707727b7a2f48e4ded90976324267371073edbb415ffb73bb0458d203f" dependencies = [ "gtk", - "http", + "http 1.5.0", "jni 0.21.1", "log", "objc2", @@ -8366,7 +8809,7 @@ dependencies = [ "dom_query", "dunce", "glob", - "http", + "http 1.5.0", "infer", "json-patch", "log", @@ -8625,7 +9068,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.6.5", "tokio-macros", "windows-sys 0.61.2", ] @@ -8670,7 +9113,7 @@ dependencies = [ "postgres-protocol", "postgres-types", "rand 0.10.2", - "socket2", + "socket2 0.6.5", "tokio", "tokio-util", "whoami", @@ -8908,8 +9351,8 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http", - "http-body", + "http 1.5.0", + "http-body 1.1.0", "http-body-util", "http-range-header", "httpdate", @@ -9048,7 +9491,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 1.5.0", "httparse", "log", "rand 0.8.7", @@ -9068,7 +9511,7 @@ checksum = "6c01152af293afb9c7c2a57e4b559c5620b421f6d133261c60dd2d0cdb38e6b8" dependencies = [ "bytes", "data-encoding", - "http", + "http 1.5.0", "httparse", "log", "rand 0.9.5", @@ -9358,6 +9801,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "vswhom" version = "0.1.0" @@ -10393,7 +10842,7 @@ dependencies = [ "dunce", "gdkx11", "gtk", - "http", + "http 1.5.0", "javascriptcore-rs", "jni 0.21.1", "libc", diff --git a/Makefile b/Makefile index 385e66368f..a09f3627ad 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,7 @@ dev: node_modules/.modules.yaml check-tauri-dev-port $(PNPM) dev:tauri dev-fast: node_modules/.modules.yaml check-tauri-dev-port - $(PNPM) tauri dev -- --no-default-features --features duckdb-sidecar + $(PNPM) tauri dev -- --no-default-features --features duckdb-sidecar,dynamodb dev-web: node_modules/.modules.yaml $(PNPM) dev:web diff --git a/apps/desktop/public/icons/database/dynamodb.svg b/apps/desktop/public/icons/database/dynamodb.svg new file mode 100644 index 0000000000..018badbf01 --- /dev/null +++ b/apps/desktop/public/icons/database/dynamodb.svg @@ -0,0 +1 @@ + diff --git a/apps/desktop/src/components/connection/ConnectionDialog.vue b/apps/desktop/src/components/connection/ConnectionDialog.vue index 086ee290e8..dad83185ed 100644 --- a/apps/desktop/src/components/connection/ConnectionDialog.vue +++ b/apps/desktop/src/components/connection/ConnectionDialog.vue @@ -1075,6 +1075,14 @@ const driverProfiles: Record< access: { type: "access", port: 0, user: "", label: "Microsoft Access", icon: "access" }, mongodb: { type: "mongodb", port: 27017, user: "", label: "MongoDB", icon: "mongodb" }, "mongodb-legacy": { type: "mongodb", port: 27017, user: "", label: "MongoDB (Legacy)", icon: "mongodb" }, + dynamodb: { + type: "dynamodb", + port: 443, + user: "", + label: "Amazon DynamoDB", + icon: "dynamodb", + host: "dynamodb.us-east-1.amazonaws.com", + }, clickhouse: { type: "clickhouse", port: 8123, @@ -2363,6 +2371,11 @@ function applyProfile(val: string, preserveConnectionFields = false) { if (profile.type === "sqlite") { form.value.database = undefined; } + if (profile.type === "dynamodb") { + form.value.database = "us-east-1"; + form.value.connection_string = undefined; + form.value.ssl = true; + } if (profile.type === "h2") { h2ConnectionMode.value = "file"; form.value.host = ""; @@ -2781,6 +2794,7 @@ const iconTypeMap: Record = { access: "access", redis: "redis", mongodb: "mongodb", + dynamodb: "dynamodb", duckdb: "duckdb", clickhouse: "clickhouse", sqlserver: "sqlserver", @@ -2871,6 +2885,7 @@ const dbOptions: DbOption[] = [ { value: "opentenbase", label: "OpenTenBase" }, { value: "mysql", label: "MySQL" }, { value: "mongodb", label: "MongoDB" }, + { value: "dynamodb", label: "Amazon DynamoDB" }, { value: "redis", label: "Redis" }, { value: "oracle", label: "Oracle" }, { value: "sqlite", label: "SQLite" }, @@ -2987,7 +3002,7 @@ const dbCategoryDefinitions: Array<{ { key: "document", titleKey: "connection.databaseCategoryDocument", - optionValues: ["mongodb", "redis", "elasticsearch", "easysearch", "meilisearch", "hbase", "manticoresearch", "cassandra"], + optionValues: ["mongodb", "dynamodb", "redis", "elasticsearch", "easysearch", "meilisearch", "hbase", "manticoresearch", "cassandra"], }, { key: "graph_ai", @@ -3799,6 +3814,15 @@ function connectionConfigForSubmit(id: string, generatedName = ""): ConnectionCo throw new Error(t("connection.kingbaseDatabaseRequired")); } } + if (config.db_type === "dynamodb") { + config.database = config.database?.trim() || "us-east-1"; + config.username = config.username.trim(); + config.password = config.password.trim(); + config.connection_string = config.connection_string?.trim() || undefined; + if (!config.username || !config.password) { + throw new Error(t("connection.dynamodbCredentialsRequired")); + } + } if (config.db_type === "gaussdb") { const serialized = serializeGaussdbHosts(gaussdbHostEntries.value); config.host = serialized.host; @@ -6659,6 +6683,38 @@ function openExternalUrl(url: string) { + + +