Skip to content
This repository was archived by the owner on Apr 12, 2022. It is now read-only.

Salesforce destination split out#2631

Merged
pauloouriques merged 7 commits into
mainfrom
feature/salesforce-split-out
Dec 14, 2021
Merged

Salesforce destination split out#2631
pauloouriques merged 7 commits into
mainfrom
feature/salesforce-split-out

Conversation

@pauloouriques
Copy link
Copy Markdown
Contributor

@pauloouriques pauloouriques commented Dec 2, 2021

Change description

This PR contains the most common usages of the Salesforce destination split out into separated destinations.

Checklists

Development

  • Application changes have been tested appropriately

Impact

  • Code follows company security practices and guidelines
  • Security impact of change has been considered
  • Performance impact of change has been considered
  • Possible migration needs considered (model migrations, config migrations, etc.)

Please explain any security, performance, migration, or other impacts if relevant:

Code review

  • Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached where applicable.
  • Relevant tags have been added to the PR (bug, enhancement, internal, etc.)

@pauloouriques pauloouriques force-pushed the feature/salesforce-split-out branch from 735e7d1 to ca5982b Compare December 7, 2021 01:23
@evantahler evantahler added plugin enhancement New feature or request labels Dec 7, 2021
Copy link
Copy Markdown
Member

@bleonard bleonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. I think there's some tactics to shred more code and make it more declarative as noted.

exportArrayProperties,
},
},
accountsDestinationConnection,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread plugins/@grouparoo/salesforce/src/lib/export-account/exportRecords.ts Outdated
Comment thread plugins/@grouparoo/salesforce/src/lib/export/model.ts Outdated
@@ -0,0 +1,60 @@
import {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is almost exactly the same as the -contacts (and -objects?) one. That's true for many of these files.
I feel like there is an oppurtunity have a meta concept where you pass what's important (model defaults, known special fields to a single method (or maybe one each) and get back all the methods that implement the destination. TSo the desitnation-specific code would all be in connection.

See how app-templates buildConnection is used here:
https://github.com/grouparoo/grouparoo/blob/main/plugins/%40grouparoo/postgres/src/lib/table-import/connection.ts

export function getConnection() {
  return buildConnection({
    apps: ["postgres"],
    name: "postgres-import-table",
    displayName: "Postgres Table Import",
    description: "Import or update Records from a Postgres database table.",
    tableOptionDescription: "The table to scan",
    getSampleRows,
    getColumns,
    getTables,
    getChangedRows,
    getPropertyValue,
    getPropertyValues,
    getChangedRowCount,
  });
}

Copy link
Copy Markdown
Member

@bleonard bleonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

Comment thread plugins/@grouparoo/salesforce/src/lib/export-contacts/model.ts
@pauloouriques pauloouriques merged commit b26b9bc into main Dec 14, 2021
@pauloouriques pauloouriques deleted the feature/salesforce-split-out branch December 14, 2021 21:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants