NAME

blx::xsdsql::connection - generate connection list to a database from standard format

SYNOPSIS

use blx::xsdsql::connection

VERSION

0.10.0

FUNCTIONS

new - constructor

PARAMS:
      CONNECTION_STRING  - see on botton of this doc for examples of connection string
      the format is:
         [<output_namespace>::]<dbtype>:<user>/<password>@<dbname>[:hostname[:port]][;<attribute>[,<attribute>...]]

                 <output_namespace>::=  sql  (this is the default)
                 <dbtype>::= pg|mysql|oracle|DBM
                 <user>::=  username
                 <pwd>::=   password
                 <dbname> ::= database name
                 <hostname>:: socket remote hostname or ipaddress - the default is 127.0.0.1
                 <port>    :: socket remote port - the default is the database port default
                 <attribute> :: extra attribute - see the manual of DBI, section connect

do_connection_list

ARGS:
    connection_string - equal to param CONNECTION_STRING of the constructor

get_connection_list - return a list for input to a database connection (for example DBI)

get_output_namespace - return output namespace

get_dbnamespace - return the database namespace

get_last_error - return a message error relative to wrong connection string

get_attribute_names - return a list of know attributes

get_attrs_value - return the value of one or many attributes

ARGS:
         <attribute_name>[,<attribute_name>...]

connection string examples:

postgres

'sql::pg:myuser/mypwd@mydb:127.0.0.1:5432;RaiseError => 1,AutoCommit => 0,pg_enable_utf8 => 1'

mysql

'sql::mysql:myuser/mypwd@mydb:127.0.0.1:3306;RaiseError => 1,AutoCommit => 0,mysql_enable_utf8 => 1'

dbm

'sql::DBM:dbm_mldbm=Storable;RaiseError => 1,f_dir=> q(/tmp)'

oracle

'sql::oracle:myuser/mypwd@orcl:127.0.0.1:1522;RaiseError => 1,AutoCommit => 0'

BUGS

Please report any bugs or feature requests to https://rt.cpan.org/Public/Bug/Report.html?Queue=XSDSQL

AUTHOR

lorenzo.bellotti, <pauseblx@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2010 by lorenzo.bellotti

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html