I think it makes more sense to have the order be reversed than how it
is now.
Now:
{ :year => :yearColumn } #=> year AS yearColumn
This disagrees with Hash convention, since the statement after the AS
is the key.
I modified my sequel by overriding one method:
module Sequel::Dataset::SQL
def column_list(columns)
if columns.empty?
WILDCARD
else
m = columns.map do |i|
i.is_a?(Hash) ? i.map {|kv| "#{literal(kv[1])} AS
#{quote_column_ref(kv[0])}"} : literal(i)
end
m.join(COMMA_SEPARATOR)
end
end
end
Hope this makes sense.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---