β‘ The Modern SQL Database Engine β Embedded or Standalone Server
MySQL Protocol Β· SQL + JSON Β· ACID Β· MVCC Β· Encryption Β· Replication Β· Pure Go
CobaltDB runs in two modes β use it as an embedded library inside your Go application, or deploy it as a standalone database server that any MySQL client can connect to.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CobaltDB β
β β
β βββββββββββββββ βββββββββββββββββββββββββ β
β β Embedded β β Standalone Server β β
β β (Go Library)β β (MySQL Protocol) β β
β β β β β β
β β db.Query() β β mysql -h host -P 4200 β β
β β db.Exec() β β Any MySQL client/ORM β β
β βββββββββββββββ βββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Feature | CobaltDB | PostgreSQL | MySQL | SQLite |
|---|---|---|---|---|
| Deployment | Embedded + Server | Server only | Server only | Embedded only |
| Protocol | MySQL wire protocol | PostgreSQL | MySQL | C API |
| Language | Pure Go (Zero CGO) | C | C/C++ | C |
| Query Language | SQL + JSON | SQL + JSON | SQL + JSON | SQL |
| Encryption at Rest | β AES-256-GCM | Plugin | Plugin | β |
| WAL Encryption | β Built-in | β | β | β |
| TLS | β TLS 1.2+ | β | β | β |
| Replication | β Master-Slave | β | β | β |
| Row-Level Security | β Policy-based | β | β | β |
| Audit Logging | β Encrypted | Plugin | Plugin | β |
| Vector Search | β HNSW | pgvector | β | β |
| Temporal Queries | β AS OF | β | β | β |
| Zero Dependencies | β | β | β | β |
| Cross-Compile | β Any OS/Arch | β | β | CGO needed |
| Single Binary | β | β | β | Library |
go get github.com/cobaltdb/cobaltdbRequirements: Go 1.24+ (toolchain go1.26.1) Β· Zero CGO runtime dependency
Run core checks locally:
make verifyRun full security/concurrency gate (requires CGO toolchain and gcc for race detector):
make verify-securityIf tool commands are missing locally, install:
go install golang.org/x/vuln/cmd/govulncheck@latest
go install github.com/securego/gosec/v2/cmd/gosec@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest# Start CobaltDB server
./cobaltdb-server --mysql-addr 127.0.0.1:3307 --admin-pass "StrongPass123!" --data ./mydb.db
# Connect with standard MySQL client
mysql -h 127.0.0.1 -P 3307 -u admin -pmysql> CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, email TEXT);
mysql> INSERT INTO users VALUES (1, 'Alice', 'alice@example.com');
mysql> SELECT * FROM users;
+----+-------+-------------------+
| id | name | email |
+----+-------+-------------------+
| 1 | Alice | alice@example.com |
+----+-------+-------------------+Verified working with
go-sql-driver/mysql,mysqlCLI, and standard MySQL wire protocol. Works with any MySQL-compatible client: Python (mysql-connector, SQLAlchemy), Node.js (mysql2, Prisma), Java (JDBC), Ruby, PHP, etc.
Server features: MySQL protocol, TLS 1.2+, authentication (Argon2id), connection pooling, rate limiting, circuit breaker, health checks, encrypted audit logging, master-slave replication.
import "github.com/cobaltdb/cobaltdb/pkg/engine"
db, _ := engine.Open(":memory:", &engine.Options{InMemory: true})
defer db.Close()
ctx := context.Background()
db.Exec(ctx, `CREATE TABLE users (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
email TEXT UNIQUE,
metadata JSON
)`)
db.Exec(ctx, "INSERT INTO users VALUES (?, ?, ?, ?)",
1, "Alice", "alice@example.com", `{"role": "admin"}`)
rows, _ := db.Query(ctx, `SELECT name, JSON_EXTRACT(metadata, '$.role') FROM users`)Zero CGO, zero dependencies. Import and use β no external server needed.
# Interactive shell
./cobaltdb-cli -i
# Execute SQL directly
./cobaltdb-cli -memory "SELECT * FROM users"
# Connect to running server
./cobaltdb-cli -host localhost:4200# Start with Docker Compose (includes Prometheus + Grafana monitoring)
docker-compose up -d
# Or run standalone
docker build -t cobaltdb .
docker run -d -p 4200:4200 -v cobaltdb_data:/data/cobaltdb cobaltdb
# Connect to containerized database
cobaltdb-cli -host localhost:4200See DOCKER.md for detailed Docker setup instructions.
CobaltDB speaks the MySQL wire protocol β connect from any language using standard MySQL drivers.
import (
"database/sql"
_ "github.com/cobaltdb/cobaltdb/sdk/go" // register driver
)
db, _ := sql.Open("cobaltdb", "file://./data/mydb.cb?cache=1024")
db.Exec("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)")
db.Exec("INSERT INTO users VALUES (?, ?)", 1, "Alice")import "database/sql"
import _ "github.com/go-sql-driver/mysql"
db, _ := sql.Open("mysql", "admin@tcp(127.0.0.1:3307)/")
rows, _ := db.Query("SELECT * FROM users")import cobaltdb # sdk/python
conn = cobaltdb.connect(host='127.0.0.1', port=3307, user='admin')
cursor = conn.execute("SELECT * FROM users")
for row in cursor.fetchall():
print(row)const cobaltdb = require('./sdk/js');
const conn = await cobaltdb.connect({ host: '127.0.0.1', port: 3307 });
const [rows] = await conn.execute('SELECT * FROM users');
console.log(rows);import com.cobaltdb.sdk.CobaltDB;
Connection conn = CobaltDB.connect("127.0.0.1", 3307, "admin", "");
ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM users");mysql -h 127.0.0.1 -P 3307 -u admin -e "SELECT * FROM users"Tip: Any MySQL-compatible ORM works too β SQLAlchemy, Prisma, Hibernate, GORM, Sequelize, ActiveRecord, etc.
Test Environment: AMD Ryzen 9 9950X3D Β· Go 1.26 Β· Windows 11
| Operation | Latency | Throughput |
|---|---|---|
| PUT | ~641 ns | 1.56M ops/sec |
| PUT (Sequential) | ~694 ns | 1.44M ops/sec |
| GET (Point Lookup) | ~64 ns | 15.7M ops/sec |
| UPDATE | ~153 ns | 6.5M ops/sec |
| DELETE | ~197 ns | 5.1M ops/sec |
| SCAN (1K range) | ~270 Β΅s | 3.7K ops/sec |
| Operation | Latency | Detail |
|---|---|---|
| INSERT | ~2.0 Β΅s | Single row with SQL parsing |
| Point Lookup | ~2.1 Β΅s | WHERE id = ? (indexed) |
| Full Scan (1K) | ~598 Β΅s | Custom fast decoder, no reflection |
| Full Scan (10K) | ~8.8 ms | 130K allocs (42% less than json.Unmarshal) |
| SUM/AVG | ~5.0 ms | Byte-level fast path, no JSON decode |
| COUNT(*) | ~4.4 ms | Fast path, skip row decode |
| LIMIT 100 OFFSET 1K | ~3.7 ms | Early termination |
| WHERE (10K) | ~10.3 ms | Custom decoder + expression eval |
| Index vs No Index | 458 Β΅s vs 8.7 ms | 19x faster with index |
| Inner JOIN (1K) | ~724 Β΅s | Hash join |
| 3-Way JOIN (1KΓ3) | ~2.0 ms | Hash join |
| Recursive CTE | ~3.6 Β΅s | 1000 nodes |
| Simple CTE | ~584 Β΅s | View-based resolution |
| Concurrent Read (Γ20) | ~669 ns | Parallel goroutines |
| Transaction | ~347 Β΅s | Single statement |
| Rollback | ~167 Β΅s | 100 statements |
| Window (RowNumber) | ~10.0 ms | OVER (ORDER BY) on 10K rows |
| DELETE (bulk) | ~998 Β΅s | WHERE age < 50 on 1K rows |
| UPDATE (bulk) | ~9.2 ms | WHERE age < 50 on 10K rows |
| Component | Operation | Latency | Throughput |
|---|---|---|---|
| SQL Parser | Parse SELECT | ~826 ns | 1.2M ops/sec |
| SQL Parser | Parse INSERT | ~1.0 Β΅s | 960K ops/sec |
| SQL Parser | Parse Complex Query | ~4.7 Β΅s | 214K ops/sec |
| Lexer | Tokenize | ~499 ns | 2.0M ops/sec |
| Buffer Pool | Get Page | ~27 ns | 36.5M ops/sec |
| Buffer Pool | Memory Read | ~34 ns | 29.4M ops/sec |
| WAL | Append | ~192 Β΅s | 5.2K ops/sec |
π‘ In-memory benchmarks. Disk persistence adds ~20-40% overhead depending on storage.
CobaltDB provides enterprise-grade security features:
import "github.com/cobaltdb/cobaltdb/pkg/storage"
// Generate encryption key
key, _ := storage.GenerateSecureKey()
// Open encrypted database
db, _ := engine.Open("encrypted.db", &engine.Options{
EncryptionKey: key,
})- AES-256-GCM authenticated encryption
- Argon2id for secure key derivation
- Transparent encryption/decryption
import "github.com/cobaltdb/cobaltdb/pkg/server"
config := &server.Config{
Address: ":4200",
TLS: &server.TLSConfig{
Enabled: true,
GenerateSelfSigned: true, // Auto-generate certs
// Or provide your own:
// CertFile: "server.crt",
// KeyFile: "server.key",
},
}
srv, _ := server.New(db, config)
srv.Listen(":4200", config.TLS)- TLS 1.2/1.3 support
- Self-signed certificate generation
- Client certificate authentication
import "github.com/cobaltdb/cobaltdb/pkg/audit"
auditConfig := &audit.Config{
Enabled: true,
LogFile: "audit.log",
LogFormat: "json", // or "text"
}
db, _ := engine.Open("audited.db", &engine.Options{
AuditConfig: auditConfig,
})- JSON and text format support
- Query, DDL, and authentication events
- Automatic log rotation (100MB default)
import "github.com/cobaltdb/cobaltdb/pkg/security"
// Enable RLS
db, _ := engine.Open("secure.db", &engine.Options{
EnableRLS: true,
})
// Create policies via SQL
// CREATE POLICY tenant_isolation ON users
// USING (tenant_id = current_tenant());CobaltDB includes enterprise-grade production features for resilience, observability, and high availability:
import "github.com/cobaltdb/cobaltdb/pkg/engine"
config := &engine.CircuitBreakerConfig{
MaxFailures: 5,
MinSuccesses: 3,
ResetTimeout: 30 * time.Second,
MaxConcurrency: 100,
HalfOpenMaxRequests: 1,
}
cb := engine.NewCircuitBreaker(config)
if err := cb.Allow(); err != nil {
return err // Circuit open
}
defer cb.Release()
err := doOperation()
if err != nil {
cb.ReportFailure()
} else {
cb.ReportSuccess()
}- Three states: Closed, Open, Half-Open
- Automatic recovery with configurable timeout
- Concurrency control and rate limiting in half-open state
config := &engine.RetryConfig{
MaxAttempts: 3,
InitialDelay: 100 * time.Millisecond,
MaxDelay: 30 * time.Second,
Multiplier: 2.0,
Jitter: 0.1, // 10% randomization
}
err := engine.Retry(ctx, config, func() error {
return db.Query("SELECT * FROM users")
})
// Or with result
result, err := engine.RetryWithResult(ctx, config, func() (string, error) {
return fetchData()
})- Exponential backoff with jitter
- Context cancellation support
- 4 predefined policies: Fast, Standard, Aggressive, Background
import "github.com/cobaltdb/cobaltdb/pkg/server"
config := &server.RateLimiterConfig{
RPS: 1000,
Burst: 100,
PerClient: true,
CleanupInterval: 5 * time.Minute,
MaxClients: 10000,
}
rl := server.NewRateLimiter(config)
defer rl.Stop()
if !rl.Allow("client-id") {
return errors.New("rate limit exceeded")
}- Token bucket algorithm
- Global and per-client rate limiting
- Adaptive rate limiting based on system load
config := &server.SQLProtectionConfig{
Enabled: true,
BlockOnDetection: true,
MaxQueryLength: 10000,
MaxORConditions: 10,
MaxUNIONCount: 5,
SuspiciousThreshold: 3,
}
sp := server.NewSQLProtector(config)
result := sp.CheckSQL(sql)
if !result.Allowed {
return errors.New("SQL injection detected")
}- 15 SQL injection pattern detection
- UNION-based, time-based blind, conditional blind, OOB exfil detection
- Whitelist support for trusted queries
// Generate request ID
ctx = server.ContextWithRequestID(ctx, server.NewRequestContext().ID)
// Extract from context
requestID := server.RequestIDFromContext(ctx)- Request ID tracking across components
- Span-based tracing
- Context propagation
# Liveness probe (Kubernetes)
curl http://localhost:8420/health
# Readiness probe (Kubernetes)
curl http://localhost:8420/ready
# Detailed health status
curl http://localhost:8420/healthz
# Circuit breaker statistics
curl http://localhost:8420/circuit-breakers
# Rate limiter statistics
curl http://localhost:8420/rate-limits
# System statistics
curl http://localhost:8420/statsconfig := &server.ProductionConfig{
Lifecycle: &server.LifecycleConfig{
ShutdownTimeout: 30 * time.Second,
DrainTimeout: 10 * time.Second,
},
EnableCircuitBreaker: true,
CircuitBreaker: engine.DefaultCircuitBreakerConfig(),
EnableRetry: true,
Retry: engine.DefaultRetryConfig(),
EnableRateLimiter: true,
EnableSQLProtection: true,
EnableHealthServer: true,
HealthAddr: ":8420",
}
ps := server.NewProductionServer(db, config)
if err := ps.Start(); err != nil {
log.Fatal(err)
}
ps.Wait() // Wait for shutdown signal- Graceful shutdown with configurable timeouts
- Signal handling for SIGTERM/SIGINT
- Component lifecycle management
cobaltdb/
βββ π cmd/ # Command-line tools
β βββ cobaltdb-server/ # Production server
β βββ cobaltdb-cli/ # Interactive CLI
β βββ cobaltdb-migrate/ # Migration tool
β βββ cobaltdb-bench/ # Benchmark tool
β βββ demo*/ # Demo applications
β
βββ π pkg/ # Core packages
β βββ engine/ # Database engine (CB, retry)
β βββ catalog/ # SQL execution layer
β β βββ catalog_core.go # Core types & helpers
β β βββ catalog_insert.go # INSERT operations
β β βββ catalog_update.go # UPDATE operations
β β βββ catalog_delete.go # DELETE operations
β β βββ catalog_select.go # SELECT & JOIN
β β βββ catalog_aggregate.go # GROUP BY & aggregates
β β βββ catalog_window.go # Window functions
β β βββ catalog_cte.go # CTE operations
β β βββ catalog_ddl.go # DDL operations
β β βββ catalog_txn.go # Transactions
β β βββ catalog_eval.go # Expression evaluation
β β βββ catalog_index.go # Index operations
β β βββ catalog_rls.go # Row-Level Security
β β βββ ...
β βββ query/ # SQL parser & optimizer
β βββ btree/ # B+Tree storage engine
β βββ storage/ # Storage layer (WAL, buffer pool)
β βββ server/ # Network server (TLS, auth)
β βββ security/ # RLS & security
β βββ audit/ # Audit logging
β βββ auth/ # Authentication
β βββ protocol/ # MySQL protocol
β βββ metrics/ # Metrics collection
β βββ txn/ # Transaction manager
β
βββ π test/ # Integration tests (5,000+)
βββ π docs/ # Documentation
βββ π scripts/ # Utility scripts
β
βββ π sdk/ # Multi-language SDKs
β βββ go/ # Go SDK (database/sql driver)
β βββ python/ # Python SDK (mysql-connector wrapper)
β βββ js/ # Node.js SDK (mysql2 wrapper)
β βββ java/ # Java SDK (JDBC wrapper)
β
βββ π website/ # Project website
| Package | Purpose | Lines of Code |
|---|---|---|
pkg/catalog |
SQL execution (18 files) | ~8,500 |
pkg/query |
SQL parser & optimizer | ~6,000 |
pkg/btree |
B+Tree storage | ~1,500 |
pkg/storage |
Storage layer | ~2,500 |
pkg/server |
Network & production | ~3,500 |
pkg/engine |
Resilience (CB, retry) | ~800 |
-- DDL: Schema Definition
CREATE TABLE products (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
price REAL CHECK (price > 0),
category TEXT,
tags JSON,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_category ON products(category);
CREATE VIEW expensive_products AS
SELECT * FROM products WHERE price > 100;
-- DML: Data Manipulation
INSERT INTO products (name, price, category, tags)
VALUES ('MacBook Pro', 1999.99, 'Electronics', '["laptop", "apple"]');
-- Complex SELECT with JOINs, Aggregates, Window Functions
SELECT
p.category,
COUNT(*) as total,
AVG(p.price) as avg_price,
MAX(p.price) as max_price,
ROW_NUMBER() OVER (PARTITION BY p.category ORDER BY p.price DESC) as rank
FROM products p
LEFT JOIN orders o ON p.id = o.product_id
WHERE p.price BETWEEN 100 AND 500
GROUP BY p.category
HAVING COUNT(*) > 5
ORDER BY avg_price DESC
LIMIT 10;Window Functions
SELECT
name,
salary,
AVG(salary) OVER (PARTITION BY dept) as dept_avg,
RANK() OVER (ORDER BY salary DESC) as salary_rank,
LAG(salary) OVER (ORDER BY salary) as prev_salary
FROM employees;JSON Operations
-- Extract nested values
SELECT JSON_EXTRACT(metadata, '$.user.address.city') FROM users;
-- Modify JSON
UPDATE users SET metadata = JSON_SET(metadata, '$.last_login', '2026-03-02');
-- Array operations
SELECT * FROM products WHERE JSON_ARRAY_LENGTH(tags) > 2;Transactions (ACID)
BEGIN;
UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;
-- Atomic transfer
COMMIT;
-- Or ROLLBACK on errorTriggers & Procedures
-- Audit logging trigger
CREATE TRIGGER audit_log
AFTER INSERT ON users
BEGIN
INSERT INTO audit (table_name, action, record_id, created_at)
VALUES ('users', 'INSERT', NEW.id, CURRENT_TIMESTAMP);
END;
-- Stored procedure
CREATE PROCEDURE transfer_funds(from_id INT, to_id INT, amount REAL)
BEGIN
UPDATE accounts SET balance = balance - amount WHERE id = from_id;
UPDATE accounts SET balance = balance + amount WHERE id = to_id;
END;
CALL transfer_funds(1, 2, 100.00);βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT LAYER β
β Go SDK Β· CLI Β· TCP/Wire Protocol Β· REST API β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ
β SQL QUERY ENGINE β
β Parser β Planner β Optimizer β Executor (Iterator Model) β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ
β TRANSACTION MANAGER (MVCC) β
β Snapshot Isolation Β· Conflict Detection β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ
β STORAGE ENGINE β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ β
β β B+Tree β β Index Mgr β β Buffer Pool β β
β β (Row Store) β β (Secondary) β β (LRU Cache) β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Page Manager Β· WAL (Write-Ahead Log) Β· Free Page List β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ
β I/O LAYER β
β Disk Backend Β· Memory Backend β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Component | Technology | Purpose |
|---|---|---|
| Storage | B+Tree | Efficient range queries, ordered iteration |
| Buffer Pool | LRU | Page caching, reduces disk I/O |
| WAL | Write-Ahead Log | Durability, crash recovery |
| Transactions | MVCC | Lock-free reads, snapshot isolation |
| JSON | Native Parser | Document storage without external deps |
| Type | Description | Example |
|---|---|---|
INTEGER |
64-bit signed integer | 42, -17 |
REAL |
64-bit floating point | 3.14159, -0.001 |
TEXT |
Variable-length string | 'hello', "world" |
BOOLEAN |
True/False | TRUE, FALSE |
JSON |
Native JSON document | '{"key": "value"}' |
VECTOR(n) |
n-dimensional vector | VECTOR(128) for embeddings |
DATE |
Date only | '2026-03-02' |
TIMESTAMP |
Date + Time | '2026-03-02 14:30:00' |
String: LENGTH, UPPER, LOWER, TRIM, SUBSTR, CONCAT, REPLACE, INSTR
Numeric: ABS, ROUND, FLOOR, CEIL
Aggregate: COUNT, SUM, AVG, MIN, MAX
JSON: JSON_EXTRACT, JSON_SET, JSON_REMOVE, JSON_VALID, JSON_ARRAY_LENGTH, JSON_MERGE
Window: ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD, FIRST_VALUE, LAST_VALUE
Date/Time: DATE, TIME, DATETIME, STRFTIME
Utility: COALESCE, IFNULL, NULLIF, CAST
-- DDL
CREATE TABLE ... [PRIMARY KEY] [NOT NULL] [UNIQUE] [CHECK] [FOREIGN KEY]
CREATE INDEX ... ON ...
CREATE VIEW ... AS SELECT ...
CREATE TRIGGER ... BEFORE|AFTER INSERT|UPDATE|DELETE
CREATE PROCEDURE ...
DROP TABLE|INDEX|VIEW|TRIGGER|PROCEDURE ... [IF EXISTS]
-- DML
INSERT INTO ... VALUES (...)
INSERT INTO ... SELECT ...
UPDATE ... SET ... WHERE ...
DELETE FROM ... WHERE ...
SELECT ... FROM ... [JOIN ... ON ...] [WHERE ...] [GROUP BY ...] [HAVING ...] [ORDER BY ...] [LIMIT ...] [OFFSET ...]
-- DCL
BEGIN | COMMIT | ROLLBACK
CALL procedure_name(...)# Clone the repository
git clone https://github.com/cobaltdb/cobaltdb.git
cd cobaltdb
# Run tests
go test ./... -v
# Run tests with coverage
go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
# Run benchmarks
go test -bench=. -benchtime=2s ./test/...
# Build CLI
go build -o cobaltdb-cli ./cmd/cobaltdb-cli
# Build Server
go build -o cobaltdb-server ./cmd/cobaltdb-server
# Run demo
go run cmd/demo/main.go| Package | Coverage | Package | Coverage |
|---|---|---|---|
pkg/pool |
98.0% β | pkg/wasm |
93.4% β |
pkg/auth |
96.8% β | pkg/btree |
92.4% β |
pkg/cache |
95.5% β | pkg/backup |
91.9% β |
pkg/protocol |
95.1% β | pkg/security |
91.9% β |
pkg/metrics |
94.8% β | pkg/replication |
91.8% β |
pkg/wire |
94.7% β | pkg/query |
90.9% β |
pkg/optimizer |
93.8% β | pkg/audit |
90.9% β |
pkg/logger |
93.8% β | pkg/storage |
90.5% β |
pkg/txn |
93.5% β | pkg/server |
90.2% β |
pkg/engine |
90.0% β | pkg/catalog |
85.5% β |
10,400+ tests across 22 packages, all passing. 19/20 packages above 90% coverage.
| Document | Description |
|---|---|
| CHANGELOG.md | Version history, all changes |
| COVERAGE_GUIDE.md | Test coverage analysis and targets |
| FEATURES.md | Feature status - what works 100% vs partially |
| docs/PRODUCTION.md | Production features guide (Circuit Breaker, Retry, Rate Limiting) |
| docs/ARCHITECTURE_FULL.md | System design & components |
| docs/API.md | Go SDK documentation |
| docs/SQL.md | Complete SQL syntax |
| docs/BENCHMARKS.md | Performance benchmarks |
| docs/GETTING_STARTED.md | Getting started guide |
- SQL Support - SELECT, INSERT, UPDATE, DELETE with JOINs, GROUP BY, ORDER BY, LIMIT
- Window Functions - ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD, FIRST_VALUE, LAST_VALUE
- JSON Support - Native JSON type with JSON_EXTRACT, JSON_SET, JSON_REMOVE, JSON_ARRAY_LENGTH
- Indexes - CREATE INDEX, DROP INDEX with B+Tree implementation
- Views - CREATE VIEW, DROP VIEW support
- Triggers - CREATE TRIGGER with BEFORE/AFTER, INSERT/UPDATE/DELETE events
- Stored Procedures - CREATE PROCEDURE, CALL support
- Transactions - BEGIN, COMMIT, ROLLBACK with ACID compliance
- User Management - Authentication with permissions and sessions
- Constraints - PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, NOT NULL
- MySQL Protocol - Wire-compatible MySQL protocol support
- Full-Text Search - MATCH ... AGAINST syntax with inverted indexes
- Materialized Views - CREATE MATERIALIZED VIEW, REFRESH, and DROP support
- Common Table Expressions - WITH clause support for recursive and non-recursive CTEs
- VACUUM - Database compaction and storage reclamation
- ANALYZE - Table statistics collection for query optimization
- Panic Recovery - Server survives any query panic
- Resource Leak Fixes - All iterators properly closed
- Race Condition Fixes - Statement cache thread-safety
- Transaction Fixes - Connection leak plugged
- Data Corruption Fix - Free list loading corrected
- Circuit Breaker - Three-state breaker with automatic recovery
- Retry Logic - Exponential backoff with 4 policies
- Rate Limiter - Token bucket with adaptive limiting
- SQL Injection Protection - 10+ pattern detection
- Distributed Tracing - Request ID tracking
- Graceful Shutdown - Signal handling with drain timeout
- Health Checks - Kubernetes-compatible probes
- WASM Compilation - Compile SQL queries to WebAssembly bytecode
- Query Plan Cache - LRU cache for parsed query plans with statistics
- Vector Support - VECTOR data type with HNSW index for similarity search
- Temporal Queries - AS OF SYSTEM TIME for time-travel queries
- WAL Encryption - AEAD encryption for write-ahead log with header authentication
- Audit Log Encryption - AES-256-GCM encrypted audit log entries
- RLS Hardening - Fixed bypass in UPDATE...FROM and DELETE...USING
- Auth Hardening - Password policy, brute force rate limiting, random default password
- SQL Injection Protection - 15 detection patterns (conditional blind, OOB exfil, etc.)
- Concurrency Fixes - Panic recovery, double-close protection, lifecycle tracking
- 10,400+ Tests - 19/20 packages above 90% coverage
- Deadlock Detection - Wait-for graph with automatic cycle detection and resolution
- Transaction Timeout - Configurable per-transaction and lock wait timeouts
- Transaction Metrics - Real-time monitoring of active, committed, aborted transactions
- Chaos Engineering - Comprehensive stress tests for production readiness
- Lock Management - Fine-grained lock tracking with automatic release
- Production Readiness Score: 93.5/100
- Graceful Shutdown - Signal handling with drain timeout
- Health Checks - Kubernetes-compatible probes
- WASM Compilation - Compile SQL queries to WebAssembly bytecode
- Query Plan Cache - LRU cache for parsed query plans with statistics
- Vector Support - VECTOR data type with HNSW index for similarity search
- Temporal Queries - AS OF SYSTEM TIME for time-travel queries
- WAL Encryption - AEAD encryption for write-ahead log with header authentication
- Audit Log Encryption - AES-256-GCM encrypted audit log entries
- RLS Hardening - Fixed bypass in UPDATE...FROM and DELETE...USING
- Auth Hardening - Password policy, brute force rate limiting, random default password
- SQL Injection Protection - 15 detection patterns (conditional blind, OOB exfil, etc.)
- Concurrency Fixes - Panic recovery, double-close protection, lifecycle tracking
- 10,400+ Tests - 19/20 packages above 90% coverage
- v0.4.0 - Distributed mode, Sharding support
- v0.5.0 - Cloud-native features, Kubernetes operator
- π Pure Go - Zero CGO, single binary, cross-compile to any OS/architecture
- π± Embedded + Server - Use as Go library OR deploy as standalone MySQL-compatible server
- π Security First - AES-256-GCM encryption (data + WAL + audit), TLS 1.2+, RLS, Argon2id auth
- π ACID + MVCC - Snapshot isolation, lock-free reads, WAL durability
- ποΈ SQL + JSON + Vector - Relational queries, JSONPath, HNSW similarity search
- β‘ Blazing Fast - 15M+ point lookups/sec, 1.5M+ inserts/sec
- π Production Ready - 10,400+ tests, 92% coverage, circuit breaker, rate limiter, replication
MIT License - see LICENSE file.
Built with β€οΈ by Ersin KOΓ
GitHub Β·
Go Reference Β·
Report Card