Skip to content

Commit

Permalink
adding jsonbArrayType DT
Browse files Browse the repository at this point in the history
  • Loading branch information
kjain110 committed Dec 17, 2024
1 parent 2825566 commit 44229c6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ export const DataTypeInput = ({
? multiSelectControl({ testId: 'data-input-select-multi-arrayType' })
: textControl({ testId: 'data-input-text-arrayType' });

case DATA_TYPES.JsonbArrayType:

Check failure on line 208 in src/QueryBuilder/QueryBuilder/QueryBuilderModal/DataTypeInput/DataTypeInput.js

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

Expected indentation of 4 spaces but found 8
return isContainsRelatedOperator && hasSourceOrValues

Check failure on line 209 in src/QueryBuilder/QueryBuilder/QueryBuilderModal/DataTypeInput/DataTypeInput.js

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

Expected indentation of 6 spaces but found 10
? multiSelectControl({ testId: 'data-input-select-multi-jsonbArrayType' })

Check failure on line 210 in src/QueryBuilder/QueryBuilder/QueryBuilderModal/DataTypeInput/DataTypeInput.js

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

Expected indentation of 8 spaces but found 12
: textControl({ testId: 'data-input-text-jsonbArrayType' });

Check failure on line 211 in src/QueryBuilder/QueryBuilder/QueryBuilderModal/DataTypeInput/DataTypeInput.js

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

Expected indentation of 8 spaces but found 12

case DATA_TYPES.EnumType:
return arrayLikeTypeControls();
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ const arr = [
componentTestId: 'data-input-text-arrayType',
onChange: jest.fn(),
},
{
dataType: DATA_TYPES.JsonbArrayType,
operator: OPERATORS.CONTAINS,
componentTestId: 'data-input-text-jsonbArrayType',
onChange: jest.fn(),
},
{
dataType: DATA_TYPES.EnumType,
operator: OPERATORS.EQUAL,
Expand Down
2 changes: 2 additions & 0 deletions src/QueryBuilder/QueryBuilder/helpers/valueBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export const valueBuilder = ({ value, field, operator, fieldOptions, intl, timez

[DATA_TYPES.ArrayType]: () => (isArray ? getCommaSeparatedStr(value) : getQuotedStr(value, isInRelatedOperator)),

[DATA_TYPES.JsonbArrayType]: () => (isArray ? getCommaSeparatedStr(value) : getQuotedStr(value, isInRelatedOperator)),

Check failure on line 55 in src/QueryBuilder/QueryBuilder/helpers/valueBuilder.js

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

This line has a length of 122. Maximum allowed is 120

[DATA_TYPES.EnumType]: () => (isArray ? getCommaSeparatedStr(value) : getQuotedStr(value, isInRelatedOperator)),

[DATA_TYPES.BooleanType]: () => getQuotedStr(value, isInRelatedOperator),
Expand Down

0 comments on commit 44229c6

Please sign in to comment.