Bio::DB::DBI mysql
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvs
Summary
Bio::DB::DBI::mysql - DESCRIPTION of Object
Package variables
No package variables defined.
Included modules
Bio::DB::DBI
Bio::DB::DBI::base
Inherit
Bio::DB::DBI::base
Synopsis
Give standard usage here
Description
Describe the object here
Methods
newDescriptionCode
next_id_valueDescriptionCode
last_id_valueDescriptionCode
ifnull_sqlfunc (reference)DescriptionCode
Methods description
newcode    nextTop
 Title   : new
Usage : my $obj = Bio::DB::DBI::mysql->new();
Function: Builds a new Bio::DB::DBI::mysql object using the passed named
parameters.
Returns : an instance of Bio::DB::DBI::mysql
Args : named parameters with tags -dbcontext (a Bio::DB::DBContextI
implementing object) and -sequence_name (the name of the sequence
for PK generation)
next_id_valuecodeprevnextTop
 Title   : next_id_value
Usage : $pk = $obj->next_id_value("bioentry");
Function: This implementation uses standard MySQL only and hence cannot
implement this method. It will throw an exception if called.
Example :
Returns : a value suitable for use as a primary key
Args : The database connection handle to use for retrieving the next primary
key value.
Optionally, the name of the table. The driver is not required to
honor the argument if present.
last_id_valuecodeprevnextTop
 Title   : last_id_value
Usage :
Function: Returns the last unique primary key value
allocated. Depending on the argument and the driver, the
value may be specific to a table, or independent of the
table.
This implementation will ignore the table. Example : Returns : a value suitable for use as a primary key Args : The database connection handle to use for retrieving the primary key from the last insert.
ifnull_sqlfunccodeprevnextTop
 Title   : nvl_sqlfunc
Usage :
Function: Get the name of the SQL function that takes two arguments
and returns the first if it is not null, and the second
otherwise.
Most RDBMSs will have such a function, but unfortunately the naming is different between them. E.g., in MySQL the name is IFNULL(), whereas in Oracle it is NVL(). Example : Returns : the name of the function as a string, without parentheses Args : none
Methods code
newdescriptionprevnextTop
sub new {
    my($class,@args) = @_;
    
    my $self = $class->SUPER::new(@args);
    return $self;
}
next_id_valuedescriptionprevnextTop
sub next_id_value {
    my ($self, $table) = @_;

    $self->throw("plain MySQL does not provide SQL sequences - ".
		 "next_id_value() is not available with this driver");
}
last_id_valuedescriptionprevnextTop
sub last_id_value {
    my ($self, $dbh) = @_;

    if(! $dbh) {
	$self->throw("no database handle supplied to last_id_value() --".
		     "last_id and currval operations are connection-specific");
    }
    return $dbh->{'mysql_insertid'};
}
ifnull_sqlfuncdescriptionprevnextTop
sub ifnull_sqlfunc {
 'IFNULL'; };
1;
}
General documentation
FEEDBACKTop
Mailing ListsTop
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list. Your participation is much appreciated.
  bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support Top
 
Please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
Reporting BugsTop
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via
the web:
  http://bugzilla.open-bio.org/
AUTHOR - Hilmar LappTop
Email hlapp at gmx.net
Describe contact details here
CONTRIBUTORSTop
Additional contributors names and emails here
APPENDIXTop
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _