This issue is relatively simple in concept but likely more complicated in execution.
We're developing endpoints for updating various tables in our database. Rather than create unique Database Client methods for each of these, let's create one which takes the table name, the row id, and a dictionary of columns and their new values, and edits that row accordingly.
Boring implementation stuff shield your eyes youths
The challenge is that we need to create a dynamic script that can accommodate all the use cases where we want to edit a table. We already have dynamic script logic within the database, but this one will be a bit more complex just because the table, columns, and even the identifier can vary.
This method can be used to update the logic of other, existing methods, such as update_user_api_key.
Constraints
It is assumed that only one table will be edited at a time, using this logic. You cannot edit two tables simultaneously
This issue is relatively simple in concept but likely more complicated in execution.
We're developing endpoints for updating various tables in our database. Rather than create unique Database Client methods for each of these, let's create one which takes the table name, the row id, and a dictionary of columns and their new values, and edits that row accordingly.
Boring implementation stuff shield your eyes youths
update_user_api_key
.Constraints