mirror of
https://github.com/umami-software/umami.git
synced 2026-02-21 21:15:35 +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',
|
lessThanEquals: 'lte',
|
||||||
before: 'bf',
|
before: 'bf',
|
||||||
after: 'af',
|
after: 'af',
|
||||||
|
like: 'like',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const DATA_TYPES = {
|
export const DATA_TYPES = {
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ function mapFilter(column, operator, name, type = 'varchar') {
|
||||||
return `${column} = {{${name}::${type}}}`;
|
return `${column} = {{${name}::${type}}}`;
|
||||||
case OPERATORS.notEquals:
|
case OPERATORS.notEquals:
|
||||||
return `${column} != {{${name}::${type}}}`;
|
return `${column} != {{${name}::${type}}}`;
|
||||||
|
case OPERATORS.like:
|
||||||
|
return `${column} LIKE {{${name}::${type}}}`;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue