view release on metacpan or search on metacpan
lib/Bio/DB/BioSQL/BaseDriver.pm view on Meta::CPAN
(basically, it needs to implement dbh(), sth($key, $sth),
dbcontext(), and get_persistent_slots()).
The object to be updated.
A reference to an array of foreign key objects; if any of those
foreign key values is NULL (some foreign keys may be nullable),
then give the class name.
=cut
sub update_object{
my ($self,$adp,$obj,$fkobjs) = @_;
# obtain the object's slots to be serialized
my @slots = $adp->get_persistent_slots($obj);
# get the UPDATE statement
# is it cached?
my $cache_key = 'UPDATE '.ref($adp).' '.join(';',@slots);
my $sth = $self->get_sth($adp,$obj,$fkobjs,$cache_key,'update_object');
# we need the slot map regardless of whether we need to construct the
# SQL or not, because we need to know which slots do not map to a column
lib/Bio/DB/BioSQL/Oracle/AnnotationCollectionAdaptorDriver.pm view on Meta::CPAN
(basically, it needs to implement dbh(), sth($key, $sth),
dbcontext(), and get_persistent_slots()).
The object to be updated.
A reference to an array of foreign key objects; if any of those
foreign key values is NULL (some foreign keys may be nullable),
then give the class name.
=cut
sub update_object{
my ($self,$adp,$obj,$fkobjs) = @_;
return 1;
}
1;
lib/Bio/DB/BioSQL/Oracle/BiosequenceAdaptorDriver.pm view on Meta::CPAN
(basically, it needs to implement dbh(), sth($key, $sth),
dbcontext(), and get_persistent_slots()).
The object to be updated.
A reference to an array of foreign key objects; if any of those
foreign key values is NULL (some foreign keys may be nullable),
then give the class name.
=cut
sub update_object{
my ($self,$adp,$obj,$fkobjs) = @_;
# see whether there are any values defined at all
my $slotvals = $adp->get_persistent_slot_values($obj, $fkobjs);
my $isdef = 0;
foreach (@$slotvals) { $isdef ||= $_; last if $isdef; }
# in the majority of cases this actually will be an update indeed - so
# let's just go ahead and try if there are any values to update
my $rv = -1;
if($isdef) {
lib/Bio/DB/BioSQL/Oracle/SpeciesAdaptorDriver.pm view on Meta::CPAN
(basically, it needs to implement dbh(), sth($key, $sth),
dbcontext(), and get_persistent_slots()).
The object to be updated.
A reference to an array of foreign key objects; if any of those
foreign key values is NULL (some foreign keys may be nullable),
then give the class name.
=cut
sub update_object{
my ($self,$adp,$obj,$fkobjs) = @_;
$self->throw_not_implemented();
}
=head2 _build_select_list
Title : _build_select_list
Usage :
lib/Bio/DB/BioSQL/Pg/AnnotationCollectionAdaptorDriver.pm view on Meta::CPAN
(basically, it needs to implement dbh(), sth($key, $sth),
dbcontext(), and get_persistent_slots()).
The object to be updated.
A reference to an array of foreign key objects; if any of those
foreign key values is NULL (some foreign keys may be nullable),
then give the class name.
=cut
sub update_object{
my ($self,$adp,$obj,$fkobjs) = @_;
return 1;
}
1;
lib/Bio/DB/BioSQL/Pg/BiosequenceAdaptorDriver.pm view on Meta::CPAN
(basically, it needs to implement dbh(), sth($key, $sth),
dbcontext(), and get_persistent_slots()).
The object to be updated.
A reference to an array of foreign key objects; if any of those
foreign key values is NULL (some foreign keys may be nullable),
then give the class name.
=cut
sub update_object{
my ($self,$adp,$obj,$fkobjs) = @_;
my $cache_key = 'SELECT UK '.ref($self);
my $sth = $adp->sth($cache_key);
if(! $sth) {
# create and prepare sql
my $table = $self->table_name($adp);
my $ukname = $self->foreign_key_name("Bio::PrimarySeqI");
my $sql = "SELECT $ukname FROM $table WHERE $ukname = ?";
$adp->debug("preparing SELECT statement: $sql\n");
lib/Bio/DB/BioSQL/Pg/SpeciesAdaptorDriver.pm view on Meta::CPAN
(basically, it needs to implement dbh(), sth($key, $sth),
dbcontext(), and get_persistent_slots()).
The object to be updated.
A reference to an array of foreign key objects; if any of those
foreign key values is NULL (some foreign keys may be nullable),
then give the class name.
=cut
sub update_object{
my ($self,$adp,$obj,$fkobjs) = @_;
$self->throw_not_implemented();
}
=head2 _build_select_list
Title : _build_select_list
Usage :
lib/Bio/DB/BioSQL/mysql/AnnotationCollectionAdaptorDriver.pm view on Meta::CPAN
(basically, it needs to implement dbh(), sth($key, $sth),
dbcontext(), and get_persistent_slots()).
The object to be updated.
A reference to an array of foreign key objects; if any of those
foreign key values is NULL (some foreign keys may be nullable),
then give the class name.
=cut
sub update_object{
my ($self,$adp,$obj,$fkobjs) = @_;
return 1;
}
1;
lib/Bio/DB/BioSQL/mysql/BiosequenceAdaptorDriver.pm view on Meta::CPAN
(basically, it needs to implement dbh(), sth($key, $sth),
dbcontext(), and get_persistent_slots()).
The object to be updated.
A reference to an array of foreign key objects; if any of those
foreign key values is NULL (some foreign keys may be nullable),
then give the class name.
=cut
sub update_object{
my ($self,$adp,$obj,$fkobjs) = @_;
my $cache_key = 'SELECT UK '.$self;
my $sth = $adp->sth($cache_key);
if(! $sth) {
# create and prepare sql
my $table = $self->table_name($adp);
my $ukname = $self->foreign_key_name("Bio::PrimarySeqI");
my $sql = "SELECT $ukname FROM $table WHERE $ukname = ?";
$adp->debug("preparing SELECT statement: $sql\n");
lib/Bio/DB/BioSQL/mysql/SpeciesAdaptorDriver.pm view on Meta::CPAN
(basically, it needs to implement dbh(), sth($key, $sth),
dbcontext(), and get_persistent_slots()).
The object to be updated.
A reference to an array of foreign key objects; if any of those
foreign key values is NULL (some foreign keys may be nullable),
then give the class name.
=cut
sub update_object{
my ($self,$adp,$obj,$fkobjs) = @_;
$self->throw_not_implemented();
}
=head2 _build_select_list
Title : _build_select_list
Usage :
view all matches for this distributionview release on metacpan - search on metacpan