-
-
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
Implement tables.get
rpc endpoint
#3612
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.
I have either one change to request, or a choice you made that I need to have explained to me: Why use get_
rather than get
in the RPC function?
- It makes the docs a little wonky, and
- Using the trailing underscore is typically reserved for situations where you want to avoid colliding with a keyword in python.
mathesar/rpc/tables.py
Outdated
@rpc_method(name="tables.get") | ||
@http_basic_auth_login_required | ||
@handle_rpc_exceptions | ||
def get_(*, table_oid: int, database_id: int, **kwargs) -> TableInfo: |
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.
I don't understand why you went with get_
here. get
isn't a keyword, is it?
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.
You are right, I erroneously thought it was a keyword. I've changed it to get
.
mathesar/rpc/tables.py
Outdated
@handle_rpc_exceptions | ||
def get_(*, table_oid: int, database_id: int, **kwargs) -> TableInfo: | ||
""" | ||
List information about a table for a schema. Exposed as `get_`. |
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.
Should be exposed as get
regardless.
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.
Okay, I think this is good to go once the tests pass.
Fixes #3611
Checklist
Update index.md
).develop
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin