From 434364261449949f53eec7b31e1deba9fdad608a Mon Sep 17 00:00:00 2001 From: ccx Date: Sat, 24 Dec 2022 12:46:17 +0800 Subject: [PATCH] fix: receiver names of dialector are different (#149) --- postgres.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postgres.go b/postgres.go index 13f8ab7..5d73d27 100644 --- a/postgres.go +++ b/postgres.go @@ -221,12 +221,12 @@ func (dialector Dialector) getSchemaCustomType(field *schema.Field) string { return sqlType } -func (dialectopr Dialector) SavePoint(tx *gorm.DB, name string) error { +func (dialector Dialector) SavePoint(tx *gorm.DB, name string) error { tx.Exec("SAVEPOINT " + name) return nil } -func (dialectopr Dialector) RollbackTo(tx *gorm.DB, name string) error { +func (dialector Dialector) RollbackTo(tx *gorm.DB, name string) error { tx.Exec("ROLLBACK TO SAVEPOINT " + name) return nil }