view release on metacpan or search on metacpan
}
$APP->statusbar("Enter row to add. ESC stores; DEL cancels the add.");
}
# called from button_push with the top-level form.
sub updatemode
{
my $form = shift;
return if check_rows_and_advise($form);
my $subform = $form->getSubform('DBForm');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/InsertHash.pm view on Meta::CPAN
=back
=cut
sub update {
my ($self, $data, $vars, $where, $table, $dbh) = @_;
my @vars = ($vars ? @$vars : ());
# object defaults
if (ref $self) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Lite/ResultSet.pm view on Meta::CPAN
# return a DBIx::Lite::Row object with the inserted values
return $self->_inflate_row($insert_cols);
}
sub update_sql {
my $self = shift;
my $update_cols = shift;
ref $update_cols eq 'HASH' or croak "update_sql() requires a hashref";
my $update_where = { -and => $self->{where} };
lib/DBIx/Lite/ResultSet.pm view on Meta::CPAN
-set => $update_cols,
-where => $update_where,
);
}
sub update_sth {
my $self = shift;
my $update_cols = shift;
ref $update_cols eq 'HASH' or croak "update_sth() requires a hashref";
my ($sql, @bind) = $self->update_sql($update_cols);
return $self->{dbix_lite}->dbh->prepare($sql) || undef, @bind;
}
sub update {
my $self = shift;
my $update_cols = shift;
ref $update_cols eq 'HASH' or croak "update() requires a hashref";
my $affected_rows;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Mint/Table.pm view on Meta::CPAN
my @ids = $mint->connector->run( fixup => $sub );
return wantarray ? @ids : $ids[0][0];
}
sub update {
# Input:
# Case 1) a class name, a Mint object, two hash refs
# Case 2) a class name, two hash refs
# Case 3) a blessed object
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/MoCo/DataBase.pm view on Meta::CPAN
my ($sql, @binds) = $sqla->delete($table,$where);
$sql =~ /WHERE/io or croak "where is not specified to delete from $table";
$class->execute($sql,undef,\@binds);
}
sub update {
my $class = shift;
my ($table, $args, $where) = @_;
$where or croak "where is not specified to update $table";
(ref $where eq 'HASH' && %$where) or croak "where is not specified to update $table";
my ($sql, @binds) = $sqla->update($table,$args,$where);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/NinjaORM.pm view on Meta::CPAN
=back
=cut
sub update ## no critic (Subroutines::RequireArgUnpacking)
{
croak 'The first argument passed must be a hashref'
if !Data::Validate::Type::is_hashref( $_[1] );
my ( $self, $data, %args ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/NoSQL/Model/Index.pm view on Meta::CPAN
}
return $search;
}
sub update {
my $self = shift;
my $key = shift;
my $target = shift;
$self->prepare;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/OO.pm view on Meta::CPAN
Saves any modified columns to the database.
=cut
sub update {
my $class = shift;
if (ref $class) {
$class->_do_update;
} else {
my ($fieldvals, $where) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/ObjectMapper/Engine.pm view on Meta::CPAN
sub get_column_info { }
sub get_unique_key { }
sub get_tables { }
sub select { }
sub select_single { }
sub update { }
sub insert { }
sub create { }
sub delete { }
sub iterator { }
view all matches for this distribution
view release on metacpan or search on metacpan
carp "Unable to execute insert handle at line $line in file $file package $pkg\n";
return;
}
}
sub update
{
my ($pkg,$file,$line) = caller;
####################################################
####################################################
view all matches for this distribution
view release on metacpan or search on metacpan
my $subform = shift;
addmode(@_);
$subform->setField( 'FOCUSED', 'DBForm' );
}
sub updatemode {
my $form = $GlobalUi->get_current_form;
# $GlobalUi->update_info_message( $form, 'update' );
return if check_rows_and_advise($form);
my $w = $subform->getWidget($ft);
next unless $col;
}
}
sub updatemode_resume {
my ($form) = @_;
updatemode(@_);
$form->setField( 'FOCUSED', 'DBForm' );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Perlish.pm view on Meta::CPAN
}
}
}
# XXX refactor update/delete into a single implemention if possible?
sub update
{
my ($moi, $sub) = @_;
my $me = ref $moi ? $moi : {};
my $dbh = $me->{dbh};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Query.pm view on Meta::CPAN
$sth->run;
return $self;
}
sub update {
my ( $self, $table_name, $params, $where, $attr, $cache_type ) = @_;
my ( $sql, @variables ) = $self->_param('sql_abstract')->update( $table_name, $params, $where );
my $sth = $self->sql( $sql, $attr, $cache_type, \@variables );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/QuickORM/Connection.pm view on Meta::CPAN
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) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Raw.pm view on Meta::CPAN
Note we do not ecnrypt age because it is most likely stored as an integer in the database.
=cut
sub update {
my $self = shift;
my $params = $self->_params(@_);
croak "href and table are required for update" unless $params->{href} and $params->{table};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/ResultSet.pm view on Meta::CPAN
Creates and executes an UPDATE statement.
=cut
sub update {
my ($self, $fields) = @_;
my ($sql, @bind) = $self->abstract->update( $self->table(), $fields, $self->where() );
$self->_dbi_execute( 'do', $sql, \@bind );
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
Roles/SQLAbstract.pm view on Meta::CPAN
my $sth = $self-> prepare( $query);
$sth-> execute( @bindval) if $sth;
return $sth;
}
sub update
{
my ( $self, $sql) = @_;
my ( $query, @bindval) = abstract('update', @_);
$self-> do( $query, {}, @bindval);
}
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$examples =~ s/\r\n/\n/g;
update_file( $example_file, $examples );
};
};
sub update_file {
my( $filename, $new_content ) = @_;
my $content;
if( -f $filename ) {
open my $fh, '<', $filename
or die "Couldn't read '$filename': $!";
view all matches for this distribution
view release on metacpan or search on metacpan
SQLEngine/Record/Cache.pm view on Meta::CPAN
=back
=cut
# $record->update_record()
sub update_record {
my $self = shift;
$self->cache_clear();
$self->NEXT('update_record', @_ );
}
SQLEngine/Record/Cache.pm view on Meta::CPAN
}
return $row->NEXT('insert_row', @_);
}
sub update_row {
my $row = shift;
$row->query_cache->clear_all() if ( $row->query_cache );
return $row->NEXT('update_row', @_);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/SQLite/Simple/Table.pm view on Meta::CPAN
Will update elements specified within the arrayref (they are all objects of type DBIx::SQLite::Simple::Table). If an additionnal argument is passed, it will act as a where clause. See SYNOPSIS.
=cut
sub update {
my $self = shift;
no strict 'refs';
my $id = ${ref($self). '::Id'};
my @fields = @{ref($self). '::Fields'};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Schema/UpToDate.pm view on Meta::CPAN
)
or croak $dbh->errstr;
}
sub updates {
my ($self) = @_;
return $self->{updates} ||= [
];
}
sub update_to_version {
my ($self, $version) = @_;
$self->begin_work();
# execute updates to bring database to $version
lib/DBIx/Schema/UpToDate.pm view on Meta::CPAN
=head1 SYNOPSIS
package Local::Database;
use parent 'DBIx::Schema::UpToDate';
sub updates {
shift->{updates} ||= [
# version 1
sub {
my ($self) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Simple/Class.pm view on Meta::CPAN
return $self->update();
}
return;
}
sub update {
my ($self) = @_;
my $pk = $self->PRIMARY_KEY;
$self->{data}{$pk} || croak('Please define primary key column (\$self->$pk(?))!');
my $dbh = $self->dbh;
$self->{SQL_UPDATE} ||= do {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Skinny.pm view on Meta::CPAN
my $code = $class->_attributes->{dbd}->can('bulk_insert') or Carp::croak "dbd don't provide bulk_insert method";
$code->($class, $table, $args);
}
sub update {
my ($class, $table, $args, $where) = @_;
my $schema = $class->schema;
$class->call_schema_trigger('pre_update', $schema, $table, $args);
lib/DBIx/Skinny.pm view on Meta::CPAN
$class->call_schema_trigger('post_update', $schema, $table, $rows);
return $rows;
}
sub update_by_sql {
my ($class, $sql, $bind) = @_;
Carp::carp( 'update_by_sql has been deprecated. Please use $skinny->do($sql, undef, @bind)' );
$class->do($sql, undef, @$bind);
}
view all matches for this distribution
view release on metacpan or search on metacpan
script/watchsheet.pl view on Meta::CPAN
my $watcher = Filesys::Notify::Simple->new([
sort keys %watch_directory,
]);
sub update_queries {
warn $file;
my $sheet = DBIx::Spreadsheet->new( file => $file );
my $dbh = $sheet->dbh;
my @eff_queries = map { -d ? glob "$_/*.sql" : $_ } @queries;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Struct.pm view on Meta::CPAN
my $update;
if (not ref $table) {
# means this is just one simple table
$update = <<UPD;
sub update {
my \$self = \$_[0];
if(\@_ > 1 && CORE::ref(\$_[1]) eq 'HASH') {
my (\$set, \$where, \@bind, \@bind_where);
{
no strict 'vars';
lib/DBIx/Struct.pm view on Meta::CPAN
\$self;
}
UPD
} else {
$update = <<UPD;
sub update {}
UPD
}
$update;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/blog/lib/Blog/Controller/Posts.pm view on Meta::CPAN
my $id = $self->posts->add($validation->output);
$self->redirect_to('show_post', id => $id);
}
sub update {
my $self = shift;
my $validation = $self->_validation;
return $self->render(action => 'edit', post => {}) if $validation->has_error;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/TextIndex/DBD.pm view on Meta::CPAN
SELECT COUNT(*) FROM $self->{COLLECTION_TABLE}
END
}
sub update_collection_info {
my $self = shift;
my $field = shift;
return <<END;
UPDATE $self->{COLLECTION_TABLE}
lib/DBIx/TextIndex/DBD.pm view on Meta::CPAN
FROM $self->{ALL_DOCS_VECTOR_TABLE}
END
}
sub update_all_docs_vector {
my $self = shift;
return <<END;
REPLACE INTO $self->{ALL_DOCS_VECTOR_TABLE}
(id, all_docs_vector)
VALUES (1, ?)
lib/DBIx/TextIndex/DBD.pm view on Meta::CPAN
WHERE $self->{DOC_ID_FIELD} = ?
END
}
sub update_docweights {
my $self = shift;
return <<END;
REPLACE INTO $self->{DOCWEIGHTS_TABLE} (field_no, avg_docweight, docweights)
VALUES (?, ?, ?)
END
}
sub update_docweights_execute {
my $self = shift;
my ($sth, $fno, $avg_w_d, $packed_w_d) = @_;
$sth->execute($fno, $avg_w_d, $packed_w_d);
}
lib/DBIx/TextIndex/DBD.pm view on Meta::CPAN
END
return $delete_queue ? $delete_queue : undef;
}
sub update_delete_queue {
my $self = shift;
my $delete_queue = shift;
$self->{INDEX_DBH}->do(<<END, undef, $delete_queue, 1);
REPLACE INTO $self->{DELETE_QUEUE_TABLE} (delete_queue, id)
VALUES (?, ?)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/UpdateTable/FromHoH.pm view on Meta::CPAN
extra_update_columns => {
schema => ['hos*'], # XXX or code
},
},
};
sub update_table_from_hoh {
my %args = @_;
my $dbh = $args{dbh};
my $table = $args{table};
my $hoh = $args{hoh};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/VersionedSubs.pm view on Meta::CPAN
these will behave weird if you redefine a subroutine
that was previously closed over.
=cut
sub update_code {
my ($package) = @_;
my $version = $package->code_version || 0;
#warn "Checking against $version";
my $sth = $package->dbh->prepare_cached(sprintf <<'SQL', $package->code_history);
SELECT distinct name,action,new_code,version FROM %s
lib/DBIx/VersionedSubs.pm view on Meta::CPAN
This cannot override subroutines that don't exist in the database.
=cut
sub update_sub {
my ($package,$name,$new_code) = @_;
$package->add_code_history($name,$package->code_source->{$name},$new_code,'U');
my $sth = $package->dbh->prepare_cached(sprintf <<'SQL',$package->code_live);
UPDATE %s SET code=?
WHERE name=?
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Wizard/ResultSet.pm view on Meta::CPAN
}
return;
}
sub update {
my ($self, $rh_update) = @_;
my ($sql, @bind) = $sw->update(
-table => $self->{table},
-set => $rh_update,
view all matches for this distribution