Created
April 8, 2011 13:31
-
-
Save brianjmiller/909833 to your computer and use it in GitHub Desktop.
Use of RDBO query builder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $st = Rose::DB::Object::QueryBuilder::build_select( | |
query_is_sql => 1, | |
db => $self->db, | |
select => 'status_code, COUNT(*) AS tally', | |
tables => [ Bikes::M::Inventory->meta->table ], | |
columns => { Bikes::M::Inventory->meta->table => [ qw( variant_id status_code ) ] }, | |
group_by => 'status_code', | |
query => [ | |
variant_id => $self->id, | |
], | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment