-
-
Notifications
You must be signed in to change notification settings - Fork 110
SqlBuilder: Added alias support #119
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
Conversation
a8819a7 to
9521ed6
Compare
|
Can someone tell me what is wrong in SqlBuilder.addAlias().phpt? From "[FOUND] tests/Database/Table/SqlBuilder.addAlias().phpt -1 bytes of whitespaces" I really don't know what is wrong.. |
|
You should use |
|
@norbe missing newline at end of file, see https://github.com/nette/database/pull/119/files#diff-736e93a1f9065b1b46a47c182c44e663R103 |
9521ed6 to
f43aaf3
Compare
|
@dg Can I do somethink for merge of this feature? |
src/Database/Table/Selection.php
Outdated
|
|
||
|
|
||
| /** | ||
| * Alias table |
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.
Aliases table.
f43aaf3 to
99fe59e
Compare
|
Anything else? |
|
@norbe Thank you! |
|
Can I check coding standard automatically somehow for future? |
|
Unfortunatelly I haven't tool for checking coding style. |
This patch allows to specify alias for given table chain. Aliases can be even nested.
I have also added some checks if table alias is unique. Old behaviour in some cases silently skip tables or just works weird. It can found some hidden bugs in application. For example $context->table('book')->select('book.author.column') was translated to 'book.column'.