Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sqlite log #2488

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/codegen/golang/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func buildImports(settings *plugin.Settings, queries []Query, uses func(string)
}
}

for typeName, _ := range pqtypeTypes {
for typeName := range pqtypeTypes {
if uses(typeName) {
pkg[ImportSpec{Path: "github.com/sqlc-dev/pqtype"}] = struct{}{}
break
Expand Down
6 changes: 5 additions & 1 deletion internal/codegen/golang/sqlite_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"strings"

"github.com/kyleconroy/sqlc/internal/codegen/sdk"
"github.com/kyleconroy/sqlc/internal/debug"
"github.com/kyleconroy/sqlc/internal/plugin"
)

Expand Down Expand Up @@ -68,7 +69,10 @@ func sqliteType(req *plugin.CodeGenRequest, col *plugin.Column) string {
return "sql.NullFloat64"

default:
log.Printf("unknown SQLite type: %s\n", dt)
if debug.Active {
log.Printf("unknown SQLite type: %s\n", dt)
}

return "interface{}"

}
Expand Down