mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-09 12:27:52 +00:00
implement 'like' for query builder queries
This commit is contained in:
parent
e6644d25d2
commit
64c0542c3e
2 changed files with 3 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ export const operators = {
|
|||
set: [
|
||||
{ label: 'is', value: '=' },
|
||||
{ label: 'is not', value: '!=' },
|
||||
{ label: 'like', value: 'like' },
|
||||
{ label: 'CIDR', value: 'cidr' }
|
||||
],
|
||||
timestamp: [
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ export const stringifyRowData = (rowData: RowGrouping[], operator?: Operator) =>
|
|||
} catch (error) {
|
||||
return { error: true, query: error.message };
|
||||
}
|
||||
} else if (rowOperator === 'like') {
|
||||
rowString = `UnionRows(Rows(field=${field}, like="%${value}%"))`;
|
||||
} else {
|
||||
rowString = ['set', 'timestamp'].includes(type)
|
||||
? `Row(${field}${operator}"${value}")`
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue