From b981a93f9a10c70caa62fe27f0d73b6c7eb3ab86 Mon Sep 17 00:00:00 2001 From: Selene Date: Wed, 23 Nov 2022 18:40:58 +0100 Subject: [PATCH] Chore: Add Quote function in DB (#58594) Added Quote function --- pkg/infra/db/db.go | 1 + pkg/infra/db/dbtest/dbtest.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/pkg/infra/db/db.go b/pkg/infra/db/db.go index 82046d3eda0..d85b7db05e9 100644 --- a/pkg/infra/db/db.go +++ b/pkg/infra/db/db.go @@ -19,6 +19,7 @@ type DB interface { GetDBType() core.DbType GetSqlxSession() *session.SessionDB InTransaction(ctx context.Context, fn func(ctx context.Context) error) error + Quote(value string) string } type Session = sqlstore.DBSession diff --git a/pkg/infra/db/dbtest/dbtest.go b/pkg/infra/db/dbtest/dbtest.go index cdd9b7393c6..142626189e2 100644 --- a/pkg/infra/db/dbtest/dbtest.go +++ b/pkg/infra/db/dbtest/dbtest.go @@ -47,6 +47,10 @@ func (f *FakeDB) GetSqlxSession() *session.SessionDB { return nil } +func (f *FakeDB) Quote(value string) string { + return "" +} + // TODO: service-specific methods not yet split out ; to be removed func (f *FakeDB) UpdateTempUserWithEmailSent(ctx context.Context, cmd *models.UpdateTempUserWithEmailSentCommand) error { return f.ExpectedError