NAME

App::JESP::Driver - DB Specific stuff superclass.

apply_patch

Applies the given App::JESP::Patch to the database. Dies in case of error.

You do NOT need to implement that in subclasses.

Usage:

$this->apply_patch( $patch );

apply_script

Runs the given 'script' file, with the given environment:

JESP_DSN : The full Perl DSN string
JESP_USER: DB User
JESP_PASSWORD: DB Password
JESP_SCHEME: 'dbi'
JESP_DRIVER: The name of the DBI driver in use
JESP_DRIVER_DSN: the part of the DSN after the driver

Then the JESP_DRIVER_DSN is parsed and split into its components to generate environment variables. The most common is:

JESP_DATABASE: Name of the database to connect to
JESP_PORT: The port to connect to.
...

apply_sql

Databases and their drivers vary a lot when it comes to apply SQL patches. Some of them are just fine with sending a blog of SQL to the driver, even when it contains multiple statements and trigger or procedure, function definitions.

Some of them require a specific implementation.

This is the default implementation that just use the underlying DB connection to send the patch SQL content.