### ----------------------------------------------------
### -- SQL::Builder
### -- Licenses: Artistic-2.0
### -- Authors: Adrian Kreher
### -- File: t/11-having.rakutest
### ----------------------------------------------------
use Test;
use SQL::Builder;

my $sql = SQL::Builder.new;

subtest 'basic having test', {
    given $sql.from('table').select('foo').group-by('foo').having([Fn.new('sum', 'length'), '>', 7200]).build {
        is .sql, 'SELECT "foo" FROM "table" GROUP BY "foo" HAVING sum("length") > ?';
        is .bind, [7200,];
    }
};

done-testing;


