|
| 1 | +# SQLON Roadmap |
| 2 | + |
| 3 | +This document tracks the implementation status of planned features for SQLON. |
| 4 | + |
| 5 | +## Phase 2: Basic Format Conversions ✅ COMPLETE |
| 6 | + |
| 7 | +- [x] **Import JSON (flat array of objects) → single table SQLON** |
| 8 | + - ✅ Implemented in `internal/format/json/import.go` |
| 9 | + - Supports arrays of objects, primitive arrays, and nested structures |
| 10 | + |
| 11 | +- [x] **Export SQLON → JSON** |
| 12 | + - ✅ Implemented in `internal/format/json/export.go` |
| 13 | + - Produces JSON with table names as keys and arrays of row objects as values |
| 14 | + |
| 15 | +- [x] **Convert: json ↔ sqlon** |
| 16 | + - ✅ Both directions working |
| 17 | + - Used in roundtrip pipeline: `JSON → SQLON → SQL → SQLON → JSON` |
| 18 | + |
| 19 | +## Phase 3: Advanced Normalization & CSV Support 🚧 IN PROGRESS |
| 20 | + |
| 21 | +- [x] **Normaliser for nested JSON → multi-table SQLON** |
| 22 | + - ✅ Partially implemented - nested JSON creates multiple tables |
| 23 | + - ✅ Tables are extracted from nested structures (e.g., `settings_color_palette`, `settings_spacing_spacingSizes`) |
| 24 | + - ⚠️ Foreign keys not yet explicitly tracked/managed |
| 25 | + - 🔄 Future work: Explicit FK relationships in `internal/normalise/normalise.go` |
| 26 | + |
| 27 | +- [ ] **Export each table to CSV (folder output)** |
| 28 | + - 🔲 Not yet implemented - `internal/format/csv/export.go` is placeholder |
| 29 | + - Plan: Output each table as a separate CSV file in a directory |
| 30 | + |
| 31 | +- [ ] **Convert: sqlon ↔ csv (multi-table aware)** |
| 32 | + - 🔲 Not yet implemented - `internal/format/csv/import.go` and `export.go` are placeholders |
| 33 | + - Plan: Support reading/writing multiple CSV files for a SQLON database |
| 34 | + |
| 35 | +## Phase 4: XML & Advanced Features 🔲 PLANNED |
| 36 | + |
| 37 | +- [ ] **XML import/export using fixed convention** |
| 38 | + - 🔲 Not yet implemented - `internal/format/xml/import.go` and `export.go` are placeholders |
| 39 | + - Plan: Convert between XML and SQLON formats |
| 40 | + |
| 41 | +- [ ] **Optional: minifier `.sqlon.min`** |
| 42 | + - 🔲 Not yet implemented |
| 43 | + - Plan: Create a compact/minified version of SQLON format |
| 44 | + |
| 45 | +## Additional Features Implemented |
| 46 | + |
| 47 | +Beyond the original phases, the following have been completed: |
| 48 | + |
| 49 | +- [x] **SQLite SQL export/import** |
| 50 | + - ✅ Export SQLON → SQLite SQL (`internal/format/sql/export.go`) |
| 51 | + - ✅ Import SQLite SQL → SQLON (`internal/format/sql/parse.go`) |
| 52 | + |
| 53 | +- [x] **Roundtrip pipeline** |
| 54 | + - ✅ Complete pipeline: JSON → SQLON → SQL → SQLON → JSON |
| 55 | + - ✅ Pipeline logging and artifact management |
| 56 | + |
| 57 | +- [x] **CLI tool** |
| 58 | + - ✅ `sqlon to-sql <file.sqlon>` - Convert SQLON to SQL |
| 59 | + - ✅ `sqlon roundtrip <file.json>` - Run complete roundtrip pipeline |
| 60 | + |
| 61 | +- [x] **CI/CD** |
| 62 | + - ✅ GitHub Actions workflow for roundtrip testing |
| 63 | + - ✅ Automated regression testing |
| 64 | + |
| 65 | +## Current Status Summary |
| 66 | + |
| 67 | +- **Phase 2**: ✅ Complete |
| 68 | +- **Phase 3**: 🚧 50% (normalization done, CSV pending) |
| 69 | +- **Phase 4**: 🔲 Not started |
| 70 | + |
| 71 | +## Next Steps |
| 72 | + |
| 73 | +1. **Complete Phase 3**: Implement CSV import/export |
| 74 | +2. **Enhance normalization**: Add explicit foreign key tracking |
| 75 | +3. **Begin Phase 4**: Start XML format support |
| 76 | +4. **Consider**: Minifier implementation based on use cases |
| 77 | + |
0 commit comments