Skip to content

Commit 875d9d3

Browse files
committed
All Basic Select tests passed. From now Working on codegen
1 parent 220adef commit 875d9d3

File tree

4 files changed

+482
-19
lines changed

4 files changed

+482
-19
lines changed

internal/engine/ydb/catalog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ package ydb
22

33
import "github.com/sqlc-dev/sqlc/internal/sql/catalog"
44

5-
func newTestCatalog() *catalog.Catalog {
5+
func NewTestCatalog() *catalog.Catalog {
66
return catalog.New("main")
77
}

internal/engine/ydb/catalog_test.go renamed to internal/engine/ydb/catalog_tests/create_table_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ydb
1+
package ydb_test
22

33
import (
44
"strconv"
@@ -7,6 +7,7 @@ import (
77

88
"github.com/google/go-cmp/cmp"
99
"github.com/google/go-cmp/cmp/cmpopts"
10+
"github.com/sqlc-dev/sqlc/internal/engine/ydb"
1011
"github.com/sqlc-dev/sqlc/internal/sql/ast"
1112
"github.com/sqlc-dev/sqlc/internal/sql/catalog"
1213
)
@@ -125,7 +126,7 @@ func TestCreateTable(t *testing.T) {
125126
},
126127
}
127128

128-
p := NewParser()
129+
p := ydb.NewParser()
129130
for i, tc := range tests {
130131
test := tc
131132
t.Run(strconv.Itoa(i), func(t *testing.T) {
@@ -135,13 +136,13 @@ func TestCreateTable(t *testing.T) {
135136
t.Fatal(err)
136137
}
137138

138-
c := newTestCatalog()
139+
c := ydb.NewTestCatalog()
139140
if err := c.Build(stmts); err != nil {
140141
t.Log(test.stmt)
141142
t.Fatal(err)
142143
}
143144

144-
e := newTestCatalog()
145+
e := ydb.NewTestCatalog()
145146
if test.s != nil {
146147
var replaced bool
147148
for i := range e.Schemas {

0 commit comments

Comments
 (0)