datamapper / dm-aggregates

DataMapper plugin providing support for aggregates on collections
http://datamapper.org/
MIT License
16 stars 15 forks source link

Aggregates support for YAML #4

Closed solnic closed 11 years ago

solnic commented 13 years ago

dm-aggregates should support YAML-based models.

Currently, merb-admin used on a YAML-based database raises this exception:

undefined method `aggregate' for DataMapper::Adapters::YamlAdapter

A more complete backtrace:

undefined method `aggregate' for #<DataMapper::Adapters::YamlAdapter:0x7f06eed16090> - (NoMethodError)
/tmp/t/gems/gems/dm-aggregates-0.10.2/lib/dm-aggregates/repository.rb:6:in `aggregate'
/tmp/t/gems/gems/dm-aggregates-0.10.2/lib/dm-aggregates/aggregate_functions.rb:168:in `aggregate'
/tmp/t/gems/gems/dm-aggregates-0.10.2/lib/dm-aggregates/aggregate_functions.rb:40:in `count'
/tmp/t/gems/gems/merb-admin-0.8.1/lib/datamapper_support.rb:13:in `count'
/tmp/t/gems/gems/merb-admin-0.8.1/lib/datamapper_support.rb:28:in `paginated'
/tmp/t/gems/gems/merb-admin-0.8.1/app/controllers/main.rb:28:in `list'

Created by gioele - 2010-05-13 13:32:29 UTC

Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/1268

solnic commented 13 years ago

Tagging this as suggestion.

I don’t know if this specific feature will make it into dm-aggregates without someone who is interested in implementing it takes it on. Unfortunately this is the only request I’ve heard for adding aggregate support for YAML.

The DM2 query engine will likely provide aggregate support across all adapters, but it won’t be ready for at least 6-12 months. In the meantime you can track it’s development here:

http://github.com/dkubb/veritas/

by Dan Kubb (dkubb)

solnic commented 13 years ago

I’d also like to see aggregate support for the YAML adapter.

by micah.alles

dkubb commented 11 years ago

I'm going to mark this as closed, since it won't make it into DM1. The aggregate component is built into DM2, and will be handled there.