Releases: SyneHQ/zero-sql
v1.0.1
Full Changelog: v1.0.0...v1.0.1
v1.0.0
Full Changelog: v0.0.17...v1.0.0
v0.0.17
Full Changelog: v0.0.16...v0.0.17
v0.0.16
Full Changelog: v0.0.15...v0.0.16
v0.0.15
Full Changelog: v0.0.14...v0.0.15
v0.0.14
Full Changelog: v0.0.13...v0.0.14
v0.0.13
Full Changelog: v0.0.12...v0.0.13
v0.0.12
📋 Release Summary
The v0.1.12 release introduces:
🎯 Primary Feature: MongoDB Collection Information Support
- New CLI Flag:
--include-collection/-c - New API Method:
ConvertSQLToMongoWithCollection() - New Data Structure:
ConversionResultwith collection name and pipeline - Problem Solved: Eliminates
(InvalidNamespace) {aggregate: 1} is not valid for '$limit'; a collection is requirederrors
🔧 Files Modified:
pkg/zerosql/converter.go- Added new public API methodsinternal/converter/converter.go- Added internal implementationcmd/root.go- Added CLI flag and output formattingREADME.md- Added troubleshooting sectionRELEASE_NOTES_v0.1.3.md- Comprehensive release documentation
🚀 Key Benefits:
- Backward Compatible - Existing functionality unchanged
- MongoDB Ready - Generated output can be directly used with MongoDB drivers
- Developer Friendly - Clear collection name extraction from SQL
- Well Documented - Comprehensive examples and troubleshooting guide
The release notes are now ready and include detailed usage examples, API documentation, troubleshooting guidance, and migration instructions. The feature successfully addresses the MongoDB aggregation namespace error while maintaining full backward compatibility.
v0.0.11
Zero-SQL v0.0.2 Release Notes
🎉 New Features
Public API Package
- Public Converter Package: Introduced
pkg/zerosqlpackage to expose converter functionality publicly - External Integration: The converter can now be imported and used by external Go modules
- Simplified API: Clean and simple API with
zerosql.New()andzerosql.Options{}
🔧 Breaking Changes
Import Path Changes
- Old:
github.com/synehq/zero-sql/internal/converter(internal package) - New:
github.com/synehq/zero-sql/pkg/zerosql(public package)
Usage Changes
// Before (internal package - not accessible externally)
conv := converter.New(&converter.Options{
Verbose: true,
})
// After (public package)
conv := zerosql.New(&zerosql.Options{
Verbose: true,
})🚀 Improvements
- Better Modularity: Clear separation between internal implementation and public API
- External Usage: Can now be integrated into other Go projects as a dependency
- Maintained Functionality: All existing converter features remain unchanged
📦 Installation
For external projects, you can now import and use zero-sql as a library:
import "github.com/synehq/zero-sql/pkg/zerosql"
conv := zerosql.New(&zerosql.Options{
Verbose: true,
})
pipeline, err := conv.ConvertSQLToMongo("SELECT * FROM users WHERE age > 18")🔄 Migration Guide
If you were using the internal package (which wasn't officially supported):
- Update import:
github.com/synehq/zero-sql/internal/converter→github.com/synehq/zero-sql/pkg/zerosql - Update constructor:
converter.New()→zerosql.New() - Update options:
converter.Options{}→zerosql.Options{}
Full Changelog: v0.0.1...v0.0.2
v0.0.1
Zero-SQL v0.0.1 Release Notes
Release Date: Sat Jul 7 2025
We're excited to announce the initial release of Zero-SQL v0.0.1! 🎉
Zero-SQL is a robust Go package and CLI tool that converts SQL queries to MongoDB aggregation pipelines, making it easy to migrate from relational databases to MongoDB or work with both paradigms seamlessly.
🚀 Initial Features
Core SQL Support
- SELECT statements with column selection and aliases
- FROM clauses with table references and aliases
- WHERE clauses with complex conditional logic
- ORDER BY clauses with ascending/descending sort
- LIMIT and OFFSET for result pagination
- GROUP BY with aggregation functions
- HAVING clauses for filtered aggregations
JOIN Operations
- INNER JOIN - Standard inner joins between tables
- LEFT JOIN - Left outer joins with null preservation
- RIGHT JOIN - Right outer joins
- Multiple JOINs - Chain multiple join operations
- Table aliases - Support for aliased tables in joins
Advanced WHERE Conditions
- Comparison operators:
=,!=,<>,>,<,>=,<= - Pattern matching:
LIKE,ILIKEfor case-insensitive searches - List operations:
IN,NOT IN - NULL checks:
IS NULL,IS NOT NULL - Logical operators:
AND,OR,NOT - Parentheses grouping for complex conditional logic
Aggregation Functions
COUNT()- Count recordsSUM()- Sum numeric valuesAVG()- Calculate averagesMIN()- Find minimum valuesMAX()- Find maximum values
CLI Tool Features
- Multiple output formats: JSON and BSON
- Pretty printing for readable output
- Verbose mode for debugging
- Interactive usage with command-line flags
🛠 MongoDB Pipeline Generation
Zero-SQL generates optimized MongoDB aggregation pipelines using:
$lookupstages for JOIN operations$unwindstages to flatten joined arrays$matchstages for WHERE and HAVING clauses$groupstages for GROUP BY operations$projectstages for SELECT column specification$sortstages for ORDER BY clauses$skipand$limitstages for pagination
📦 Installation
From Source
git clone https://github.com/synhq/zero-sql
cd zero-sql
go build -o zero-sql buildUsing Go Install
go install github.com/synhq/zero-sql🏗 Architecture
Clean architecture with separation of concerns:
- CLI layer (
cmd/) - Command-line interface - Converter package (
internal/converter/) - Core conversion logic - Parser helpers - SQL AST parsing utilities
- Operator mappings - SQL to MongoDB operator translations
🔧 Usage Examples
Basic Query
zero-sql "SELECT name, age FROM users WHERE age > 18"Complex JOIN with Aggregation
zero-sql "SELECT u.name, COUNT(p.id) as post_count FROM users u LEFT JOIN posts p ON u.id = p.user_id GROUP BY u.name HAVING COUNT(p.id) > 5"⚠️ Known Limitations
- Only SELECT statements are currently supported
- Subqueries are not yet implemented
- Window functions are not available
- Some advanced SQL features may not be supported
🔮 What's Next
Future releases will focus on:
- Subquery support
- Additional SQL statement types (INSERT, UPDATE, DELETE)
- Window functions
- Performance optimizations
- Enhanced error reporting
🙏 Contributing
We welcome contributions! Please see our Contributing Guide for details on how to get involved.
📄 License
Zero-SQL is licensed under the MIT License. See LICENSE for details.
Download: GitHub Releases
Report Issues: GitHub Issues
Documentation: README.md