Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Postgres Node): Add option IS NOT NULL and hide value input fields #9241

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,22 @@ export const selectRowsFixedCollection: INodeProperties = {
name: 'Is Null',
value: 'IS NULL',
},
{
name: 'Is Not Null',
value: 'IS NOT NULL',
},
],
default: 'equal',
},
{
displayName: 'Value',
name: 'value',
type: 'string',
displayOptions: {
hide: {
condition: ['IS NULL', 'IS NOT NULL'],
},
},
default: '',
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/MySql/v2/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export function addWhereClauses(
}

let valueReplacement = ' ';
if (clause.condition !== 'IS NULL') {
if (clause.condition !== 'IS NULL' && clause.condition !== 'IS NOT NULL') {
valueReplacement = ' ?';
values.push(clause.value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,22 @@ export const whereFixedCollection: INodeProperties = {
name: 'Is Null',
value: 'IS NULL',
},
{
name: 'Is Not Null',
value: 'IS NOT NULL',
},
],
default: 'equal',
},
{
displayName: 'Value',
name: 'value',
type: 'string',
displayOptions: {
hide: {
condition: ['IS NULL', 'IS NOT NULL'],
},
},
default: '',
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/Postgres/v2/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export function addWhereClauses(
replacementIndex = replacementIndex + 1;

let valueReplacement = '';
if (clause.condition !== 'IS NULL') {
if (clause.condition !== 'IS NULL' && clause.condition !== 'IS NOT NULL') {
valueReplacement = ` $${replacementIndex}`;
values.push(clause.value);
replacementIndex = replacementIndex + 1;
Expand Down
Loading