Skip to content

Commit

Permalink
Add 3rd example of col info in ResultSource->add_column
Browse files Browse the repository at this point in the history
Rather than just say "it's a hashref", provide a simple example of what that
hashref might look like.
  • Loading branch information
Mintywalker authored and ribasushi committed Jul 24, 2014
1 parent 0f0d19a commit 0f3ce80
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/DBIx/Class/ResultSource.pm
Expand Up @@ -143,6 +143,11 @@ sub new {
$source->add_columns('col1' => \%col1_info, 'col2' => \%col2_info, ...);
$source->add_columns(
'col1' => { data_type => 'integer', is_nullable => 1, ... },
'col2' => { data_type => 'text', is_auto_increment => 1, ... },
);
Adds columns to the result source. If supplied colname => hashref
pairs, uses the hashref as the L</column_info> for that column. Repeated
calls of this method will add more columns, not replace them.
Expand Down

0 comments on commit 0f3ce80

Please sign in to comment.