Its nip a bug day here in the Moose-Pen.
Over the past few days I have been slowly cleaning up my tests and now I am going to fix one more little problem I was having with Database::Accessor; Setting the 'view/table' of an element/field that is being passed down into a DAD.
I do have this working for most of the parts that I am sending down to the DAD but I am still missing this functionality on the 'sort/order by' so lets look at that test as a start;
my $tests = [{
key =>'sorts',
sorts => [
…
Another test postette today here in the Moose-Pen;
Carrying on from yesterday I took the time today to first add in this to my new test call
...
$da->retrieve($self->connect());
-- my $ok = ok(
++ my $ok = ok(
$da->result()->query() eq $test->{sql},
$test->{caption} . " SQL correct"
);
++ unless($ok){
++ diag("Expected SQL--> ".$test->{sql}."\nGenerated Out-> ".$da->result()->query());
++ }
…
What the above do…
It quick postette day again here in the Moose-Pen
Just a quick one off re-factor for today. In the past few days I have been using a code snipitte like this;
my $tests = [{
key =>'sorts',
sorts => [
{name => 'last_name',
view => 'people'
},
{
name => 'first_name',
view => 'people'
},
],
caption => "Order by ",
sql => "SELECT people.first_name, peop…
Its sort day here in the Moose-Pen.
Well I have been on a role since I started on 'Group By' so I figure I might as well get the last of the base SQL code snippets in place. The last one is 'sort' or in SQL 'ORDER BY' and why change something that isn't broke here is a new test case '60_order_by.t' and here it the hash I am going to start with;
my $tests = [{
key =>'sorts',
sorts => [
{name => 'last_na…
It another gather day here in the Moose-Pen.
Now that I did the re-factoring for gather it is time to move on the Driver::DBI and do to code to generate the SQL. Of course I always start with a test case and this time it is a new one 50_having.t. It is much the same as the other test cases so no need to repeat that here, the only important bit is this hash;
my $tests = [{
index=>0,
key =>'gather',
gather =>{
…