Skip to content

Instantly share code, notes, and snippets.

@brianjmiller
Created April 8, 2011 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianjmiller/909833 to your computer and use it in GitHub Desktop.
Save brianjmiller/909833 to your computer and use it in GitHub Desktop.
Use of RDBO query builder
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