Search: sort results correctly when using postgres (#46466)

* Search: sort results correctly when using postgres

postgresql puts nulls first while both mysql and sqlite puts them last

* linting
This commit is contained in:
Leonard Gram
2022-03-15 15:08:40 +01:00
committed by GitHub
parent 16cf179df1
commit f46038ed3a
3 changed files with 25 additions and 1 deletions
@@ -27,6 +27,8 @@ type Dialect interface {
BooleanStr(bool) string
DateTimeFunc(string) string
OrderBy(order string) string
CreateIndexSQL(tableName string, index *Index) string
CreateTableSQL(table *Table) string
AddColumnSQL(tableName string, col *Column) string
@@ -308,3 +310,7 @@ func (b *BaseDialect) Lock(_ LockCfg) error {
func (b *BaseDialect) Unlock(_ LockCfg) error {
return nil
}
func (b *BaseDialect) OrderBy(order string) string {
return order
}