mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(postgres): Dashboard search is now case insensitive when using Postgres, fixes #1896
This commit is contained in:
parent
4f3a3329e2
commit
835fd383ad
@ -7,6 +7,7 @@
|
|||||||
- [Issue #2460](https://github.com/grafana/grafana/issues/2460). SinglestatPanel: Fix to handle series with no data points
|
- [Issue #2460](https://github.com/grafana/grafana/issues/2460). SinglestatPanel: Fix to handle series with no data points
|
||||||
- [Issue #2461](https://github.com/grafana/grafana/issues/2461). LDAP: Fix for ldap users with empty email address
|
- [Issue #2461](https://github.com/grafana/grafana/issues/2461). LDAP: Fix for ldap users with empty email address
|
||||||
- [Issue #2484](https://github.com/grafana/grafana/issues/2484). Graphite: Fix bug when using series ref (#A-Z) and referenced series is hidden in query editor.
|
- [Issue #2484](https://github.com/grafana/grafana/issues/2484). Graphite: Fix bug when using series ref (#A-Z) and referenced series is hidden in query editor.
|
||||||
|
- [Issue #1896](https://github.com/grafana/grafana/issues/1896). Postgres: Dashboard search is now case insensitive when using Postgres
|
||||||
|
|
||||||
**Enhancements**
|
**Enhancements**
|
||||||
- [Issue #2477](https://github.com/grafana/grafana/issues/2477). InfluxDB(0.9): Added more condition operators (`<`, `>`, `<>`, `!~`), thx @thuck
|
- [Issue #2477](https://github.com/grafana/grafana/issues/2477). InfluxDB(0.9): Added more condition operators (`<`, `>`, `<>`, `!~`), thx @thuck
|
||||||
|
@ -146,7 +146,7 @@ func SearchDashboards(query *search.FindPersistedDashboardsQuery) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(query.Title) > 0 {
|
if len(query.Title) > 0 {
|
||||||
sql.WriteString(" AND dashboard.title LIKE ?")
|
sql.WriteString(" AND dashboard.title " + dialect.LikeStr() + " ?")
|
||||||
params = append(params, "%"+query.Title+"%")
|
params = append(params, "%"+query.Title+"%")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ type Dialect interface {
|
|||||||
ShowCreateNull() bool
|
ShowCreateNull() bool
|
||||||
SqlType(col *Column) string
|
SqlType(col *Column) string
|
||||||
SupportEngine() bool
|
SupportEngine() bool
|
||||||
|
LikeStr() string
|
||||||
|
|
||||||
CreateIndexSql(tableName string, index *Index) string
|
CreateIndexSql(tableName string, index *Index) string
|
||||||
CreateTableSql(table *Table) string
|
CreateTableSql(table *Table) string
|
||||||
@ -58,6 +59,10 @@ func (b *BaseDialect) AndStr() string {
|
|||||||
return "AND"
|
return "AND"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *BaseDialect) LikeStr() string {
|
||||||
|
return "LIKE"
|
||||||
|
}
|
||||||
|
|
||||||
func (b *BaseDialect) OrStr() string {
|
func (b *BaseDialect) OrStr() string {
|
||||||
return "OR"
|
return "OR"
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,10 @@ func (db *Postgres) QuoteStr() string {
|
|||||||
return "\""
|
return "\""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *Postgres) LikeStr() string {
|
||||||
|
return "ILIKE"
|
||||||
|
}
|
||||||
|
|
||||||
func (db *Postgres) AutoIncrStr() string {
|
func (db *Postgres) AutoIncrStr() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user