Skip to content

Releases: SyneHQ/zero-sql

v1.0.1

16 Jan 20:40

Choose a tag to compare

v1.0.0

16 Jan 20:22

Choose a tag to compare

Full Changelog: v0.0.17...v1.0.0

v0.0.17

16 Jan 20:10

Choose a tag to compare

Full Changelog: v0.0.16...v0.0.17

v0.0.16

16 Jan 20:06

Choose a tag to compare

Full Changelog: v0.0.15...v0.0.16

v0.0.15

16 Jan 20:00

Choose a tag to compare

Full Changelog: v0.0.14...v0.0.15

v0.0.14

16 Jan 19:51

Choose a tag to compare

Full Changelog: v0.0.13...v0.0.14

v0.0.13

08 Jun 18:26

Choose a tag to compare

Full Changelog: v0.0.12...v0.0.13

v0.0.12

07 Jun 19:08

Choose a tag to compare

📋 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: ConversionResult with collection name and pipeline
  • Problem Solved: Eliminates (InvalidNamespace) {aggregate: 1} is not valid for '$limit'; a collection is required errors

🔧 Files Modified:

  • pkg/zerosql/converter.go - Added new public API methods
  • internal/converter/converter.go - Added internal implementation
  • cmd/root.go - Added CLI flag and output formatting
  • README.md - Added troubleshooting section
  • RELEASE_NOTES_v0.1.3.md - Comprehensive release documentation

🚀 Key Benefits:

  1. Backward Compatible - Existing functionality unchanged
  2. MongoDB Ready - Generated output can be directly used with MongoDB drivers
  3. Developer Friendly - Clear collection name extraction from SQL
  4. 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

07 Jun 18:23

Choose a tag to compare

Zero-SQL v0.0.2 Release Notes

🎉 New Features

Public API Package

  • Public Converter Package: Introduced pkg/zerosql package 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() and zerosql.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):

  1. Update import: github.com/synehq/zero-sql/internal/convertergithub.com/synehq/zero-sql/pkg/zerosql
  2. Update constructor: converter.New()zerosql.New()
  3. Update options: converter.Options{}zerosql.Options{}

Full Changelog: v0.0.1...v0.0.2

v0.0.1

07 Jun 16:48

Choose a tag to compare

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, ILIKE for 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 records
  • SUM() - Sum numeric values
  • AVG() - Calculate averages
  • MIN() - Find minimum values
  • MAX() - 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:

  • $lookup stages for JOIN operations
  • $unwind stages to flatten joined arrays
  • $match stages for WHERE and HAVING clauses
  • $group stages for GROUP BY operations
  • $project stages for SELECT column specification
  • $sort stages for ORDER BY clauses
  • $skip and $limit stages for pagination

📦 Installation

From Source

git clone https://github.com/synhq/zero-sql
cd zero-sql
go build -o zero-sql build

Using 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