3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
6 Licensed under the Apache License, Version 2.0 (the
"License");
7 you may not use
this file except in compliance with the License.
8 You may obtain a copy of the License at
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an
"AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License
for the specific language governing permissions and
16 limitations under the License.
22 Please email comments or questions to the
public Ensembl
23 developers list at <http:
25 Questions may also be sent to the Ensembl help desk at
30 # FIXME: should this be ::ODBC rather than ::odbc ??
32 package Bio::EnsEMBL::DBSQL::Driver::odbc;
39 use base
'Bio::EnsEMBL::DBSQL::Driver';
42 my ($self, @args) = @_;
43 warning(__PACKAGE__ .
' is untested and is being used only to collect odbc-specific code');
44 return $self->SUPER::new(@args);
48 my ($self, $conn) = @_;
50 my $dsn = sprintf(
"DBI:ODBC:%s", $conn->dbname() );
54 username => $conn->username(),
55 password => $conn->password(),
58 'LongReadLen' => 2**16 - 8,
61 'odbc_cursortype' => 2,
66 sub from_date_to_seconds {
67 my ($self, $column) = @_;
68 return "DATEDIFF(second,'JAN 1 1970',$column)";
71 sub from_seconds_to_date {
72 my ($self, $seconds) = @_;
73 return "DATEDIFF(date,'JAN 1 1970',$seconds)";