1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
package URI::vertica;
use base 'URI::_db';
our $VERSION = '0.15';
sub default_port { 5433 }
sub dbi_driver { 'ODBC' }
sub _dbi_param_map {
my $self = shift;
my $host = $self->host;
my $port = $self->_port;
# Just return the DSN if no host or port.
return [ DSN => scalar $self->dbname ] unless $host || $port;
# Fetch the driver from the query params.
require URI::QueryParam;
return (
[ Server => $host ],
[ Port => $port || $self->default_port ],
[ Database => scalar $self->dbname ],
);
}
1;
|