-
Notifications
You must be signed in to change notification settings - Fork 119
Conversation
735e7d1
to
ca5982b
Compare
There was a problem hiding this 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
plugins/@grouparoo/salesforce/src/lib/export-account/exportRecords.ts
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,60 @@ | |||
import { |
There was a problem hiding this comment.
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,
});
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work!
Change description
This PR contains the most common usages of the Salesforce destination split out into separated destinations.
Checklists
Development
Impact
Please explain any security, performance, migration, or other impacts if relevant:
Code review