File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package zerosql
2+
3+ import (
4+ "github.com/synehq/zero-sql/internal/converter"
5+ )
6+
7+ // Converter wraps the internal converter to provide a public API
8+ type Converter struct {
9+ conv * converter.Converter
10+ }
11+
12+ // Options holds configuration for the converter
13+ type Options struct {
14+ Verbose bool
15+ }
16+
17+ // New creates a new Converter instance
18+ func New (opts * Options ) * Converter {
19+ if opts == nil {
20+ opts = & Options {}
21+ }
22+
23+ conv := converter .New (& converter.Options {
24+ Verbose : opts .Verbose ,
25+ })
26+
27+ return & Converter {
28+ conv : conv ,
29+ }
30+ }
31+
32+ // ConvertSQLToMongo converts a SQL query to MongoDB aggregation pipeline
33+ func (c * Converter ) ConvertSQLToMongo (sqlQuery string ) ([]map [string ]interface {}, error ) {
34+ return c .conv .ConvertSQLToMongo (sqlQuery )
35+ }
You can’t perform that action at this time.
0 commit comments