Skip to content

Commit 256d1bf

Browse files
Ajit Pratap Singhclaude
authored andcommitted
docs: add MariaDB dialect to SQL_COMPATIBILITY.md and CHANGELOG.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c553acd commit 256d1bf

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
- **MariaDB dialect** (`--dialect mariadb`): New SQL dialect extending MySQL with support for SEQUENCE DDL (`CREATE/DROP/ALTER SEQUENCE` with full option set), temporal tables (`FOR SYSTEM_TIME`, `WITH SYSTEM VERSIONING`, `PERIOD FOR`), and `CONNECT BY` hierarchical queries with `PRIOR`, `START WITH`, and `NOCYCLE`
12+
1013
## [1.13.0] - 2026-03-20
1114

1215
### Added

docs/SQL_COMPATIBILITY.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,27 @@ This matrix documents the comprehensive SQL feature support in GoSQLX across dif
317317
| **AUTO_INCREMENT** | ✅ Full | ✅ Full | 95% | Column property |
318318
| **Backtick identifiers** | ✅ Full | ✅ Full | 100% | `` `table`.`column` `` syntax |
319319

320+
### MariaDB-Specific Features (v1.14.0+)
321+
322+
MariaDB inherits all MySQL features (SHOW, DESCRIBE, REPLACE INTO, ON DUPLICATE KEY UPDATE, GROUP_CONCAT, MATCH/AGAINST, REGEXP/RLIKE, backtick identifiers, etc.) and adds the following extensions:
323+
324+
| Feature | Support Level | GoSQLX Parser | Test Coverage | Notes |
325+
|---------|---------------|---------------|---------------|-------|
326+
| **CREATE SEQUENCE** | ✅ Full | ✅ Full | 95% | Full DDL with all sequence options |
327+
| **DROP SEQUENCE** | ✅ Full | ✅ Full | 95% | DROP SEQUENCE [IF EXISTS] |
328+
| **ALTER SEQUENCE** | ✅ Full | ✅ Full | 90% | RESTART, RESTART WITH, and all options |
329+
| **Sequence options** | ✅ Full | ✅ Full | 95% | START WITH, INCREMENT BY, MINVALUE, MAXVALUE, CACHE, CYCLE, NOCACHE, NOCYCLE, RESTART, RESTART WITH |
330+
| **FOR SYSTEM_TIME AS OF** | ✅ Full | ✅ Full | 95% | Point-in-time query on system-versioned tables |
331+
| **FOR SYSTEM_TIME BETWEEN** | ✅ Full | ✅ Full | 95% | Range query on system-versioned tables |
332+
| **FOR SYSTEM_TIME FROM/TO** | ✅ Full | ✅ Full | 95% | Range query (inclusive/exclusive) |
333+
| **FOR SYSTEM_TIME ALL** | ✅ Full | ✅ Full | 95% | All rows including historical |
334+
| **WITH SYSTEM VERSIONING** | ✅ Full | ✅ Full | 90% | CREATE TABLE ... WITH SYSTEM VERSIONING |
335+
| **PERIOD FOR** | ✅ Full | ✅ Full | 85% | Application-time period definitions |
336+
| **CONNECT BY** | ✅ Full | ✅ Full | 90% | Hierarchical queries with PRIOR and NOCYCLE |
337+
| **START WITH (CONNECT BY)** | ✅ Full | ✅ Full | 90% | Root condition for hierarchical traversal |
338+
| **PRIOR operator** | ✅ Full | ✅ Full | 90% | Reference parent row in CONNECT BY |
339+
| **NOCYCLE** | ✅ Full | ✅ Full | 85% | Prevent infinite loops in cyclic graphs |
340+
320341
### SQL Server-Specific Features
321342

322343
| Feature | Support Level | GoSQLX Parser | Test Coverage | Notes |
@@ -549,6 +570,7 @@ GoSQLX v1.8.0 introduces a first-class dialect mode engine that threads the SQL
549570
| **SQLite** | `"sqlite"` | SQLite keywords | Flexible typing, simplified syntax | ⚠️ Keywords + basic parsing |
550571
| **Snowflake** | `"snowflake"` | Snowflake keywords | Stage operations, VARIANT type | ⚠️ Keyword detection only |
551572
| **ClickHouse** | `"clickhouse"` | ClickHouse keywords | PREWHERE, FINAL, GLOBAL IN/NOT IN, MergeTree keywords | ✅ v1.13.0 |
573+
| **MariaDB** | `"mariadb"` | MariaDB keywords (superset of MySQL) | All MySQL features + SEQUENCE DDL, FOR SYSTEM_TIME, WITH SYSTEM VERSIONING, PERIOD FOR, CONNECT BY | ✅ v1.14.0 |
552574

553575
### Usage
554576

@@ -597,6 +619,12 @@ gosqlx format --dialect mysql query.sql
597619
- No Snowflake-specific parsing (stages, COPY INTO, VARIANT operations)
598620
- QUALIFY clause not supported
599621

622+
#### MariaDB
623+
- Inherits all MySQL known gaps (stored procedures, HANDLER, XA transactions, CREATE EVENT)
624+
- JSON_TABLE not supported
625+
- Spider storage engine syntax not parsed
626+
- ColumnStore-specific syntax not supported
627+
600628
#### ClickHouse
601629
- PREWHERE clause for pre-filter optimization before primary key scan
602630
- FINAL modifier on table references (forces MergeTree part merge)
@@ -644,6 +672,7 @@ gosqlx format --dialect mysql query.sql
644672
| **SQL Server** | 85% | 65% | ⭐⭐⭐⭐ Very Good | Keywords + MERGE |
645673
| **Oracle** | 80% | 60% | ⭐⭐⭐⭐ Good | Keywords + basic features |
646674
| **SQLite** | 85% | 50% | ⭐⭐⭐⭐ Good | Keywords + basic features |
675+
| **MariaDB** | 95% | 90% | ⭐⭐⭐⭐⭐ Excellent | MySQL superset + SEQUENCE DDL, temporal tables, CONNECT BY (v1.14.0) |
647676
| **Snowflake** | 80% | 30% | ⭐⭐⭐ Good | Keyword detection only |
648677

649678
## Performance Characteristics by Feature

0 commit comments

Comments
 (0)