@@ -10,6 +10,7 @@ import (
10
10
"path/filepath"
11
11
"strings"
12
12
13
+ "github.com/kyleconroy/sqlc/internal/codegen/golang"
13
14
"github.com/kyleconroy/sqlc/internal/compiler"
14
15
"github.com/kyleconroy/sqlc/internal/config"
15
16
"github.com/kyleconroy/sqlc/internal/dinosql"
@@ -112,7 +113,7 @@ func Generate(e Env, dir string, stderr io.Writer) (map[string]string, error) {
112
113
113
114
for _ , sql := range pairs {
114
115
combo := config .Combine (conf , sql .SQL )
115
- var result dinosql .Generateable
116
+ var result golang .Generateable
116
117
117
118
// TODO: This feels like a hack that will bite us later
118
119
joined := make ([]string , 0 , len (sql .Schema ))
@@ -145,7 +146,7 @@ func Generate(e Env, dir string, stderr io.Writer) (map[string]string, error) {
145
146
var out string
146
147
if sql .Gen .Go != nil {
147
148
out = combo .Go .Out
148
- files , err = dinosql .Generate (result , combo )
149
+ files , err = golang .Generate (result , combo )
149
150
} else if sql .Gen .Kotlin != nil {
150
151
out = combo .Kotlin .Out
151
152
ktRes , ok := result .(kotlin.KtGenerateable )
@@ -177,7 +178,7 @@ func Generate(e Env, dir string, stderr io.Writer) (map[string]string, error) {
177
178
type postgreEngine interface {
178
179
ParseCatalog ([]string ) error
179
180
ParseQueries ([]string , dinosql.ParserOpts ) error
180
- Result () dinosql .Generateable
181
+ Result () golang .Generateable
181
182
}
182
183
183
184
type dinosqlEngine struct {
@@ -203,11 +204,11 @@ func (d *dinosqlEngine) ParseQueries(queries []string, opts dinosql.ParserOpts)
203
204
return nil
204
205
}
205
206
206
- func (d * dinosqlEngine ) Result () dinosql .Generateable {
207
+ func (d * dinosqlEngine ) Result () golang .Generateable {
207
208
return & kotlin.Result {Result : d .result }
208
209
}
209
210
210
- func parse (e Env , name , dir string , sql config.SQL , combo config.CombinedSettings , parserOpts dinosql.ParserOpts , stderr io.Writer ) (dinosql .Generateable , bool ) {
211
+ func parse (e Env , name , dir string , sql config.SQL , combo config.CombinedSettings , parserOpts dinosql.ParserOpts , stderr io.Writer ) (golang .Generateable , bool ) {
211
212
switch sql .Engine {
212
213
case config .EngineMySQL :
213
214
// Experimental MySQL support
0 commit comments