Releases: HelgeSverre/sql-splitter
v1.13.1
v1.13.0
Release Notes
Added
-
Expanded benchmark suite with 4 new competitor tools:
mysqldbsplit(PHP) - Now the fastest tool at 1238 MB/s throughputmysqldump-splitter(Rust/Scoopit) - Hierarchical output with gzip supportmysql-dump-splitter(Go/Bekkema) - Include/exclude table filteringextract-mysql-dump(Python/agroff) - Multi-database extraction- Total of 10 tools now benchmarked in Docker suite
-
JSON schema generation: Auto-generate JSON schemas from Rust types using
schemars- New
schemasubcommand to export schemas for all JSON output formats - Schemas available for: analyze, convert, graph, merge, redact, sample, shard, split, validate
- New
-
Website OG image generation: Dynamic Open Graph images using Satori
- Automatic OG image generation for documentation pages
- IndexNow integration for faster search engine indexing
-
Profiling and benchmark recipes: New justfile recipes for performance analysis
just profile-medium/just profile-largefor CPU profilingjust bench-baselinefor criterion benchmarks
Changed
- Performance: Use stack-allocated buffers in parser to reduce heap allocations
- Error handling: Improved error handling in validation, sample, and compression modules
- Dependencies: Updated multiple dependencies (chrono 0.4.43, jsonschema 0.40, schemars 1.2, clap, serde_json, flate2, indicatif, dirs, rustyline, rand, fake)
Fixed
- CI disk space: Resolved disk space exhaustion in GitHub Actions builds
- Compression: Return
Resultfromwrap_readerfor better error handling
Install sql-splitter 1.13.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/helgesverre/sql-splitter/releases/download/v1.13.0/sql-splitter-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/helgesverre/sql-splitter/releases/download/v1.13.0/sql-splitter-installer.ps1 | iex"Install prebuilt binaries via Homebrew
brew install helgesverre/tap/sql-splitterDownload sql-splitter 1.13.0
| File | Platform | Checksum |
|---|---|---|
| sql-splitter-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| sql-splitter-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| sql-splitter-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| sql-splitter-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
| sql-splitter-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
v1.12.6
Added
-
Full INSERT/COPY statement rewriting for redact command: The
redactcommand now actively modifies SQL data- Previously, redaction strategies were identified but statements passed through unchanged
- INSERT statements are now parsed, values redacted according to matching strategies, and reconstructed
- PostgreSQL COPY data blocks are now parsed and redacted with proper
\NNULL markers - Multi-row INSERT statements are fully supported
- All 7 redaction strategies now work: null, constant, hash, mask, fake, shuffle, skip
-
Dialect-aware value formatting for redact command: Proper SQL escaping per dialect
- MySQL: Backtick quoting, backslash escape sequences (
\',\n,\r,\t) - PostgreSQL: Double-quote identifiers,
''escaping,\Nfor NULL in COPY format - SQLite: Double-quote identifiers,
''escaping - MSSQL: Square bracket identifiers
[column],N'...'for Unicode strings
- MySQL: Backtick quoting, backslash escape sequences (
-
ValueRewriter module: New
src/redactor/rewriter.rsfor INSERT/COPY transformation- Converts ParsedValue to RedactValue, applies strategy, formats back to SQL
- Handles PostgreSQL's two-step COPY pattern (header + data block)
- Proper stats tracking during actual redaction
-
20 new redact integration tests:
- 7 MSSQL-specific tests: null, hash, fake, dry-run, bracket quoting, Unicode strings, reproducibility
- 13 cross-dialect tests: MySQL INSERT, PostgreSQL COPY, SQLite, multi-row, escaping, skip tables
Changed
- Redact command now reports accurate statistics: Row and column counts reflect actual redaction performed
Full Changelog: v1.12.5...v1.12.6
v1.12.5
MSSQL Production-Style Output for Test Data Generator
Added
-
MSSQL production-style output for test data generator: New CLI flags for production-style MSSQL output
--go-separator: Use GO batch separators instead of semicolons--schema-prefix: Use[dbo].schema prefix on all table references--named-constraints: Use named CONSTRAINT syntax (e.g.,CONSTRAINT [PK_users] PRIMARY KEY CLUSTERED)--mssql-production: Enable all three options at once for production-like outputRenderConfig::mssql_production()method for programmatic use
-
9 new MSSQL generator integration tests: Comprehensive tests for generated MSSQL fixtures
- Tests for analyze, split, validate, merge roundtrip, sample command
- Tests for deterministic generation and production-style output
- All 38 MSSQL integration tests now pass
Changed
- Updated TEST_DATA_GENERATOR.md documentation: Added MSSQL dialect examples and updated dialect count
Example Usage
# Generate MSSQL with production-style output
gen-fixtures --dialect mssql --scale small --mssql-production
# Or enable individual options
gen-fixtures --dialect mssql --scale medium --go-separator --schema-prefix --named-constraintsFull Changelog: v1.12.4...v1.12.5
v1.12.4
Added
- MSSQL dialect support for test data generator: The
gen-fixturesCLI andtest_data_gencrate now support MSSQL dialect- Square bracket
[identifier]quoting for table and column names INT IDENTITY(1,1)for auto-increment primary keysNVARCHAR(n)andNVARCHAR(MAX)for Unicode string columnsN'...'prefix for Unicode string literalsDATETIME2for timestamp columnsBITfor boolean columnsDECIMAL(10,2)for monetary values- Proper
SET ANSI_NULLS ON,SET QUOTED_IDENTIFIER ON,SET NOCOUNT ONheader - Both streaming mode (
--rows) and multi-tenant schema mode (--scale) supported
- Square bracket
Usage:
gen-fixtures --dialect mssql --scale small
gen-fixtures --dialect mssql --rows 10000 --tables 5Full Changelog: v1.12.3...v1.12.4
v1.12.3
Fixed
- SQLite AUTOINCREMENT stripping for DuckDB: SQLite dumps with
AUTOINCREMENTnow import correctly- Previously, tables with
INTEGER PRIMARY KEY AUTOINCREMENTfailed to create in DuckDB - Now strips
AUTOINCREMENT,WITHOUT ROWID, andSTRICTtable modifiers - SQLite dumps now import all tables (was failing on most tables before)
- Previously, tables with
Added
- New SQLite DuckDB tests: Added 2 tests for SQLite-specific syntax stripping
Full Changelog: v1.12.2...v1.12.3
v1.12.2
Full Changelog: v1.12.1...v1.12.2
v1.12.1
Fixed
-
PostgreSQL COPY performance: Fixed severe performance regression in
querycommand when processing PostgreSQL dumps with COPY data blocks- Processing time for pagila-data.sql reduced from 15-27 seconds to ~0.03 seconds
- Full pagila dump now processes in ~1.9 seconds (previously could hang or take minutes)
-
Single-column COPY data: Fixed bug where PostgreSQL COPY data with single columns (no tabs) was incorrectly identified as non-COPY data
-
COPY schema prefix handling: Fixed "table does not exist" errors when COPY statements used schema-qualified names (
COPY public.tablename)
Added
-
16 new PostgreSQL COPY tests: Comprehensive edge case coverage for COPY blocks with comments, schema prefixes, escape sequences, unicode, and more
-
Stress tests: 50k row COPY imports, multi-table stress tests, 10k row INSERT tests
Performance
PostgreSQL dumps are now ~6x faster to query than MySQL/SQLite:
| Dialect | File Size | Query Time |
|---|---|---|
| PostgreSQL | 111 MB | 6.4s |
| MySQL | 124 MB | 36.5s |
| SQLite | 124 MB | 37.2s |
v1.12.0
Query Command: SQL Analytics on Dump Files
Run SQL queries directly on dump files using embedded DuckDB — no database required!
Features
- Zero dependencies: DuckDB is bundled and compiled into sql-splitter
- Multi-dialect support: MySQL, PostgreSQL, and SQLite dumps
- Output formats: table (ASCII), JSON, JSONL, CSV, TSV
- Interactive REPL:
.tables,.schema,.count,.sample,.export - Persistent caching: 400x speedup on repeated queries
- Memory management: Auto disk mode for dumps >2GB
- Table filtering: Import only specific tables for faster startup
Usage Examples
# Single query
sql-splitter query dump.sql "SELECT COUNT(*) FROM users"
# Export to JSON
sql-splitter query dump.sql "SELECT * FROM orders" -f json -o results.json
# Interactive REPL
sql-splitter query dump.sql --interactive
# With caching (fast repeated queries)
sql-splitter query dump.sql "SELECT ..." --cacheREPL Commands
.tables— List all tables.schema [table]— Show schema.describe <table>— Describe table columns.count <table>— Count rows.sample <table> [n]— Sample rows.format <fmt>— Set output format.export <file> <query>— Export results
Cache Management
sql-splitter query --list-cache # List cached databases
sql-splitter query --clear-cache # Clear all cachesTesting
- 119 new DuckDB tests covering edge cases and real-world patterns
- Real-world verification tests across MySQL, PostgreSQL, and SQLite dumps
Full Changelog: v1.11.0...v1.12.0
v1.11.0 - Graph Command for ERD Generation
What's New
Graph Command
Generate Entity-Relationship Diagrams (ERD) from SQL dumps:
sql-splitter graph dump.sql -o schema.html # Interactive HTML
sql-splitter graph dump.sql -o schema.dot # Graphviz DOT
sql-splitter graph dump.sql -o schema.mmd # Mermaid erDiagram
sql-splitter graph dump.sql --json # JSON with full schemaFeatures:
- ERD-style diagrams showing tables with columns, types, PK/FK markers, nullability
- Interactive HTML with dark/light mode toggle, copy Mermaid button, panzoom
- Table filtering with
--tablesand--excludeglob patterns - Focus mode:
--table X --transitive(dependencies) or--reverse(dependents) - Cycle detection using Tarjan's SCC algorithm (
--cycles-only) - Auto-render to PNG/SVG/PDF via Graphviz (
--render) - Tested with large schemas (281 tables, 3104 columns)
Order Command
Reorder SQL dumps in topological FK order for safe imports:
sql-splitter order dump.sql -o ordered.sql # Safe import order
sql-splitter order dump.sql --check # Check for cycles
sql-splitter order dump.sql --reverse # For DROP operationsInstallation
cargo install sql-splitterSee CHANGELOG.md for full details.
What's Changed
- Fix mobile code overflow and light/dark mode color variables by @Copilot in #10
- docs: extend roadmap with graph, migrate, parallel, and infer features by @HelgeSverre in #11
New Contributors
- @Copilot made their first contribution in #10
- @HelgeSverre made their first contribution in #11
Full Changelog: v1.10.0...v1.11.0