Метод |
Описание |
|
__construct ( mixed $dsn, array $options = [] ) : void |
|
|
beginTransaction ( ) |
Begin transaction |
|
commit ( ) |
Commit transaction |
|
connection ( ) |
Get database connection |
|
count ( Query $query, array $options = [] ) |
*
Count number of rows in source based on conditions |
|
create ( $source, array $data, array $options = [] ) |
Insert entity |
|
createDatabase ( $database ) |
Create a database
Will throw errors if user does not have proper permissions |
|
date ( $format = null ) |
Get date in format that adapter understands for queries |
|
dateFormat ( ) |
Get database DATE format for PHP date() function |
|
dateTime ( $format = null ) |
Get datetime in format that adapter understands for queries |
|
dateTimeFormat ( ) |
Get database full DATETIME for PHP date() function |
|
delete ( $source, array $where, array $options = [] ) |
Delete entity |
|
dropDatabase ( $database ) |
Drop an entire database
Destructive and dangerous - drops entire table and all data
Will throw errors if user does not have proper permissions |
|
dropDatasource ( $source ) |
Drop/delete data source (table for SQL)
Destructive and dangerous - drops entire data source and all data |
|
escape ( string $string ) |
Escape/quote direct user input |
|
read ( Query $query, array $options = [] ) |
Read from data source using given query object |
|
rollback ( ) |
Rollback transaction |
|
time ( $format = null ) |
Get time in format that adapter understands for queries |
|
timeFormat ( ) |
Get database TIME format for PHP date() function |
|
truncateDatasource ( $source ) |
Truncate data source (table for SQL)
Should delete all rows and reset serial/auto_increment keys to 0 |
|
update ( $source, array $data, array $where = [], array $options = [] ) |
Update entity |
|