DB-Object

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    "DB_SCHEMA"

    If the parameter property *uri* was provided of if the environment
    variable "DB_CON_URI" is set, it will use this connection uri to get the
    necessary connection parameters values.

    An URI could be "http://localhost:5432?database=somedb" or
    "file:/foo/bar?opt={"RaiseError":true}"

    Alternatively, if the connection parameter *conf_file* is provided then
    its json content will be read and decoded into an hash reference.

    The following keys can be used in the json data in the *conf_file*:
    "database", "login", "passwd", "host", "port", "driver", "schema", "opt"

    The port can be specified in the *host* parameter by separating it with
    a semicolon such as "localhost:5432"

    The *opt* parameter can Alternatively be provided through the
    environment variable "DB_OPT"

lib/DB/Object.pm  view on Meta::CPAN

Returns an array reference containing the following keys: db login passwd host port driver database server opt uri debug

=head2 _connection_params2hash

Provided with an hash reference of connection parameters and this will check if the following environment variables exists and if so use them: C<DB_NAME>, C<DB_LOGIN>, C<DB_PASSWD>, C<DB_HOST>, C<DB_PORT>, C<DB_DRIVER>, C<DB_SCHEMA>

If the parameter property I<uri> was provided of if the environment variable C<DB_CON_URI> is set, it will use this connection uri to get the necessary connection parameters values.

An L<URI> could be C<http://localhost:5432?database=somedb> or C<file:/foo/bar?opt={"RaiseError":true}>

Alternatively, if the connection parameter I<conf_file> is provided then its json content will be read and decoded into an hash reference.

The following keys can be used in the json data in the I<conf_file>: C<database>, C<login>, C<passwd>, C<host>, C<port>, C<driver>, C<schema>, C<opt>

The port can be specified in the I<host> parameter by separating it with a semicolon such as C<localhost:5432>

The I<opt> parameter can Alternatively be provided through the environment variable C<DB_OPT>

It returns the hash reference of connection parameters.

=head2 _clean_statement



( run in 0.239 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )