I see where you're coming from, but the current behavior makes more
sense to me. I can write a

  dataset.select(:id)

and go in later and add a => :table_id

  dataset.select(:id => :table_id)

This feels more intuitive, although semantically it might not be
correct.

On Jan 15, 11:10 pm, Kanwei <[EMAIL PROTECTED]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to