Skip to content
Snippets Groups Projects
Commit 31b395d9 authored by Leonardo's avatar Leonardo
Browse files

feat((qb): is empty added

parent 5442ed1c
No related branches found
Tags v1.70.0
No related merge requests found
Pipeline #137829 failed
......@@ -47,6 +47,7 @@ export enum StringFilterTypes {
EQUAL = '==',
NOT_EQUAL = '!=',
LIKE = 'Like',
EMPTY = 'IsEmpty',
// NOT_LIKE = 'Not Like',
// IN = 'In',
// NOT_IN = 'Not In',
......@@ -108,7 +109,8 @@ export type LowerStatement = ['Lower', AnyStatement];
export type UpperStatement = ['Upper', AnyStatement];
export type SubstringStatement = ['Substring', AnyStatement, AnyStatement, AnyStatement];
export type TrimStatement = ['Trim', AnyStatement];
export type AllStringStatement = ConcatStatement | LowerStatement | UpperStatement | SubstringStatement | TrimStatement;
export type EmptyStatement = [StringFilterTypes.EMPTY, AnyStatement];
export type AllStringStatement = ConcatStatement | LowerStatement | UpperStatement | SubstringStatement | TrimStatement | EmptyStatement;
// Dates
export type DateStatement = ['Date', AnyStatement];
......
......@@ -54,6 +54,17 @@ export const StringFilters: Record<StringFilterTypes, GeneralDescription<StringF
output: { name: StringFilterTypes.LIKE, type: 'bool' },
logic: [StringFilterTypes.LIKE, '@i', '@1'],
},
[StringFilterTypes.EMPTY]: {
key: 'stringFilterEmpty',
name: 'Is Empty',
type: StringFilterTypes.EMPTY,
description: 'Equal to an empty string or a NULL value',
input: { name: 'Value', type: 'string', default: '' },
numExtraInputs: 0,
inputs: [],
output: { name: StringFilterTypes.EMPTY, type: 'bool' },
logic: [StringFilterTypes.EMPTY, '@i'],
},
};
/** All available functions in the function bar. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment