mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 02:29:03 +08:00
Merge branch 'develop' into fix/remove-fe-owner
This commit is contained in:
commit
c9db4c9051
@ -173,9 +173,9 @@ func parseLogQuery(query string) ([]string, error) {
|
||||
searchString := strings.TrimSpace(strings.Split(v, op)[1])
|
||||
|
||||
operatorRemovedTokens := strings.Split(operatorRegex.ReplaceAllString(v, " "), " ")
|
||||
searchCol := strings.ToLower(operatorRemovedTokens[0])
|
||||
if searchCol == AND || searchCol == OR {
|
||||
searchCol = strings.ToLower(operatorRemovedTokens[1])
|
||||
searchCol := operatorRemovedTokens[0]
|
||||
if strings.ToLower(searchCol) == AND || strings.ToLower(searchCol) == OR {
|
||||
searchCol = operatorRemovedTokens[1]
|
||||
}
|
||||
col := searchCol
|
||||
if strings.ToLower(searchCol) == "fulltext" {
|
||||
|
@ -97,6 +97,11 @@ var correctQueriesTest = []struct {
|
||||
`id.userid in (100) and id_userid gt 50`,
|
||||
[]string{`id.userid IN (100) `, `and id_userid > 50 `},
|
||||
},
|
||||
{
|
||||
`filters with case sensitive key name`,
|
||||
`userIdentifier in ('user') and userIdentifier contains 'user'`,
|
||||
[]string{`userIdentifier IN ('user') `, `AND userIdentifier ILIKE '%user%' `},
|
||||
},
|
||||
}
|
||||
|
||||
func TestParseLogQueryCorrect(t *testing.T) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user