Skip to content
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

Fix command::executeResetSequence() quote table and column names #16827

Closed

Conversation

CedricYii
Copy link
Contributor

@CedricYii CedricYii commented Oct 26, 2018

Q A
Is bugfix? yes
New feature? no
Breaks BC? no
Tests pass? yes
Fixed issues

Keeps quoting logic of the framework for table and column names

Fix potential wrong behavior when used with PDO::CASE_LOWER
@samdark samdark added the pr:missing usecase It is not clear what is the use case for the pull request. label Oct 26, 2018
@yii-bot
Copy link

yii-bot commented Oct 26, 2018

Thank you for putting effort in the improvement of the Yii framework.
We have reviewed your pull request.

Unfortunately a use case is missing. It is required to get a better understanding of the pull request and helps us to determine the necessity and applicability of the suggested change to the framework.

Could you supply us with a use case please? Please be as detailed as possible and show some code!

Thanks!

This is an automated comment, triggered by adding the label pr:missing usecase.

@CedricYii
Copy link
Contributor Author

Quoting Table and Column Names

When writing database-agnostic code, properly quoting table and column names is often a headache because different databases have different name quoting rules. To overcome this problem, you may use the following quoting syntax introduced by Yii:

[[column name]]: enclose a column name to be quoted in double square brackets;
{{table name}}: enclose a table name to be quoted in double curly brackets.

Yii DAO will automatically convert such constructs into the corresponding quoted column or table names using the DBMS specific syntax.
https://www.yiiframework.com/doc/guide/2.0/en/db-dao#quoting-table-and-column-names

@rob006
Copy link
Contributor

rob006 commented Oct 29, 2018

But this is query builder for specific database, why do you want to use database-agnostic approach in database-specific context?

@samdark
Copy link
Member

samdark commented Oct 29, 2018

As @rob006 said, that's specific database type you've changed it in. Do you intend to solve a problem you have? If so, which one?

@samdark
Copy link
Member

samdark commented Aug 27, 2019

Closing since initial problem was not clear.

@samdark samdark closed this Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:missing usecase It is not clear what is the use case for the pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants