Skip to content

Commit 8a15584

Browse files
LocNguyenHuuclaudedatlechin
authored
feat: add Cassandra and ScyllaDB database support (#300)
* feat: add Cassandra and ScyllaDB database support Add Cassandra as the 11th database engine in TablePro, with ScyllaDB as a secondary type sharing the same plugin (like MySQL/MariaDB). Uses the DataStax C/C++ driver via a C bridge module. - CassandraDriverPlugin with full CQL support (keyspaces, tables, views, indexes, schema introspection via system_schema) - DatabaseType enum: .cassandra and .scylladb cases across all switch sites - Connection URL schemes: cassandra://, cql://, scylladb://, scylla:// - Theme colors, icon assets, default port 9042 - CQL dialect with keywords, functions, and data types for autocomplete - CI workflow support for building downloadable plugin (build-plugin.yml) - Build script for DataStax cpp-driver + libuv static libraries - Documentation (English + Vietnamese) - Tests for DatabaseType properties and URL parsing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address PR review feedback for Cassandra plugin * fix: remove orphaned case statement and add default branch for open DatabaseType * fix: address code review issues in Cassandra plugin driver * fix: improve Cassandra plugin SSL, type extraction, column ordering, and UX * fix: register ScyllaDB as additional database type ID in Cassandra plugin * fix: resolve deadlock, dead code, system keyspace filter, and EXPLAIN handling * chore: remove pre-built Cassandra libs from PR * chore: remove pre-built cassandra.h header from PR * docs: add Chinese translation for Cassandra/ScyllaDB documentation * chore: remove extra blank line in build-release.sh * refactor: move Cassandra dialect and metadata from core app into plugin * refactor: remove redundant explicit no-op case in DatabaseDriver switch --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Ngo Quoc Dat <datlechin@gmail.com>
1 parent 37a9a8e commit 8a15584

File tree

32 files changed

+2966
-73
lines changed

32 files changed

+2966
-73
lines changed

.github/workflows/build-plugin.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,27 @@ jobs:
5757
TARGET="OracleDriver"; BUNDLE_ID="com.TablePro.OracleDriver"
5858
DISPLAY_NAME="Oracle Driver"; SUMMARY="Oracle Database 12c+ driver via OracleNIO"
5959
DB_TYPE_IDS='["Oracle"]'; ICON="server.rack"; BUNDLE_NAME="OracleDriver"
60-
HOMEPAGE="https://tablepro.app/databases/oracle" ;;
60+
HOMEPAGE="https://docs.tablepro.app/databases/oracle" ;;
6161
clickhouse)
6262
TARGET="ClickHouseDriver"; BUNDLE_ID="com.TablePro.ClickHouseDriver"
6363
DISPLAY_NAME="ClickHouse Driver"; SUMMARY="ClickHouse OLAP database driver via HTTP interface"
6464
DB_TYPE_IDS='["ClickHouse"]'; ICON="chart.bar.xaxis"; BUNDLE_NAME="ClickHouseDriver"
65-
HOMEPAGE="https://tablepro.app/databases/clickhouse" ;;
65+
HOMEPAGE="https://docs.tablepro.app/databases/clickhouse" ;;
6666
sqlite)
6767
TARGET="SQLiteDriver"; BUNDLE_ID="com.TablePro.SQLiteDriver"
6868
DISPLAY_NAME="SQLite Driver"; SUMMARY="SQLite embedded database driver"
6969
DB_TYPE_IDS='["SQLite"]'; ICON="internaldrive"; BUNDLE_NAME="SQLiteDriver"
70-
HOMEPAGE="https://tablepro.app" ;;
70+
HOMEPAGE="https://docs.tablepro.app/databases/sqlite" ;;
7171
duckdb)
7272
TARGET="DuckDBDriver"; BUNDLE_ID="com.TablePro.DuckDBDriver"
7373
DISPLAY_NAME="DuckDB Driver"; SUMMARY="DuckDB analytical database driver"
7474
DB_TYPE_IDS='["DuckDB"]'; ICON="bird"; BUNDLE_NAME="DuckDBDriver"
75-
HOMEPAGE="https://tablepro.app" ;;
75+
HOMEPAGE="https://docs.tablepro.app/databases/duckdb" ;;
76+
cassandra)
77+
TARGET="CassandraDriver"; BUNDLE_ID="com.TablePro.CassandraDriver"
78+
DISPLAY_NAME="Cassandra Driver"; SUMMARY="Apache Cassandra and ScyllaDB driver via DataStax C driver"
79+
DB_TYPE_IDS='["Cassandra", "ScyllaDB"]'; ICON="cassandra-icon"; BUNDLE_NAME="CassandraDriver"
80+
HOMEPAGE="https://docs.tablepro.app/databases/cassandra" ;;
7681
*) echo "Unknown plugin: $plugin_name"; return 1 ;;
7782
esac
7883
}
@@ -91,6 +96,11 @@ jobs:
9196
9297
echo "Building $TARGET v$VERSION"
9398
99+
# Build Cassandra dependencies if needed
100+
if [ "$PLUGIN_NAME" = "cassandra" ]; then
101+
./scripts/build-cassandra.sh both
102+
fi
103+
94104
# Build both architectures
95105
./scripts/build-plugin.sh "$TARGET" arm64
96106
./scripts/build-plugin.sh "$TARGET" x86_64

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5050
- Pre-connect script: run a shell command before each connection (e.g., to refresh credentials or update ~/.pgpass)
5151
- `ParameterStyle` enum in TableProPluginKit: plugins declare `?` or `$1` placeholder style via `parameterStyle` property on `PluginDatabaseDriver`
5252
- DML statement generation in ClickHouse, MSSQL, and Oracle plugins via `generateStatements()` for database-specific UPDATE/DELETE syntax
53+
- Cassandra and ScyllaDB database support via DataStax C driver (downloadable plugin)
5354
- `quoteIdentifier` method on `PluginDatabaseDriver` and `DatabaseDriver` protocols: plugins provide database-specific identifier quoting (backticks for MySQL/SQLite/ClickHouse, brackets for MSSQL, double-quotes for PostgreSQL/Oracle/DuckDB, passthrough for MongoDB/Redis)
5455

5556
### Changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// CCassandra.h
3+
// TablePro
4+
//
5+
// C bridging header for the DataStax Cassandra C driver.
6+
// Headers are bundled in the include/ subdirectory.
7+
//
8+
9+
#ifndef CCassandra_h
10+
#define CCassandra_h
11+
12+
#include "include/cassandra.h"
13+
14+
#endif /* CCassandra_h */
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module CCassandra [system] {
2+
header "CCassandra.h"
3+
export *
4+
}

0 commit comments

Comments
 (0)