The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

TITLE

WWW::Kontent::Store::NarrowDBI - Flexible Perl 5 DBI store for WWW::Kontent

SYNOPSIS

        # in kontent-config.yaml
        store:
                module: NarrowDBI
                rootname: mysite
                connection: dbi:driver:dbname
                username: jrandom
                password: secret

DESCRIPTION

NarrowDBI is a flexible Kontent store which operates via the Perl 5 DBI module. It's designed to be simple and easy to configure, and requires no customization to suit your classes.

This store supports multiple "roots"--heirarchies of pages--in the same database. This allows a single database to store multiple sites, which may be useful in certain situations. Each root is a page with a parent ID of 0; the name of the root is passed as the first argument to get_root.

NarrowDBI guarantees that pages will always be readable, even if Kontent crashes in the middle of writing a revision; however, pages may not be writable in such a circumstance unless your database supports transactions.

Configuration

NarrowDBI is configured through the Kontent configuration file, kontent-config.yaml; see that file for details. NarrowDBI recognizes the following settings:

rootname

Required; specifies which root NarrowDBI should use for this Kontent instance.

connection

Required; specifies the DBI data source name (connection string) needed to connect to the database.

username

Optional; gives the database username, if any.

password

Optional; gives the database password, if any.

In addition, the module field must be set to NarrowDBI for this module to be used, and the modules list must include Store::NarrowDBI.

Representation

NarrowDBI represents each attribute as a new row in an attributes table. As such, it is perhaps one of the least efficient designs for a DBI store, as each page retrieval requires that several rows be selected from the attributes table.

A second table maps revision IDs to page IDs and revision numbers; a third maps page IDs to parent/name pairs, and keeps track of the page's current revision. A forth table represents the pool.

SEE ALSO

WWW::Kontent, WWW::Kontent::Store

1 POD Error

The following errors were encountered while parsing the POD:

Around line 57:

=back doesn't take any parameters, but you said =back 4