Krai_Db_Handler __construct(
)
|
|
Constructor.
This function initializes and configures every descendent of this class. It loads the configuration data for the databases.
Information Tags:
Redefined in descendants as:
Generate a query struct for a delete query
This function is a factory for Krai_Struct_Dbquery_Delete structs
Parameters:
API Tags:
Fetch a database record from a query as an object
This function fetches a row from the resultset of a query as an object
Parameters:
API Tags:
| Return: | The row (false if an error or no more rows) |
| Abstract: | |
| Access: | public |
Redefined in descendants as:
Fetch a database record from a query as an array
This function fetches a row from the resultset of a query as an associative array.
Parameters:
API Tags:
| Return: | The row (false if an error or no more rows) |
| Abstract: | |
| Access: | public |
Redefined in descendants as:
Fetch just one column from the result.
This is a holdover from something else that I do not recall. Leaving it for now.
Parameters:
API Tags:
Redefined in descendants as:
string GetJoins(
$tables
)
|
|
Generate the joins from a table array
This function takes an array of tables and joins and generates sql join fragements from them. Any entry with a numerical key is included as a straight join. Any entry with a string key is processed with the key being the table to do a LEFT JOIN with, and the value being the condition(s) on which to join the table.
This can be overridden by specific adapters to generate the proper syntax if it is not correct for that adapter.
Parameters:
|
array |
$tables: |
Array of tables to join |
API Tags:
| Return: | The join syntax |
| Access: | protected |
Generate a query struct for an insert query
This function is a factory for Krai_Struct_Dbquery_Insert structs
Parameters:
API Tags:
Process a query struct according to its type.
This function processes a query struct in the proper format for the database adapter.
Parameters:
API Tags:
Redefined in descendants as:
mixed Query(
string
$querytype, string
$sql, [
$params = array()]
)
|
|
Execute an SQL query
This function executes a specified SQL query using the passed parameters.
Parameters:
|
string |
$querytype: |
The type of query that is to be executed (one of "select","insert","update","delete","transaction" -- use "select" for things like DESCRIBE) |
|
string |
$sql: |
The query to execute |
|
array |
$params: |
Parameters for the query |
API Tags:
Redefined in descendants as:
Krai_Struct_Dbquery_Find SelectQuery(
mixed
$tables
)
|
|
Generate a query struct for a find query
This function is a factory for Krai_Struct_Dbquery_Find structs
Parameters:
API Tags:
void Transaction(
string
$_action
)
|
|
Transaction controller
This function wraps any transactional abilities the implementing adapter might have.
Parameters:
|
string |
$_action: |
One of "start", "commit", or "rollback" |
API Tags:
Redefined in descendants as:
Generate a query struct for an update query
This function is a factory for Krai_Struct_Dbquery_Update structs
Parameters:
API Tags: