Chore: Add Quote function in DB (#58594)

Added Quote function
This commit is contained in:
Selene 2022-11-23 18:40:58 +01:00 committed by GitHub
parent 9dc82606db
commit b981a93f9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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