Method |
Description |
|
__construct ( array $config, PDO $pdo = null ) |
Create our PDO connection, then call parent |
|
buildPdo ( array $config ) : PDO |
Build the PDO instance |
|
count ( Modler\Model $model, array $where = [] ) : array |
Find count of entities by where conditions. |
|
create ( Modler\Model $model ) : boolean |
Create the record based on the data from the model |
|
delete ( Modler\Model $model ) : boolean |
Delete a record represented by the model |
|
execute ( string $sql, array $data ) : boolean |
Execute the request (not a fetch) |
|
fetch ( string $sql, array $data, boolean $single = false ) : array | boolean |
Fetch the data matching the results of the SQL operation |
|
find ( Modler\Model $model, array $where = [], boolean $multiple = false ) : array |
Find records matching the "where" data given
All "where" options are appended via "and" |
|
getDb ( ) : PDO |
Get the set PDO instance |
|
getLastError ( ) : string |
Return the last error for the data source |
|
save ( Modler\Model $model ) : boolean |
Save the model and its data (either create or update) |
|
setDb ( PDO $db ) |
Set the PDO instance |
|
setup ( array $data ) : array |
"Set up" the needed values for the database requests
(for binding to queries) |
|
update ( Modler\Model $model ) : boolean |
Update a record |
|