$Bio::EnsEMBL::DBSQL::Driver::VERSION
=
'112.0_56'
;
$Bio::EnsEMBL::DBSQL::Driver::VERSION
=
'112.056'
;
sub
new {
my
(
$class
,
$parent
) =
@_
;
my
$self
=
bless
{},
$class
;
$self
->parent(
$parent
);
return
$self
;
}
sub
parent {
my
(
$self
,
@args
) =
@_
;
if
(
@args
) {
(
$self
->{
'_parent'
} ) =
@args
;
weaken
$self
->{
'_parent'
};
}
return
$self
->{
'_parent'
};
}
sub
connect_params {
my
(
$self
,
$conn
) =
@_
;
my
$dbname
=
$conn
->dbname();
my
$dbparam
= (
$dbname
) ?
"database=${dbname};"
:
q{}
;
my
$dsn
=
sprintf
(
"DBI:%s:%shost=%s;port=%s"
,
$conn
->driver(),
$dbparam
,
$conn
->host(),
$conn
->port() );
if
(
$conn
->{
'disconnect_when_inactive'
} ) {
$conn
->{
'count'
}++;
if
(
$conn
->{
'count'
} > 1000 ) {
sleep
1;
$conn
->{
'count'
} = 0;
}
}
return
{
dsn
=>
$dsn
,
username
=>
$conn
->username(),
password
=>
$conn
->password(),
attributes
=> {
'RaiseError'
=> 1 },
};
}
sub
last_insert_id_args {
return
;
}
sub
can_straight_join {
return
;
}
sub
set_wait_timeout {
my
$self
=
shift
;
my
$class
=
ref
$self
;
warning(
"'set_wait_timeout()' is not implemented in ${class}"
);
return
;
}
sub
AUTOLOAD {
my
(
$self
,
@args
) =
@_
;
my
$class
=
ref
$self
;
my
$method
=
$Bio::EnsEMBL::DBSQL::Driver::AUTOLOAD
;
$method
=~ s/^${class}:://;
throw(
"'${method}()' has not been implemented in ${class}"
);
return
;
}
sub
DESTROY { }
1;