NAME

DBIx::Thin::Driver - A base class for database driver

CLASS METHODS

new

Creates an instance.

create(%args)

Returns an instance of DBIx::Thin::Driver's sub-class.

ARGUMENTS

dsn: Datasource
username: username
password: password
connect_options: other options
dbh: Database handle (OPTIONAL)

INSTANCE METHODS

connect($args)

Connects to your database with DBI->connect. After connect(), you can call execute_update, execute_select, etc...

Returns this driver itself.

connection_info()

Get/Set DBI connection_info.

dbh

Returns dbh. If you haven't called 'connect', this method calls 'connect' automatically.

execute_select($sql, $bind)

Executes a query for selection.

ARGUMENTS sql : query to be executed bind : bind parameters (ARRAYREF)

execute_update($sql, $bind)

Executes a query for updating. (INSERT, UPDATE, DELETE)

ARGUMENTS sql : query to be executed bind : bind parameters (ARRAYREF)

last_insert_id

Returns id of last inserted row.

sql_for_unixtime

Returns unixtime. The default implementation is just calling `time()' in perl.

bulk_insert

Interface for inserting multi rows.