DB-Object

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    parameter.

  variables
    Query the SQL variable $type

    It returns a blank string if nothing was found, or the value found.

  version
    This is a method that must be implemented by the driver package.

  where
    See "where" in DB::Object::Tables

  _cache_this
    Provided with a query, this will cache it for future re-use.

    It does some check and maintenance job to ensure the cache does not get
    too big whenever it exceed the value of $CACHE_SIZE set in the main
    config file.

    It returns the cached statement as an DB::Object::Statement object.

  _check_connect_param
    Provided with an hash reference of connection parameters, this will get
    the valid parameters by calling "_connection_parameters" and the
    connection default options by calling "_connection_options"

    It returns the connection parameters hash reference.

  _check_default_option
    Provided with an hash reference of options, and it actually returns it,
    so this does not do much, because this method is supposed to be
    supereded by the driver package.

  _connection_options
    Provided with an hash reference of connection parameters and this will
    returns an hash reference of options whose keys match the regular
    expression "/^[A-Z][a-zA-Z]+/"

    So this does not do much, because this method is supposed to be
    superseded by the driver package.

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

  _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:
    "DB_NAME", "DB_LOGIN", "DB_PASSWD", "DB_HOST", "DB_PORT", "DB_DRIVER",
    "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"

    It returns the hash reference of connection parameters.

  _clean_statement
    Given a query string or a reference to it, it cleans the statement by
    removing leading and trailing space before and after line breaks.

    It returns the cleaned up query as a string if the original query was
    provided as a scalar reference.

  _convert_datetime2object
    Provided with an hash or hash reference of options and this will simply
    return the *data* property.

    This does not do anything meaningful, because it is supposed to be
    superseded by the diver package.

  _convert_json2hash
    Provided with an hash or hash reference of options and this will simply
    return the *data* property.

    This does not do anything meaningful, because it is supposed to be
    superseded by the diver package.

  _dbi_connect
    This will call "_dsn" which must exist in the driver package, and based
    on the "dsn" received, this will initiate a "connect_cache" in DBI if
    the object property "cache_connections" has a true value, or simply a
    "connect" in DBI otherwise.

    It returns the database handler.

  _decode_json
    Provided with some json data and this will decode it using JSON and
    return the associated hash reference or "undef" in perlfunc if an error
    occurred.

  _dsn
    This will die complaining the driver has not implemented this method,
    unless the driver did implement it.

  _encode_json
    Provided with an hash reference and this will encode it into a json
    string and return it.

  _make_sth
    Given a package name and a hash reference, this builds a statement
    object with all the necessary parameters.

    It also sets the query time to the current time with the parameter
    *query_time*



( run in 0.860 second using v1.01-cache-2.11-cpan-13bb782fe5a )