App-MonM

 view release on metacpan or  search on metacpan

lib/App/MonM/Checkit/DBI.pm  view on Meta::CPAN

=item B<Set>

    Set RaiseError     0
    Set PrintError     0

Defines DBI Attributes. This directive allows you set case sensitive DBI Attributes.
There can be several such directives.

Examples:

    Set sqlite_unicode      1
    Set mysql_enable_utf8   0

Default: no specified

=item B<Timeout>

    Timeout    1m

Defines the timeout of DBI requests

lib/App/MonM/ConfigSkel.pm  view on Meta::CPAN

# Section for connection with Your database.
# Recommended for use follow databases: SQLite, MySQL or PostgreSQL
#
# Default: SQLite
#
# SQLite example:
# <Store>
#    DSN "dbi:SQLite:dbname=/tmp/monm/monm.db"
#    Set RaiseError     0
#    Set PrintError     0
#    Set sqlite_unicode 1
# </Store>
#
# MySQL example:
# <Store>
#    DSN "DBI:mysql:database=monm;host=mysql.example.com"
#    User username
#    Password password
#    Set RaiseError          0
#    Set PrintError          0
#    Set mysql_enable_utf8   1

lib/App/MonM/ConfigSkel.pm  view on Meta::CPAN

    #
    # Default: off
    #
    #Timeout    20s

    #
    # Defines DBI Attributes.
    # This directive allows you set case sensitive DBI Attributes.
    # There can be several such directives.
    #
    #Set sqlite_unicode 1
    #
    #Set RaiseError     0
    #Set PrintError     0



    #######################################
    ## For system command (Type command) ##
    #######################################

lib/App/MonM/Store.pm  view on Meta::CPAN

use constant {
    DB_FILENAME         => 'monm.db',
    DEFAULT_DSN_MASK    => 'dbi:SQLite:dbname=%s',
    DEFAULT_DBI_ATTR    => {
            dsn         => '', # See DEFAULT_DSN_MASK
            user        => '',
            password    => '',
            set         => [
                    'RaiseError 0',
                    'PrintError 0',
                    'sqlite_unicode 1',
                ],
        },
};

use constant CHECKIT_DDL => <<'DDL';
CREATE TABLE IF NOT EXISTS monm (
    `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    `time` NUMERIC DEFAULT 0,         -- time()
    `name` CHAR(255) DEFAULT NULL,    -- name of checkit section
    `type` CHAR(32) DEFAULT NULL,     -- http/dbi/command



( run in 0.351 second using v1.01-cache-2.11-cpan-88abd93f124 )