Support LIKE operator

This commit is contained in:
Rich Lott / Artful Robot 2023-10-26 10:37:10 +01:00
parent 91b6dc5908
commit 4389fd72c2
2 changed files with 3 additions and 0 deletions

View file

@ -92,6 +92,7 @@ export const OPERATORS = {
lessThanEquals: 'lte',
before: 'bf',
after: 'af',
like: 'like',
} as const;
export const DATA_TYPES = {

View file

@ -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 '';
}