@@ -10,6 +10,7 @@ import (
1010 "path/filepath"
1111 "strings"
1212
13+ "github.com/kyleconroy/sqlc/internal/codegen/golang"
1314 "github.com/kyleconroy/sqlc/internal/compiler"
1415 "github.com/kyleconroy/sqlc/internal/config"
1516 "github.com/kyleconroy/sqlc/internal/dinosql"
@@ -112,7 +113,7 @@ func Generate(e Env, dir string, stderr io.Writer) (map[string]string, error) {
112113
113114 for _ , sql := range pairs {
114115 combo := config .Combine (conf , sql .SQL )
115- var result dinosql .Generateable
116+ var result golang .Generateable
116117
117118 // TODO: This feels like a hack that will bite us later
118119 joined := make ([]string , 0 , len (sql .Schema ))
@@ -145,7 +146,7 @@ func Generate(e Env, dir string, stderr io.Writer) (map[string]string, error) {
145146 var out string
146147 if sql .Gen .Go != nil {
147148 out = combo .Go .Out
148- files , err = dinosql .Generate (result , combo )
149+ files , err = golang .Generate (result , combo )
149150 } else if sql .Gen .Kotlin != nil {
150151 out = combo .Kotlin .Out
151152 ktRes , ok := result .(kotlin.KtGenerateable )
@@ -177,7 +178,7 @@ func Generate(e Env, dir string, stderr io.Writer) (map[string]string, error) {
177178type postgreEngine interface {
178179 ParseCatalog ([]string ) error
179180 ParseQueries ([]string , dinosql.ParserOpts ) error
180- Result () dinosql .Generateable
181+ Result () golang .Generateable
181182}
182183
183184type dinosqlEngine struct {
@@ -203,11 +204,11 @@ func (d *dinosqlEngine) ParseQueries(queries []string, opts dinosql.ParserOpts)
203204 return nil
204205}
205206
206- func (d * dinosqlEngine ) Result () dinosql .Generateable {
207+ func (d * dinosqlEngine ) Result () golang .Generateable {
207208 return & kotlin.Result {Result : d .result }
208209}
209210
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 ) {
211212 switch sql .Engine {
212213 case config .EngineMySQL :
213214 // Experimental MySQL support
0 commit comments