DatabaseType Enum
TheDatabaseType enum defines all supported database systems in ChartDB.
Supported Databases
Generic SQL database with standard SQL types
PostgreSQL database with support for:
- JSONB, arrays, custom types
- Enums and composite types
- Advanced indexing (GIN, GIST, etc.)
- Check constraints
- Comments on tables/columns
MySQL database with support for:
- Auto-increment columns
- Multiple storage engines
- Character sets and collations
- Inline comments
Microsoft SQL Server with support for:
- Identity columns
- Unique identifiers (GUID)
- NVARCHAR and Unicode types
- Extended properties for comments
MariaDB database (MySQL fork) with similar features to MySQL
SQLite embedded database with support for:
- Simple type system
- Autoincrement
- Limited ALTER TABLE support
ClickHouse columnar database
CockroachDB (PostgreSQL-compatible) with similar features to PostgreSQL
Oracle Database with support for:
- VARCHAR2, NUMBER types
- Sequences
- PL/SQL
DatabaseEdition Enum
Specific editions or variants of database types for platform-specific features.Database Edition Mapping
Supabase-hosted PostgreSQL with specific extensions and configurations
TimescaleDB extension for PostgreSQL (time-series data)
MySQL version 5.7 with specific syntax compatibility
SQL Server 2016 and earlier versions with syntax limitations
Cloudflare D1 SQLite database with specific constraints
Usage Examples
Creating a Diagram with Database Type
Type-Specific Features
Database Capabilities
Different databases support different features:| Feature | PostgreSQL | MySQL | SQL Server | SQLite |
|---|---|---|---|---|
| Custom Types | ✅ | ❌ | ❌ | ❌ |
| Array Types | ✅ | ❌ | ❌ | ❌ |
| Check Constraints | ✅ | ✅ | ✅ | ✅ |
| Comment Support | ✅ | ✅ (inline) | ✅ (extended) | ❌ |
| Advanced Indexes | ✅ (GIN, GIST) | ❌ | ❌ | ❌ |
