Gantry
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Gantry/Plugins/AutoCRUDHelper/CDBI.pm view on Meta::CPAN
}
sub retrieve {
my $class = shift;
my $gantry_site = shift;
my $id = shift;
return $gantry_site->get_model_name()->retrieve( $id );
}
sub update {
my $class = shift;
my $gantry_site = shift;
my $row = shift;
my $params = shift;
$row->set( %{ $params } );
$row->update;
$row->dbi_commit; # XXX check autocommit flag
}
lib/Gantry/Plugins/AutoCRUDHelper/DBIxClass.pm view on Meta::CPAN
my $id = shift;
my $schema = $gantry_site->get_schema();
my $table_name = $gantry_site->get_model_name->table_name();
my $retrow = $schema->resultset( $table_name )->find( $id );
return $retrow;
}
sub update {
my $class = shift;
my $gantry_site = shift;
my $row = shift;
my $params = shift;
my $schema = $gantry_site->get_schema();
$schema->txn_begin();
$row->update( $params );
$row->discard_changes();
lib/Gantry/Utils/Model.pm view on Meta::CPAN
my $dbh = $self->db_Main();
my $sth = $dbh->prepare( $sql );
$sth->execute();
undef %$self;
bless $self, 'Deleted::Object';
return 1;
}
sub update {
my $self = shift;
# build set clause for dirty cols
my @dirty_cols = keys %{ $self->{__DIRTY__} };
my @new_values;
foreach my $dirty_col ( @dirty_cols ) {
my $value = $self->quote_attribute( $dirty_col );
push @new_values, "$dirty_col=$value";
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.181 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )