Skip to content

SqlBuilder: Added alias support - #119

Closed
norbe wants to merge 1 commit into
nette:masterfrom
norbe:kh-added-alias-support
Closed

SqlBuilder: Added alias support#119
norbe wants to merge 1 commit into
nette:masterfrom
norbe:kh-added-alias-support

Conversation

@norbe

@norbe norbe commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

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'.

@norbe
norbe force-pushed the kh-added-alias-support branch 2 times, most recently from a8819a7 to 9521ed6 Compare March 4, 2016 13:01
@norbe

norbe commented Mar 5, 2016

Copy link
Copy Markdown
Contributor Author

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..

@Unlink

Unlink commented Mar 5, 2016

Copy link
Copy Markdown
Contributor

You should use code-checker -f to fix this.

@janpecha

janpecha commented Mar 6, 2016

Copy link
Copy Markdown

@norbe
norbe force-pushed the kh-added-alias-support branch from 9521ed6 to f43aaf3 Compare March 6, 2016 18:40
@norbe

norbe commented Mar 6, 2016

Copy link
Copy Markdown
Contributor Author

@Unlink, @janpecha: Thanks

@norbe

norbe commented Mar 20, 2016

Copy link
Copy Markdown
Contributor Author

@dg Can I do somethink for merge of this feature?

Comment thread src/Database/Table/Selection.php Outdated


/**
* Alias table

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aliases table.

@norbe
norbe force-pushed the kh-added-alias-support branch from f43aaf3 to 99fe59e Compare March 21, 2016 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants