-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Add records.delete
RPC function
#3741
Conversation
@Anish9901 This shouldn't be merged until after #3740 , but can be reviewed now. |
) INTO num_deleted; | ||
RETURN num_deleted; | ||
END; | ||
$$ LANGUAGE plpgsql RETURNS NULL ON NULL INPUT; |
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.
Would there be any performance benefits by converting this function to SQL? I guess we couldn't make it STABLE
since it does modify the database.
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.
we actually can't change this to an SQL function, since there wouldn't be a way to get the schema, table, or pkey column names. The overall flow of "build a string of the SQL to execute, then run it" doesn't work in SQL functions.
Fixes #3737
Adds a
records.delete
function.Technical details
As with the old REST endpoint, this function takes an array of records to delete (for a single table).
The function is documented, and should be self-explanatory.
Screenshots
Checklist
Update index.md
).develop
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin