Method |
Description |
|
__construct ( mixed $host, string $database = null, string $username = null, string $password = null, array $options = [] ) : void |
|
|
connection ( ) : object |
Get database connection |
|
create ( $source, array $data ) |
Create new row object with set properties |
|
createDatabase ( $database ) |
Create a database
Will throw errors if user does not have proper permissions |
|
dateFormat ( ) : string |
Get database format |
|
dateTimeFormat ( ) : string |
Get database format |
|
delete ( string $source, array $data ) |
Delete entities matching given conditions |
|
dropDatabase ( $database ) |
Drop a database table
Destructive and dangerous - drops entire table and all data
Will throw errors if user does not have proper permissions |
|
dropDatasource ( $source ) |
Drop a database table
Destructive and dangerous - drops entire table and all data |
|
dsn ( ) : string |
Get DSN string for PDO to connect with |
|
escape ( string $string ) |
Escape/quote direct user input |
|
migrate ( String $table, array $fields ) |
Migrate table structure changes to database |
|
migrateTableCreate ( $table, array $formattedFields ) |
Execute a CREATE TABLE command |
|
migrateTableUpdate ( $table, array $formattedFields ) |
Execute an ALTER/UPDATE TABLE command |
|
prepare ( $sql ) |
Prepare an SQL statement |
|
read ( phpDataMapper_Query $query ) |
Build a select statement in SQL
Can be overridden by adapters for custom syntax |
|
statementBinds ( array $conditions = [] ) |
Returns array of binds to pass to query function |
|
statementConditions ( array $conditions = [] ) |
Builds an SQL string given conditions |
|
statementFields ( array $fields = [] ) |
Return fields as a string for a query statement |
|
timeFormat ( ) : string |
Get database time format |
|
toCollection ( phpDataMapper_Query $query, $stmt ) |
Return result set for current query |
|
truncateDatasource ( $source ) |
Truncate a database table
Should delete all rows and reset serial/auto_increment keys to 0 |
|
update ( $source, array $data, array $where = [] ) |
Update entity |
|