NAME

App::MonM::Checkit::DBI - Checkit DBI subclass

VIRSION

Version 1.01

SYNOPSIS

<Checkit "foo">

    Enable  yes
    Type    dbi
    DSN     DBI:mysql:database=DBNAME;host=127.0.0.1
    SQL     "SELECT 'OK' AS OK FROM DUAL"
    User    USER
    Password PASSWORD
    Timeout 15s
    Set RaiseError  0
    Set PrintError     0
    Set mysql_enable_utf8   0

    # . . .

</Checkit>

DESCRIPTION

Checkit DBI subclass

check

Checkit method. This is backend method of "check" in App::MonM::Checkit

Returns:

code

The DBH error code ($dbh->err)

content

The merged response content

message

OK or ERROR value, see "status"

source

DSN of DBI connection

status

0 if error occured; 1 if no errors found

CONFIGURATION DIRECTIVES

The basic Checkit configuration options (directives) detailed describes in "CONFIGURATION DIRECTIVES" in App::MonM::Checkit

Content, SQL
SQL "SELECT 'OK' AS OK FROM DUAL"

Specifies the SQL query string (as content)

Default: "SELECT 'OK' AS OK FROM DUAL"

DSN
DSN     DBI:mysql:database=DATABASE;host=HOSTNAME

Sets Database DSN string

Default: dbi:Sponge:

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

Timeout
Timeout    1m

Defines the timeout of DBI requests

Default: off

Username, Password
User        USER
Password    PASSWORD

Defines database credential: username and password

Default: no specified

HISTORY

See Changes file

TO DO

See TODO file

BUGS

* none noted

SEE ALSO

App::MonM

AUTHOR

Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>

COPYRIGHT

Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved

LICENSE

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

See LICENSE file and https://dev.perl.org/licenses/