MySQL dialect translator class.
The main rule for the MySQL DELETE query syntax
The main rule for the MySQL SELECT query syntax
Forms a string for the FROM clause from the objects attributes @attr_from and @attr_index_hints
# File lib/dialects/mysql-exporter.rb, line 77 def attr_from ( obj ) result = "" if obj.attr_from result = "FROM " + to_sWithAliasesIndexes( obj, obj.attr_from.val ) end return result end
Returns a string of objects in list merged with indexes of obj
# File lib/dialects/mysql-exporter.rb, line 92 def to_sWithAliasesIndexes ( obj, list ) list = [ list ] if ! [ Array, SQLValList, SQLAliasedList ].include? list.class arr = [ ] list.each_with_index do |item,i| _alias = item.alias ? " " + item.alias.to_s : "" str = item.to_s + _alias if obj.attr_index_hints index_hash = obj.attr_index_hints[i] str += " " + index_hash[:type] + " " + index_hash[:list].to_s end arr << str end return arr.join ',' end
Generated with the Darkfish Rdoc Generator 2.