1 package DBIx::Class::CDBICompat::LazyLoading;
7 return shift->columns('Essential');
11 my ($self, $col) = @_;
12 if ((ref $self) && (!exists $self->{'_column_data'}{$col})
13 && $self->{'_in_database'}) {
14 $self->_flesh(grep { exists $self->_column_groups->{$_}{$col}
16 keys %{ $self->_column_groups || {} });
18 $self->NEXT::get_column(@_[1..$#_]);
22 my ($self, @groups) = @_;
23 @groups = ('All') unless @groups;
25 $want{$_} = 1 for map { keys %{$self->_column_groups->{$_}} } @groups;
26 if (my @want = grep { !exists $self->{'_column_data'}{$_} } keys %want) {
27 my $sth = $self->_get_sth('select', \@want, $self->_table_name,
29 $sth->execute($self->_ident_values);
30 my @val = $sth->fetchrow_array;
32 foreach my $w (@want) {
33 $self->{'_column_data'}{$w} = shift @val;