view release on metacpan or search on metacpan
lib/DBIx/Class/Result/ProxyField.pm view on Meta::CPAN
re defined update to adapt object field before update
=cut
sub update
{
my $self = shift;
my $rh_attrs = $_[0];
if (defined $rh_attrs)
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Result/Validation.pm view on Meta::CPAN
Update is done only if validate method return true
=cut
sub update {
my $self = shift;
if ( my $columns = shift ) {
$self->set_inflated_columns($columns);
}
return $self->_try_next_method( $self->next::can, @_ );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/ResultSet/Void.pm view on Meta::CPAN
my $query = $self->___get_primary_or_unique_key($hash, $attrs);
my $exists = $self->exists($query);
$self->create($hash) unless $exists;
}
sub update_or_create {
my $self = shift;
return $self->next::method(@_) if (defined wantarray);
my $attrs = (@_ > 1 && ref $_[$#_] eq 'HASH' ? pop(@_) : {});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/SaltedPasswords.pm view on Meta::CPAN
}
}
return $self->next::method(@_);
}
## copy of insert
sub update {
my $self = shift;
if ( $self->salted_enabled
&& $self->is_column_changed( $self->salted_column ) )
{
my $salt;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Row/Slave.pm view on Meta::CPAN
Throw exception if called via slave C<result_source>s.
=cut
sub update {
my $self = shift;
$self->throw_exception(
"Can't update via result source \"" . $self->result_source->source_name .
"\". This is slave connection."
view all matches for this distribution
view release on metacpan or search on metacpan
inc/DBIx/Class/TimeStamp.pm view on Meta::CPAN
}
return $self->next::method(@_);
}
sub update {
my $self = shift;
my $now = $self->get_timestamp();
my %dirty = $self->get_dirty_columns();
my @columns = @{ $self->__column_timestamp_triggers()->{on_update} };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/SingletonRows.pm view on Meta::CPAN
my $row = $schema->...
my $row2 = update_and_return();
sub update_and_return {
my $row = $schema->...
$row->somefield("HLAGH");
$row->update();
return $row;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Validation/Structure.pm view on Meta::CPAN
# Else do the normal insert
$self->next::method(@_);
}
}
sub update {
my $self = shift;
my $columns = shift;
$self->set_inflated_columns($columns) if $columns;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Validation.pm view on Meta::CPAN
=item update
=cut
sub update {
my $self = shift;
my $columns = shift;
$self->set_inflated_columns($columns) if $columns;
$self->validate if $self->validation_auto;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/VirtualColumns.pm view on Meta::CPAN
Overloaded method. L<DBIx::Class::Row/"update">
=cut
sub update {
my $self = shift;
my $attr = shift;
# Filter localized values
my ($virtual_attrs,$main_attrs) = $self->_virtual_filter($attr);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/WebForm.pm view on Meta::CPAN
=item $self->update_from_form($form)
=cut
sub update_from_form {
my $self = shift;
die "update_from_form cannot be called as a class method" unless ref $self;
__PACKAGE__->_run_update( $self, @_ );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Wrapper/Factory.pm view on Meta::CPAN
See L<DBIx::Class::ResultSet/update_or_create>
=cut
sub update_or_create {
my ($self, $args) = @_;
my $original = $self->dbic_rs->update_or_create($args);
return $original ? $self->wrap($original) : undef;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Composer.pm view on Meta::CPAN
return 1;
}
#============================================================
sub update {
#============================================================
=head2 update
Usage : $cmd->update()
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Connection.pm view on Meta::CPAN
$connection->update_lob(lob_test => 'blob_content', $lob_content, {id => 1}, 'doc_size');
=cut
sub update_lob {
my ($self, $table_name, $lob_column_name, $lob, $primary_key_values, $lob_size_column_name) = @_;
my $module_name = $self->load_module('SQL');
if($module_name && $module_name->can('update_lob')) {
$module_name->update_lob($self, $table_name, $lob_column_name, $lob, $primary_key_values, $lob_size_column_name);
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/CouchLike.pm view on Meta::CPAN
);
}
return 1;
}
sub update_views {
my $self = shift;
my $dbh = $self->dbh;
my $views = shift || [];
my @views = @$views;
view all matches for this distribution
view release on metacpan or search on metacpan
return undef;
}
}
# ----------------------------------------------------------------------
sub update
{
my $self = shift;
my $data = $self->{data};
my $odata = $self->{olddata};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Custom.pm view on Meta::CPAN
else {
$self->execute($sql, $params->[0], %opt);
}
}
sub update {
my $self = shift;
# Options
my $param = @_ % 2 ? shift : undef;
my %opt = @_;
lib/DBIx/Custom.pm view on Meta::CPAN
# Execute query
$self->execute($sql, $param, %opt);
}
sub update_all { shift->update(@_, allow_update_all => 1) };
sub values_clause {
my ($self, $param, $opts) = @_;
my $wrap = $opts->{wrap} || {};
lib/DBIx/Custom.pm view on Meta::CPAN
return $self;
}
# DEPRECATED
sub update_or_insert {
_deprecate('0.39', "DBIx::Custom::update_or_insert method is DEPRECATED!");
my ($self, $param, %opt) = @_;
confess "update_or_insert method need primary_key and id option "
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/DBO/Query.pm view on Meta::CPAN
Returns the number of rows updated or C<'0E0'> for no rows to ensure the value is true,
and returns false if there was an error.
=cut
sub update {
my $me = shift;
my @update = $me->{DBO}{dbd_class}->_parse_set($me, @_);
my $sql = $me->{DBO}{dbd_class}->_build_sql_update($me, @update);
$me->{DBO}{dbd_class}->_do($me, $sql, undef, $me->{DBO}{dbd_class}->_bind_params_update($me));
}
view all matches for this distribution
view release on metacpan or search on metacpan
DBO2/Record.pm view on Meta::CPAN
=cut
use Class::MakeMethods::Composite::Inheritable(hook=>'ok_update pre_update post_update');
# $record->update_record()
sub update_record {
my $self = shift;
my $class = ref( $self ) or croak("Not a class method");
my $table = $class->demand_table();
my @flags = $self->ok_update;
if ( grep { length $_ and ! $_ } @flags ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/DBObj.pm view on Meta::CPAN
return(query($queryStr));
}
sub update {
my ($this) = @_;
my $queryStr = "";
my $fieldStr = "";
my $whereStr = "";
view all matches for this distribution
view release on metacpan or search on metacpan
DBSchema.pm view on Meta::CPAN
Same as sql_update_schema, except actually runs the SQL commands to update
the schema. Throws a fatal error if any statement fails.
=cut
sub update_schema {
#my($self, $new, $dbh) = ( shift, shift, _dbh(@_) );
my($self, $opt, $new, $dbh) = ( shift, _parse_opt(\@_), shift, _dbh(@_) );
foreach my $statement ( $self->sql_update_schema( $opt, $new, $dbh ) ) {
$dbh->do( $statement )
view all matches for this distribution
view release on metacpan or search on metacpan
DBIx/DBStag.pm view on Meta::CPAN
$cache->{$valstr} = $insert_h;
}
return 1;
}
sub update_cache {
my $self = shift;
my $element = shift;
my $store_hash = shift;
my $unique_constr = shift;
DBIx/DBStag.pm view on Meta::CPAN
trace(0, "PKVAL = $pkval") if $TRACE;
}
return $pkval;
}
sub updaterow {
my $self = shift;
my ($table, $set, $where) = @_;
confess("must specify table") unless $table;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/DataModel/Source/Table.pm view on Meta::CPAN
}
sub update {
my $self = shift;
# prepare datastructures for generating the SQL
my ($to_set, $where) = $self->_parse_update_args(@_);
$self->_apply_handlers_for_update($to_set, $where);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/EAV/Entity.pm view on Meta::CPAN
# return the number os attrs loaded
$total;
}
sub update {
my $self = shift;
$self->set(@_)->save;
}
sub set {
view all matches for this distribution
view release on metacpan or search on metacpan
=back
=cut
sub update
{
my $self = shift;
my $table = shift;
my $conditions = shift;
my (@columns);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Fast.pm view on Meta::CPAN
} else {
$self->update( $self->TableName($table) , { sen => $data , where => $where } );
}
}
sub update {
my $self = shift;
my $table = $self->TableName(shift);
my $skeel = shift;
$skeel->{sen} = $self->extra_args($skeel->{sen},@_) if scalar @_ > 0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Foo.pm view on Meta::CPAN
sub last_insert_id {
my ($self, @args) = @_;
return $self->{dbh}->last_insert_id(@args);
}
sub update_query {
my ($self, $table) = @_;
return DBIx::Foo::UpdateQuery->new($table, $self);
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
DBIx/Frame.pm view on Meta::CPAN
If C<ALLOW_ADMIN> is set, then you may work with fields that are protected
by the C<ADMIN> array. (This doesn't actually work yet.)
=cut
sub update {
my ($self, $table, $datahash, $selecthash, $admin ) = @_;
my $db = _db_or_die($self) || return undef;
$self->_test_table($table) || $self->set_error("Bad table") && return undef;
my $hash = $self->_parse_hash($table, $datahash) || {};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/FullTextSearch/Blob.pm view on Meta::CPAN
sub delete_document {
my $self = shift;
for my $id (@_) { $self->update_document($id, {}); }
}
sub update_document {
my ($self, $id, $words) = @_;
my $fts = $self->{'fts'};
my $dbh = $fts->{'dbh'};
my $data_table = $fts->{'data_table'};
view all matches for this distribution
view release on metacpan or search on metacpan
IO/OracleIO.pm view on Meta::CPAN
my $crs = $dbh->prepare_cached("SELECT $seq.NEXTVAL FROM DUAL") || return undef;
$crs->execute() || return undef;
return (($crs->fetchrow_array)[0]);
}
sub update_hash
{
my ($self,$update,$key,$date_format,$hint) = @_;
ref($self) || (warn("\$self not an object"),return undef);
ref($update) || ($self->_alert("\$update not a hash ref"), return undef);
%$update || return -1;
view all matches for this distribution