Skip to content

Use quote method rather than single quotes to identifiers in SQL - #29612

Merged
rafaelfranca merged 1 commit into
rails:masterfrom
kamipo:use_quote_method_rather_than_single_quote
Jun 28, 2017
Merged

rafaelfranca merged 1 commit into
rails:masterfrom
kamipo:use_quote_method_rather_than_single_quote

Conversation

@kamipo

@kamipo kamipo commented Jun 28, 2017

Copy link
Copy Markdown
Member

Because identifiers in SQL could include a single quote.

Related #24950, #26784.

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.

Is this change related to the original topic to use quote method?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Actually no. I'll removing this change.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed!

@kamipo
kamipo force-pushed the use_quote_method_rather_than_single_quote branch from 0b9be59 to 6d99a6f Compare June 28, 2017 17:35

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.

Do we need to receive the name since we never pass it when calling?

@kamipo
kamipo force-pushed the use_quote_method_rather_than_single_quote branch from 6d99a6f to 3b152f1 Compare June 28, 2017 18:03

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do we need to receive the name since we never pass it when calling?

No, the name arg was only used in previous change. I removed the arg.

@rafaelfranca

Copy link
Copy Markdown
Member

Test seems to be broken

Because identifiers in SQL could include a single quote.

Related rails#24950, rails#26784.
@kamipo
kamipo force-pushed the use_quote_method_rather_than_single_quote branch from 3b152f1 to ede8da4 Compare June 28, 2017 19:18
@kamipo

kamipo commented Jun 28, 2017

Copy link
Copy Markdown
Member Author

Ah... it is a typo. I fixed it now.

@rafaelfranca
rafaelfranca merged commit 9c49b33 into rails:master Jun 28, 2017
@kamipo
kamipo deleted the use_quote_method_rather_than_single_quote branch June 28, 2017 21:38
DanielaVelasquez pushed a commit to DanielaVelasquez/rails that referenced this pull request Oct 3, 2024
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.

3 participants