mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-24 11:02:12 -08:00
feat(Postgres Node): Add option IS NOT NULL and hide value input fields (#9241)
This commit is contained in:
parent
ddff80416d
commit
e896889394
|
@ -279,6 +279,10 @@ export const selectRowsFixedCollection: INodeProperties = {
|
|||
name: 'Is Null',
|
||||
value: 'IS NULL',
|
||||
},
|
||||
{
|
||||
name: 'Is Not Null',
|
||||
value: 'IS NOT NULL',
|
||||
},
|
||||
],
|
||||
default: 'equal',
|
||||
},
|
||||
|
@ -286,6 +290,11 @@ export const selectRowsFixedCollection: INodeProperties = {
|
|||
displayName: 'Value',
|
||||
name: 'value',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
hide: {
|
||||
condition: ['IS NULL', 'IS NOT NULL'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
],
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -263,6 +263,10 @@ export const whereFixedCollection: INodeProperties = {
|
|||
name: 'Is Null',
|
||||
value: 'IS NULL',
|
||||
},
|
||||
{
|
||||
name: 'Is Not Null',
|
||||
value: 'IS NOT NULL',
|
||||
},
|
||||
],
|
||||
default: 'equal',
|
||||
},
|
||||
|
@ -270,6 +274,11 @@ export const whereFixedCollection: INodeProperties = {
|
|||
displayName: 'Value',
|
||||
name: 'value',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
hide: {
|
||||
condition: ['IS NULL', 'IS NOT NULL'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
],
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue