Module: MySql::Pervasive::DatasetMethods
- Defined in:
- lib/sequel/mysql_pervasive_adapter.rb
Instance Method Summary collapse
- #convert_aliased_col_to_real_col(col_name) ⇒ Object
- #convert_aliased_col_to_real_col_with_model(col_name, model) ⇒ Object
- #quoted_identifier(name, convert = true) ⇒ Object
- #select_clause_methods ⇒ Object
- #select_limit_sql(sql) ⇒ Object
Instance Method Details
#convert_aliased_col_to_real_col(col_name) ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 45 def convert_aliased_col_to_real_col(col_name) if respond_to?(:model) and model.respond_to?(:aliases) and model.aliases sym_name = col_name.to_s.downcase.to_sym col_name = model.aliases[sym_name].to_s if model.aliases.include? sym_name end col_name end |
#convert_aliased_col_to_real_col_with_model(col_name, model) ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 54 def convert_aliased_col_to_real_col_with_model(col_name, model) if model.respond_to?(:aliases) and model.aliases sym_name = col_name.to_s.downcase.to_sym col_name = model.aliases[sym_name].to_s.upcase if model.aliases.include? sym_name end col_name end |
#quoted_identifier(name, convert = true) ⇒ Object
41 42 43 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 41 def quoted_identifier(name, convert=true) convert ? "`#{convert_aliased_col_to_real_col(name)}`" : "`#{name.downcase}`" end |
#select_clause_methods ⇒ Object
33 34 35 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 33 def select_clause_methods super end |
#select_limit_sql(sql) ⇒ Object
37 38 39 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 37 def select_limit_sql(sql) super(sql) end |