Add a decorator for creating table via class-style.#823
Open
YogiLiu wants to merge 7 commits intokayak:masterfrom
Open
Add a decorator for creating table via class-style.#823YogiLiu wants to merge 7 commits intokayak:masterfrom
YogiLiu wants to merge 7 commits intokayak:masterfrom
Conversation
AzisK
reviewed
Nov 2, 2025
| customers = Table('customers') | ||
| q = Query.from_(customers).select(customers.id, customers.fname, customers.lname, customers.phone) | ||
|
|
||
| The table also can create via class-style: |
Contributor
There was a problem hiding this comment.
Suggested change
| The table also can create via class-style: | |
| The table can also be created via class-style: |
AzisK
reviewed
Nov 2, 2025
| self.assertEqual('"f"', T.f.get_sql(with_alias=True, quote_char='"')) | ||
| self.assertEqual(id(T), id(T.f.table)) | ||
|
|
||
| def test_table_with_field_and_ailas(self): |
Contributor
There was a problem hiding this comment.
Suggested change
| def test_table_with_field_and_ailas(self): | |
| def test_table_with_field_and_alias(self): |
AzisK
approved these changes
Nov 2, 2025
Contributor
AzisK
left a comment
There was a problem hiding this comment.
It looks good. Thanks for your work. Could you resolve the conflicts and updater with master branch?
2187289 to
1eb4ecb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This feature add a decorator to create table via class-style, it's friendly to type hint.
The decorator's parameters are same as
Table.__init__.