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

chore(rethinkdb): RetroReflection: Phase 1 #9820

Merged
merged 13 commits into from
Jun 25, 2024
Merged

Conversation

mattkrick
Copy link
Member

@mattkrick mattkrick commented Jun 4, 2024

Description

Phase 1 inserts & updates all rows to PG.

I also refactored some reads to using the dataloader so Phase 3 will go more smoothly.

To test, just run a retrospective meeting & make sure you can CRUD the reflections like normal

@github-actions github-actions bot added the size/l label Jun 4, 2024
@github-actions github-actions bot added size/m and removed size/l labels Jun 4, 2024
mattkrick added 2 commits June 4, 2024 14:23
Signed-off-by: Matt Krick <[email protected]>
@mattkrick mattkrick requested a review from nickoferrall June 5, 2024 17:01
Copy link
Contributor

@nickoferrall nickoferrall left a comment

Choose a reason for hiding this comment

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

Works! I had to wipe my dbs clean as I was getting some errors running migrations, but with a fresh db, it's all working swimmingly

export const toGoogleAnalyzedEntityPG = (entities: GoogleAnalyzedEntity[]) =>
sql<
string[]
>`(select coalesce(array_agg((name, salience, lemma)::"GoogleAnalyzedEntity"), '{}') from json_populate_recordset(null::"GoogleAnalyzedEntity", ${JSON.stringify(entities)}))`
Copy link
Member Author

Choose a reason for hiding this comment

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

we have to be complex here to handle entities like Google, Inc. since that name is stored in a composite type & it has a comma in it.

@mattkrick mattkrick merged commit 92247eb into master Jun 25, 2024
6 checks passed
@mattkrick mattkrick deleted the retroReflection-phase1e branch June 25, 2024 19:27
@github-actions github-actions bot mentioned this pull request Jun 25, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants