Its gather in the dream day here in the Moose-pen
Well going to skip a post on creating a gaggle of new tests today and instead do some core coding in Driver::DBI and Database::Accessor. Now believe it or not I had a dream last night that something was wrong in the way I set the architecture of Grathers and Filters, GROUP BY and , HAVING in SQL, in Database::Accessor. Boy this does sound corny!. So today I started to look at that part of my code.
In the original Data::Accessor a 'GROUP BY' and 'HAVING' looked like this
{ table => { name => 'people },
fields => [ {name => 'first_name', } ],
group_by =>[{name=>'first_name'},
{name=>'last_name'}, ],
having => [{ field => { name => 'last_name' }, param => 'Blog',}],
}
and in my new incarnation it aped it to be much the same like this
{ view => { name => 'people' },
elements => [ {name => 'first_name', } ],
gather =>[{name=>'first_name'},
{name=>'last_name'}],
filter => [{ left => { name => 'last_name' }, right=>{value => 'Blog',}],
}
expecting and SQL like this
SELECT people.first_name FROM people GROUP BY people.first_name,people.last_name HAVING people.last_name = ?