Generic dialect support. (MySQL and Postgres)

This commit is contained in:
go-jet 2019-07-28 14:57:02 +02:00
parent 043a0dc4c0
commit 5dda5e1e11
27 changed files with 440 additions and 92 deletions

View file

@ -3,6 +3,7 @@ package postgres
import (
"database/sql"
"fmt"
"github.com/go-jet/jet"
"github.com/go-jet/jet/generator/internal/metadata"
"github.com/go-jet/jet/generator/internal/template"
"path"
@ -41,7 +42,7 @@ func Generate(destDir string, dbConn DBConnection) error {
genPath := path.Join(destDir, dbConn.DBName, dbConn.SchemaName)
err = template.GenerateFiles(genPath, schemaInfo.TableInfos, schemaInfo.EnumInfos, "postgres")
err = template.GenerateFiles(genPath, schemaInfo.TableInfos, schemaInfo.EnumInfos, jet.PostgreSQL)
if err != nil {
return err