Skip to content

Commit

Permalink
feat(Postgres Node): Add resource mapper to new version of Postgres n…
Browse files Browse the repository at this point in the history
…ode (#5814)

* ⚡ scaffolding
* ⚡ finished scaffolding
* ⚡ renamed types
* ⚡ updated subtitle
* ⚡ renamed functions file, UI updates
* ⚡ query parameters fixes, ui updates, refactoring
* ⚡ fixes for credentials test, setup for error parsing
* ⚡ rlc for schema and table, error handling tweaks
* ⚡ delete operation, new options
* ⚡ columns loader
* ⚡ linter fixes
* ⚡ where clauses setup
* ⚡ logic for processing where clauses
* ⚡ select operation
* ⚡ refactoring
* ⚡ data mode for insert and update, wip
* ⚡ data mapping, insert update, skip on conflict option
* ⚡ select columns with spaces fix
* ⚡ update operation update, wip
* ⚡ finished update operation
* ⚡ upsert operation
* ⚡ ui fixes
* Copy updates.
* Copy updates.
* ⚡ option to convert empty strings to nulls, schema checks
* ⚡ UI requested updates
* ⚡ ssh setup WIP
* ⚡ fixes, ssh WIP
* ⚡ ssh fixes, credentials
* ⚡ credentials testing update
* ⚡ uncaught error fix
* ⚡ clean up
* ⚡ address in use fix
* ⚡ improved error message
* ⚡ tests setup
* ⚡ unit tests wip
* ⚡ config files clean up
* ⚡ utils unit tests
* ⚡ refactoring
* ⚡ setup for testing operations, tests for deleteTable operation
* ⚡ executeQuery and insert operations tests
* ⚡ select, update, upsert operations tests
* ⚡ runQueries tests setup
* ⚡ hint to query
* Copy updates.
* ⚡ ui fixes
* ⚡ clean up
* ⚡ error message update
* ⚡ ui update
* Minor tweaks to query params decription.
* ✨ Updated Postgres node to use resource mapper component
* ✨ Implemented postgres <-> resource mapper type mapping
* ✨ Updated Postgres node execution to use resource mapper fields in v3
* 🔥 Removing unused import
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
  • Loading branch information
MiloradFilipovic committed Mar 30, 2023
1 parent 8f3cb59 commit 0f43dc5
Show file tree
Hide file tree
Showing 32 changed files with 4,267 additions and 407 deletions.
104 changes: 104 additions & 0 deletions packages/nodes-base/credentials/Postgres.credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,109 @@ export class Postgres implements ICredentialType {
type: 'number',
default: 5432,
},
{
displayName: 'SSH Tunnel',
name: 'sshTunnel',
type: 'boolean',
default: false,
},
{
displayName: 'SSH Authenticate with',
name: 'sshAuthenticateWith',
type: 'options',
default: 'password',
options: [
{
name: 'Password',
value: 'password',
},
{
name: 'Private Key',
value: 'privateKey',
},
],
displayOptions: {
show: {
sshTunnel: [true],
},
},
},
{
displayName: 'SSH Host',
name: 'sshHost',
type: 'string',
default: 'localhost',
displayOptions: {
show: {
sshTunnel: [true],
},
},
},
{
displayName: 'SSH Port',
name: 'sshPort',
type: 'number',
default: 22,
displayOptions: {
show: {
sshTunnel: [true],
},
},
},
{
displayName: 'SSH User',
name: 'sshUser',
type: 'string',
default: 'root',
displayOptions: {
show: {
sshTunnel: [true],
},
},
},
{
displayName: 'SSH Password',
name: 'sshPassword',
type: 'string',
typeOptions: {
password: true,
},
default: '',
displayOptions: {
show: {
sshTunnel: [true],
sshAuthenticateWith: ['password'],
},
},
},
{
displayName: 'Private Key',
name: 'privateKey',
type: 'string',
typeOptions: {
rows: 4,
password: true,
},
default: '',
displayOptions: {
show: {
sshTunnel: [true],
sshAuthenticateWith: ['privateKey'],
},
},
},
{
displayName: 'Passphrase',
name: 'passphrase',
type: 'string',
default: '',
description: 'Passphase used to create the key, if no passphase was used leave empty',
displayOptions: {
show: {
sshTunnel: [true],
sshAuthenticateWith: ['privateKey'],
},
},
},
];
}
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/CrateDb/CrateDb.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
pgInsert,
pgQuery,
pgUpdate,
} from '../Postgres/Postgres.node.functions';
} from '../Postgres/v1/genericFunctions';

import pgPromise from 'pg-promise';

Expand Down
Loading

0 comments on commit 0f43dc5

Please sign in to comment.