mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 20:45:39 +01:00
Support LIKE operator
This commit is contained in:
parent
91b6dc5908
commit
4389fd72c2
2 changed files with 3 additions and 0 deletions
|
|
@ -92,6 +92,7 @@ export const OPERATORS = {
|
|||
lessThanEquals: 'lte',
|
||||
before: 'bf',
|
||||
after: 'af',
|
||||
like: 'like',
|
||||
} as const;
|
||||
|
||||
export const DATA_TYPES = {
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ function mapFilter(column, operator, name, type = 'varchar') {
|
|||
return `${column} = {{${name}::${type}}}`;
|
||||
case OPERATORS.notEquals:
|
||||
return `${column} != {{${name}::${type}}}`;
|
||||
case OPERATORS.like:
|
||||
return `${column} LIKE {{${name}::${type}}}`;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue