From 76340ab008a8dc1118713fe9a8224e999e252436 Mon Sep 17 00:00:00 2001 From: reinhardt1053 Date: Tue, 14 Jan 2020 07:08:04 +0100 Subject: [PATCH] Remove *pgxpool.Pool arg from NewDBSchema (#31) --- psql/schema.go | 4 +--- serv/serv.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/psql/schema.go b/psql/schema.go index fbf2965..f4e04e8 100644 --- a/psql/schema.go +++ b/psql/schema.go @@ -5,7 +5,6 @@ import ( "strings" "github.com/gobuffalo/flect" - "github.com/jackc/pgx/v4/pgxpool" ) type DBSchema struct { @@ -51,8 +50,7 @@ type DBRel struct { } } -func NewDBSchema(db *pgxpool.Pool, - info *DBInfo, aliases map[string][]string) (*DBSchema, error) { +func NewDBSchema(info *DBInfo, aliases map[string][]string) (*DBSchema, error) { schema := &DBSchema{ t: make(map[string]*DBTableInfo), diff --git a/serv/serv.go b/serv/serv.go index 4349ce1..aa6750c 100644 --- a/serv/serv.go +++ b/serv/serv.go @@ -25,7 +25,7 @@ func initCompilers(c *config) (*qcode.Compiler, *psql.Compiler, error) { return nil, nil, err } - schema, err = psql.NewDBSchema(db, di, c.getAliasMap()) + schema, err = psql.NewDBSchema(di, c.getAliasMap()) if err != nil { return nil, nil, err }