On Wednesday, January 2, 2013 11:05:56 AM UTC-8, elskwid wrote:
>
> Howdy folks, 
> > It's certainly possible to add such methods via extensions, which would 
> allay my concerns about memory use. However, one extension per method seems 
> rather extreme. If someone can come up with additional methods they would 
> want to add to the extension, and a good name for the extension, I'll 
> certainly consider it for inclusion. 
>
> Is there a case for sequel-more (or whatever) that could be more 
> experimental. You know, opt-in bloat, like a large meal, or ActiveSupport. 
> Perhaps a proving ground for extension methods to test their mettle. 
>

Sequel extensions don't have the name sequel in them, since they are used 
like "Sequel.extension :extension_name".  "Sequel.extension :more" doesn't 
sound good to me.
 

>
> Is there stuff that is currently in core or has been loosely considered 
> that could have a life in sequel-more? 
> > Note that having_more doesn't make sense, since Dataset#having already 
> acts like Dataset#where (it appends to the existing HAVING filter, it 
> doesn't override it). 
>
> The `#group_more` syntax is okay but I would really like it if these kinds 
> of options could just be chained and added like `#filter` is. 
>
>   DB[:items].group(:id) # SELECT * FROM items GROUP BY id 
>   DB[:items].group(:id, :name) # SELECT * FROM items GROUP BY id, name 
>   DB[:items].group(:id).group(:name) # SELECT * FROM items GROUP BY id, 
> name 
>
>
> Just glancing at the source shows that columns is already enumerable. 
> Worth hacking on? 
>

This can't be done without breaking much existing code.  Dataset#group has 
always overridden an existing group, similar to #select and #order, and 
unlike the filter methods.  I don't think it makes sense to change this 
behavior.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/fOrMr8pL54MJ.
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