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

When using 'oracle_enhanced', remove 'AS' on the table_name alias. #298

Merged
merged 2 commits into from
Apr 27, 2018

Conversation

kimufly
Copy link
Contributor

@kimufly kimufly commented Feb 1, 2018

When used on table name alias, Oracle Database don't support used 'AS'.


# table_name alias keyword , like "AS". When used on table name alias, Oracle Database don't support used 'AS'
def t_alias_keyword
(ActiveRecord::Base.connection.adapter_name.to_sym == :OracleEnhanced) ? "" : :AS
Copy link
Member

Choose a reason for hiding this comment

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

why :AS is symbol instead of a string ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When using #{} to embed string, there is no difference in symbol or string. Using symbols is my habit.

Copy link
Contributor Author

@kimufly kimufly left a comment

Choose a reason for hiding this comment

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

When using #{} to embed string, there is no difference in symbol or string. Using symbols is my habit.


# table_name alias keyword , like "AS". When used on table name alias, Oracle Database don't support used 'AS'
def t_alias_keyword
(ActiveRecord::Base.connection.adapter_name.to_sym == :OracleEnhanced) ? "" : :AS
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When using #{} to embed string, there is no difference in symbol or string. Using symbols is my habit.

@mceachen mceachen merged commit d0d769e into ClosureTree:master Apr 27, 2018
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