-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Implement tables.add
rpc endpoint
#3614
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.
Looks good to me. Nice work!
created_table_oid = create_table_on_database( | ||
table_name, schema_oid, conn, column_data_list, constraint_data_list, comment | ||
) | ||
return created_table_oid |
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 may need to enhance this return value. The current endpoint returns a blob describing the created table whenever one is created. OTOH, the only info in the blob we have set up for tables.list
which wouldn't have been directly submitted is the OID, which this does return.
Let's merge as-is, and keep a mental note to watch for feature requests from the front end on this.
@@ -74,6 +74,28 @@ def from_dict(cls, col_default): | |||
) | |||
|
|||
|
|||
class CreateableColumnInfo(TypedDict): |
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.
At some point, we need to figure out a way to use inheritance here in a way that preserves the documentary value of these classes.
Fixes #3613
tables.add
allows for creating an empty mathesar table, or a table with predefined columns and constraints. It doesn't however, allow creating a table via import, we'll have a separate endpoint(table.import
) for being able to add a table via import.Checklist
Update index.md
).develop
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin