From 09571fc44740945393ddde0d1277559e61a7980a Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Thu, 21 Oct 2021 19:46:23 +0200 Subject: [PATCH] reverted pgx changes --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 7cc9b98..eb80bc5 100644 --- a/main.go +++ b/main.go @@ -9,6 +9,7 @@ import ( "csgowtfd/ent/player" "csgowtfd/ent/stats" "csgowtfd/utils" + "entgo.io/ent/dialect" "entgo.io/ent/dialect/sql" "flag" "fmt" @@ -722,7 +723,8 @@ func main() { log.Fatalf("Failed to open database %s: %v", conf.Db.ConnectTo, err) } - db.Client = ent.NewClient(ent.Driver(pdb)) + drv := sql.OpenDB(dialect.Postgres, pdb.DB()) + db.Client = ent.NewClient(ent.Driver(drv)) } else { db.Client, err = ent.Open(conf.Db.Driver, conf.Db.ConnectTo) if err != nil {