文档/Drivers
此页面尚未翻译,当前显示英文版本。 查看英文版本
DBFlux Drivers
This document is a comparative overview of the database drivers shipped with
DBFlux. For per-driver details, follow the link to each driver crate’s
README.md. For the internal driver architecture (traits, registration, the
DbDriver/Connection seam), see the Driver System section of
Architecture. Contributors implementing a driver
should start with the Driver Authoring Guide.
How drivers are abstracted
Every driver exposes a DriverMetadata value (defined in
crates/dbflux_core/src/driver/capabilities.rs). The UI is driver-agnostic and
adapts purely from this metadata. The relevant fields are:
DatabaseCategory— selects the view model and terminology. Values:Relational,Document,KeyValue,Graph,TimeSeries,WideColumn,LogStream. (Not every value has a shipping driver.)QueryLanguage— drives editor mode, placeholder text, and query parsing. Values includeSql,MongoQuery,RedisCommands,Cypher,InfluxQuery,Flux,Cql,CloudWatchLogsInsightsQl,OpenSearchPpl,OpenSearchSql, the script languagesLua/Python/Bash, andCustom(String).DriverCapabilities— au64bitflag set declaring supported features (transactions, pagination, schemas, key-value operations, etc.). Convenience basesRELATIONAL_BASE,DOCUMENT_BASE, andKEYVALUE_BASEgroup the common flags for each category.
The capability flags listed below are exactly the ones each driver’s
DriverMetadata sets in code; nothing is inferred.
Comparison
| Driver | Category | Query language | Key capabilities | Notes / limitations |
|---|---|---|---|---|
| PostgreSQL | Relational | SQL | Relational base + schemas, SSH tunnel, SSL, auth, foreign keys, check/unique constraints, custom types, RETURNING, transactional DDL, routines, multi-statement | Full SQL driver; routine viewer is read-only; transactional DDL except CREATE INDEX CONCURRENTLY. |
| Amazon Redshift | Relational | SQL | Multiple databases, schemas, views, SSH tunnel, SSL/client certificates, auth, query cancellation, prepared statements, pagination, sorting, filtering, CSV/JSON export | Read-only over the PostgreSQL wire protocol; single-statement; exposes Redshift storage hints; no writes/DDL, IAM/SSO, or indexes. |
| MySQL | Relational | SQL | Relational base + SSH tunnel, SSL, auth, foreign keys, check/unique constraints, routines, multi-statement | DDL is non-transactional; multi-statement scripts split text-based and run sequentially; routine listing covers FUNCTION/PROCEDURE only. |
| MariaDB | Relational | SQL | Same crate and capabilities as MySQL | Registered as a separate mariadb metadata sharing the MySQL implementation. |
| SQLite | Relational | SQL | Views, indexes, foreign keys, check/unique constraints, prepared statements, insert/update/delete, pagination, sorting, filtering, CSV/JSON export, query cancellation, transactional DDL, multi-statement | Embedded file driver: no network, SSH tunnel, or TLS; no multi-schema namespace. |
| SQL Server | Relational | SQL | Relational base + schemas, SSH tunnel, SSL, auth, foreign keys, check/unique constraints, transactional DDL, routines, multi-statement | Built on tiberius; named-instance lookup unavailable through SSH tunnel; multi-result-set batches return the last set as primary. |
| MongoDB | Document | MongoQuery | Document base + aggregation, SSH tunnel, indexes | MongoDB shell-style syntax only (no SQL); no query cancellation; parser scoped to supported command patterns. |
| Redis | Key-Value | RedisCommands | Key-value base + multiple databases, TTL, key types, value size, rename, bulk get, stream range/add/delete, auth, SSH tunnel, SSL | Redis command syntax only (no SQL); no query cancellation; SSH tunneling unavailable in URI mode. |
| DynamoDB | Document | Custom(“DynamoDB”) | Auth, pagination, filtering, insert/update/delete, nested documents, arrays | AWS-managed; native command envelope (scan/query/put/update/delete); no PartiQL/transactions; no query cancellation; update many+upsert unsupported. |
| CloudWatch Logs | Log Stream | Sql (metadata default) | Auth | AWS-managed; executes Logs Insights QL, OpenSearch PPL, and OpenSearch SQL via editor-managed source context; no query cancellation yet. |
| InfluxDB | Time Series | InfluxQuery | Auth, multiple databases, pagination, CSV/JSON export | v1 and v2 in one crate; InfluxQL on both, Flux on v2 only; read-only (no INSERT/UPDATE/DELETE); no transactions. |
| ClickHouse | Relational | SQL | Multiple databases, views, auth, pagination, sorting, filtering, grouping, joins, CTEs, windows, CSV/JSON export | HTTP(S), including ClickHouse Cloud; read-oriented DBFlux integration with no structured mutations, DDL, transactions, SSH tunneling, or query parameters. |
| Amazon S3 | Object Storage | Custom(“S3”) | Auth (profile/SSO or static credentials, custom endpoint), bucket browsing, paginated object navigation, preview, full CRUD, presigned URLs | S3-compatible (Cloudflare R2, MinIO); no multipart upload/transfers panel, no embedded PDF viewer, no lifecycle/ACL management or S3 Select. |
Per-driver summary
PostgreSQL
Full SQL driver with schema discovery, stored routines (read-only viewer), SSL, SSH tunneling, query cancellation via cancel tokens, transactional DDL, and PostgreSQL-specific code generation. Multi-statement scripts run as a batch via the simple query protocol. See PostgreSQL.
Amazon Redshift
Read-only relational SQL driver using the PostgreSQL wire protocol. It supports schema, table, view, and column introspection; SSH tunneling; TLS and client certificates; query cancellation; and Redshift distribution/sort-key storage hints. It does not support writes or DDL, IAM/SSO authentication, multi-statement queries, or indexes. See Amazon Redshift.
MySQL / MariaDB
One crate implements both MySQL and MariaDB. Supports SQL execution, schema
discovery, query cancellation via KILL QUERY, code generation, and routine
discovery for functions and procedures. DDL is not transactional and
multi-statement splitting is text-based. See
MySQL / MariaDB.
SQLite
Embedded, file-based driver with schema discovery, query cancellation via interrupt handles, transactional DDL, and code generation. No network transport, SSH tunneling, or TLS, and no multi-schema namespace. See SQLite.
SQL Server
Built on the tiberius TDS client. Supports SQL Server / Azure SQL, TLS modes,
named instances (resolved via SQL Browser), SSH tunneling, per-tab database
switching, and multi-result-set batches. See
SQL Server.
MongoDB
Document driver with collection browsing, document CRUD, MongoDB shell-style query parsing, aggregation, and document-focused schema metadata. SQL is not supported and query cancellation is unavailable. See MongoDB.
Redis
Key-value driver covering strings, hashes, lists, sets, sorted sets, and streams, plus key scanning, TTL operations, rename, bulk get, and multiple logical databases. SQL is not supported and SSH tunneling is unavailable in URI mode. See Redis.
DynamoDB
AWS NoSQL driver built on aws-sdk-dynamodb with region/profile/endpoint
configuration. Table discovery maps PK/SK and GSI/LSI metadata; execution uses a
native command envelope (scan, query, put, update, delete). PartiQL and
DynamoDB transactions are not exposed. See
DynamoDB.
CloudWatch Logs
AWS CloudWatch Logs driver executing queries through StartQuery with
editor-managed time range and log-group source context. Query documents can run
Logs Insights QL, OpenSearch PPL, and OpenSearch SQL; schema discovery enumerates
log groups and exposes log streams as event-stream children. Its
DriverMetadata.query_language is set to Sql as the default editor mode while
the actual mode is chosen per query document. See
CloudWatch.
InfluxDB
Time-series driver supporting both InfluxDB v1 and v2 in one crate. InfluxQL runs on both versions; Flux runs on v2 only. The query API is read-only (no INSERT/UPDATE/DELETE, no transactions), with optional default bucket/database and per-query bucket routing. See InfluxDB.
ClickHouse
Relational SQL driver for self-hosted ClickHouse and ClickHouse Cloud over HTTP(S). It discovers databases, tables, views, columns, and engine metadata, and supports read-oriented SQL workflows with pagination and visual SELECT generation. Structured mutations, DDL, transactions, SSH tunneling, and generic query parameters are not supported in this initial scope. See ClickHouse.
Amazon S3
Object-storage driver for AWS S3 and S3-compatible endpoints (Cloudflare R2, MinIO), authenticating via AWS profile/SSO or static credentials with endpoint override and path-style addressing. The connection root opens a buckets table; bucket browsing paginates per level (AWS-console style) with an optional non-paginated tree mode. Object preview covers images natively, text-like objects in an inline editable buffer with save-back, and metadata plus download/open-externally for PDF and other binary objects; archived storage classes (GLACIER, DEEP_ARCHIVE) skip body preview entirely. Supports upload, delete, type-to-confirm recursive prefix/bucket delete, folder/bucket creation, rename (copy-then-delete), and presigned URLs. It does not support multipart upload, a transfers panel, an embedded PDF viewer, lifecycle/ACL management, or S3 Select. See S3.
External RPC drivers
DBFlux can load drivers that run out-of-process and communicate over local IPC,
implemented through dbflux_driver_ipc and hosted via dbflux_driver_host.
These drivers register with the synthetic ID format rpc:<socket_id> and supply
their own DriverMetadata (category, query language, capabilities) over the
wire, so the UI treats them exactly like built-in drivers. For the discovery
handshake, service lifecycle, and protocol details, see
Driver RPC protocol.