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

feat(jx): re-add registrations #99

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Conversation

eventualbuddha
Copy link
Collaborator

No description provided.

Comment on lines +85 to +102
SELECT
rr.id,
rr.payload,
rr.certificates,
rr.signature,
rr.created_at
FROM
objects AS rr
WHERE
rr.object_type = $1
AND
NOT EXISTS (
SELECT 1
FROM objects AS r
WHERE r.object_type = $2
AND rr.id = (convert_from(r.payload, 'UTF8')::jsonb ->> $3)::uuid
)
ORDER BY rr.created_at DESC
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@benadida mind taking a look at my poor man's foreign key join?

Copy link
Contributor

Choose a reason for hiding this comment

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

that should work. Not super efficient because can't index the payload fields, but should be good for now.

@eventualbuddha eventualbuddha merged commit 44b526d into main Apr 2, 2024
37 checks passed
@eventualbuddha eventualbuddha deleted the feat/jx/re-add-registrations branch April 2, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants