-
-
Notifications
You must be signed in to change notification settings - Fork 90
feat(clerk): Add CRUD endpoints to existing objects #541
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR adds CRUD (Create, Read, Update, Delete) functionality to the Clerk Foreign Data Wrapper, extending it beyond read-only SELECT operations to support data modification operations.
Key Changes:
- Implemented INSERT, UPDATE, and DELETE operations using HTTP POST, PATCH, and DELETE methods respectively
- Added
rowid_column 'id'option to all table definitions to enable row identification for updates and deletes - Updated documentation to reflect new CRUD capabilities for each supported object type
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| wasm-wrappers/fdw/clerk_fdw/src/lib.rs | Implements begin_modify, insert, update, and delete functions with HTTP request handling for various Clerk API endpoints; adds rowid_column option to all table definitions |
| docs/catalog/clerk.md | Updates operation support tables to show INSERT/UPDATE/DELETE capabilities per object type; adds data modification examples demonstrating CRUD operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
docs/catalog/clerk.md
Outdated
|
|
||
| ```sql | ||
| -- Create a new user | ||
| INSERT INTO clerk.users (attrs) VALUES ('{"email_address": "user@example.com", "password": "secure123"}'); |
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.
The email_address is a string array, can you fix this example?
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.
Updated!
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
Additional context