NAME
DBIx::SearchBuilder::Handle - Perl extension which is a generic DBI handle
SYNOPSIS
use DBIx::SearchBuilder::Handle;
my $Handle = DBIx::SearchBuilder::Handle->new();
$Handle->Connect( Driver => 'mysql',
Database => 'dbname',
Host => 'hostname',
User => 'dbuser',
Password => 'dbpassword');
DESCRIPTION
Jesse's a slacker.
Blah blah blah.
AUTHOR
Jesse Vincent, jesse@fsck.com
new
Generic constructor
Insert $TABLE_NAME @KEY_VALUE_PAIRS
Takes a table name and a set of key-value pairs in an array. splits the key value pairs, constructs an INSERT statement and performs the insert. Returns the row_id of this row.
Connect PARAMHASH: Driver, Database, Host, User, Password
Takes a paramhash and connects to your DBI datasource.
RaiseError [MODE]
Turns on the Database Handle's RaiseError attribute.
PrintError [MODE]
Turns on the Database Handle's PrintError attribute.
Disconnect
Disconnect from your DBI datasource
dbh [HANDLE]
Return the current DBI handle. If we're handed a parameter, make the database handle that.
UpdateRecordValue
Takes a hash with fields: Table, Column, Value PrimaryKeys, and IsSqlFunction. Table, and Column should be obvious, Value is where you set the new value you want the column to have. The primary_keys field should be the lvalue of DBIx::SearchBuilder::Record::PrimaryKeys(). Finally sql_function_p is set when the Value is a SQL function. For example, you might have ('Value'=>'PASSWORD(string)'), by setting sql_function_p that string will be inserted into the query directly rather then as a binding.
UpdateTableValue TABLE COLUMN NEW_VALUE RECORD_ID IS_SQL
Update column COLUMN of table TABLE where the record id = RECORD_ID. if IS_SQL is set, don\'t quote the NEW_VALUE
SimpleQuery QUERY_STRING, [ BIND_VALUE, ... ]
Execute the SQL string specified in QUERY_STRING
FetchResult QUERY, [ BIND_VALUE, ... ]
Takes a SELECT query as a string, along with an array of BIND_VALUEs Returns the first row as an array
SEE ALSO
perl(1), DBIx::SearchBuilder