Skip to content

Commit 8bdc1ee

Browse files
jwarlandertheory
authored andcommitted
Add support for Exasol (#15)
1 parent 74b996f commit 8bdc1ee

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

lib/URI/exasol.pm

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package URI::exasol;
2+
use base 'URI::_odbc';
3+
our $VERSION = '0.18';
4+
5+
sub default_port { 8563 }
6+
7+
sub _dbi_param_map {
8+
my $self = shift;
9+
my $host = $self->host;
10+
my $port = $self->_port;
11+
12+
# Just return the DSN if no host or port.
13+
return [ DSN => scalar $self->dbname ] unless $host || $port;
14+
15+
# Fetch the driver from the query params.
16+
require URI::QueryParam;
17+
return (
18+
[ EXAHOST => $host ],
19+
[ EXAPORT => $port || $self->default_port ],
20+
);
21+
}
22+
23+
1;

t/engines.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ for my $spec (
4747
[ derby => 1527, 'derby' ],
4848
[ vertica => 5433, 'vertica' ],
4949
[ ldapdb => undef, 'ldapdb' ],
50+
[ exasol => 8563, 'exasol' ],
5051
) {
5152
my ($engine, $port, $canon) = @{ $spec };
5253
my $prefix = "db:$engine";

0 commit comments

Comments
 (0)