XSDSQL

 view release on metacpan or  search on metacpan

lib/blx/xsdsql/connection.pm  view on Meta::CPAN

=head1 SYNOPSIS

use blx::xsdsql::connection


=head1 VERSION

0.10.0

=cut

=head1 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>...]

=head1 connection string examples:

=head2 postgres

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

=head2 mysql

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

=head2 dbm

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

=head2 oracle

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

=head1 BUGS

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


=head1 AUTHOR

lorenzo.bellotti, E<lt>pauseblx@gmail.comE<gt>

=head1 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

=cut








( run in 0.798 second using v1.01-cache-2.11-cpan-39bf76dae61 )