SQLDAO
Implements common access to a sql based datastore for CRUD operations on objects attached to the given
MappingModel
.
- SQLDAO implements DAO
public
|
|
public
|
#
save(
Saves $object
in the table. If the object does not exist, it is created, else, just updated |
public
|
|
public
|
#
delete(
Deletes $object
from the table. If the object does not exist, nothing is done |
public
|
#
delete_all( string $where = DAO::WHERE_ALL, array $parameters = array() )
Deletes all object matching the where clause from the table. |
public
|
|
public
|
|
public
QueryResultMapper
|
|
public
QueryResultMapper
|
#
find_by_criteria( string $criteria, string[string] $parameters = array() )
retrieves all the objects in the table matching the $criteria
|
protected
|
$querier
the sql querier that will interact with the database |
|
protected
|
$model
the model on which services are based |
|
protected
string
|
$table
the name of the table in which objects will be stored |
|
protected
string
|
$pk_db_field
the primary key database field name (prefixed by the table name) |
|
protected
string
|
$pk_property
the primary key property |
|
protected
string
|
$pk_getter
the primary key getter method name |
|
protected
string
|
$pk_setter
the primary key setter method name |
|
protected
string[string]
|
$fields_mapping
$fields_mapping[$property] => $db_field_name |
#
array()
|
protected
string
|
$delete_query
the delete prepared query |
|
protected
string
|
$insert_query
the insert prepared query |
|
protected
string
|
$update_query
the update prepared query |
|
protected
string
|
$find_by_id_query
the find by id prepared query |
|
protected
string
|
$find_by_criteria_query
the find by criteria prepared query |