PHP 인터페이스 Spot\Adapter\AdapterInterface

파일 보기 프로젝트 열기: vlucas/spot

공개 메소드들

메소드 설명
__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

메소드 상세

__construct() 공개 메소드

public __construct ( mixed $dsn, array $options = [] ) : void
$dsn mixed DSN string or pre-existing raw connection object to be used instead of instantiating a new one (like PDO or Mongo, etc)
$options array
리턴 void

beginTransaction() 공개 메소드

Begin transaction
public beginTransaction ( )

commit() 공개 메소드

Commit transaction
public commit ( )

connection() 공개 메소드

Get database connection
public connection ( )

count() 공개 메소드

* Count number of rows in source based on conditions
public count ( Query $query, array $options = [] )
$query Spot\Query
$options array

create() 공개 메소드

Insert entity
public create ( $source, array $data, array $options = [] )
$data array
$options array

createDatabase() 공개 메소드

Create a database Will throw errors if user does not have proper permissions
public createDatabase ( $database )

date() 공개 메소드

Get date in format that adapter understands for queries
public date ( $format = null )

dateFormat() 공개 메소드

Get database DATE format for PHP date() function
public dateFormat ( )

dateTime() 공개 메소드

Get datetime in format that adapter understands for queries
public dateTime ( $format = null )

dateTimeFormat() 공개 메소드

Get database full DATETIME for PHP date() function
public dateTimeFormat ( )

delete() 공개 메소드

Delete entity
public delete ( $source, array $where, array $options = [] )
$where array
$options array

dropDatabase() 공개 메소드

Drop an entire database Destructive and dangerous - drops entire table and all data Will throw errors if user does not have proper permissions
public dropDatabase ( $database )

dropDatasource() 공개 메소드

Drop/delete data source (table for SQL) Destructive and dangerous - drops entire data source and all data
public dropDatasource ( $source )

escape() 공개 메소드

Escape/quote direct user input
public escape ( string $string )
$string string

read() 공개 메소드

Read from data source using given query object
public read ( Query $query, array $options = [] )
$query Spot\Query
$options array

rollback() 공개 메소드

Rollback transaction
public rollback ( )

time() 공개 메소드

Get time in format that adapter understands for queries
public time ( $format = null )

timeFormat() 공개 메소드

Get database TIME format for PHP date() function
public timeFormat ( )

truncateDatasource() 공개 메소드

Truncate data source (table for SQL) Should delete all rows and reset serial/auto_increment keys to 0
public truncateDatasource ( $source )

update() 공개 메소드

Update entity
public update ( $source, array $data, array $where = [], array $options = [] )
$data array
$where array
$options array