DBIx-QuickORM
view release on metacpan or search on metacpan
lib/DBIx/QuickORM/Connection.pm view on Meta::CPAN
sub any { shift->handle(@_)->any }
sub first { shift->handle(@_)->first }
sub one { shift->handle(@_)->one }
sub count { shift->handle(@_)->count }
sub delete { shift->handle(@_)->delete }
sub by_id { my $arg = pop; shift->handle(@_)->by_id($arg) }
sub iterate { my $arg = pop; shift->handle(@_)->iterate($arg) }
sub insert { my $arg = pop; shift->handle(@_)->insert($arg) }
sub vivify { my $arg = pop; shift->handle(@_)->vivify($arg) }
sub update { my $arg = pop; shift->handle(@_)->update($arg) }
sub update_or_insert { my $arg = pop; shift->handle(@_)->update_or_insert($arg) }
sub find_or_insert { my $arg = pop; shift->handle(@_)->update_or_insert($arg) }
sub by_ids {
my $self = shift;
my ($from, @ids) = @_;
my $handle;
if (blessed($from) && $from->isa('DBIx::QuickORM::Handle')) {
$handle = $from;
}
lib/DBIx/QuickORM/Handle.pm view on Meta::CPAN
);
}
return $sth unless $sync;
$finish->($sth->dbh, $sth->sth);
return undef;
}
sub update {
my $changes;
my $self = shift->_row_or_hashref(sub {$changes = pop; $_[0]}, @_);
my $con = $self->{+CONNECTION};
$con->pid_and_async_check;
croak "update() with data_only set is not currently supported" if $self->{+DATA_ONLY};
croak "update() with a 'limit' clause is not currently supported" if $self->{+LIMIT};
croak "update() with an 'order_by' clause is not currently supported" if $self->{+ORDER_BY};
lib/DBIx/QuickORM/Join/Row.pm view on Meta::CPAN
sub check_sync { $_[0]->_row_map(sub { $b->check_sync }); $_[0] }
#####################
# }}} Sanity Checks #
#####################
############################
# {{{ Manipulation Methods #
############################
sub update { croak "Not Implemented" }
sub insert { croak "Not Implemented" }
sub insert_or_save { croak "Not Implemented" }
#<<<
sub force_sync { $_[0]->_row_map(sub {$b->force_sync}); $_[0] }
sub discard { $_[0]->_row_map(sub {$b->discard }); $_[0] }
sub refresh { $_[0]->_row_map(sub {$b->refresh }); $_[0] }
sub save { $_[0]->_row_map(sub {$b->save }); $_[0] }
sub delete { $_[0]->_row_map(sub {$b->delete }); $_[0] }
#>>>
lib/DBIx/QuickORM/Row.pm view on Meta::CPAN
sub delete {
my $self = shift;
$self->check_pk;
croak "This row is not in the database yet" unless $self->is_stored;
return $self->connection->handle($self)->delete;
}
sub update {
my $self = shift;
my $changes;
if (@_ == 1) {
($changes) = @_;
}
else {
$changes = {@_};
}
lib/DBIx/QuickORM/RowManager.pm view on Meta::CPAN
my $state = $self->_state(stored => $fetched, pending => undef);
$row->{+ROW_DATA}->change_state($state) if $row;
$row //= $self->_vivify($source, $state);
return $row;
}
sub update {
my $self = shift;
my ($source, $fetched, $old_pk, $new_pk, $row) = $self->parse_params({@_});
$row = $self->do_update($source, $fetched, $old_pk, $new_pk, $row);
$self->cache($source, $row, $old_pk, $new_pk);
return $row;
}
sub do_update {
( run in 0.384 second using v1.01-cache-2.11-cpan-beeb90c9504 )