PHP 클래스 Pop\Db\Record\Prepared

저자: Nick Sagona, III ([email protected])
상속: extends AbstractRecord
파일 보기 프로젝트 열기: nicksagona/PopPHP

보호된 프로퍼티들

프로퍼티 타입 설명
$placeholder string Prepared statement parameter placeholder

공개 메소드들

메소드 설명
__construct ( Db $db, array $options ) : Prepared Constructor
delete ( array $columnsPassed, array $columns = null ) : void Delete the database record.
execute ( string $sql, array $params = null ) : void Execute a custom prepared SQL query.
findAll ( string $order = null, array $columns = null, integer $limit = null, integer $offset = null ) : void Find all of the database rows by the column passed through the method argument.
findBy ( array $columns, string $order = null, integer $limit = null, integer $offset = null ) : void Find a database row by the column passed through the method argument.
findById ( mixed $id, integer $limit = null, integer $offset = null ) : void Find a database row by the primary ID passed through the method argument.
getCount ( array $columns = null ) : integer Get total count of records
query ( string $sql ) : void Execute a custom SQL query.
save ( array $columnsPassed, integer $type = Pop\Db\Record::INSERT ) : void Save the database record.

보호된 메소드들

메소드 설명
getPlaceholder ( string $column, integer $i = 1 ) : string Get the placeholder for a prepared statement
setResults ( ) : void Set the query results.

메소드 상세

__construct() 공개 메소드

Instantiate the record prepared object.
public __construct ( Db $db, array $options ) : Prepared
$db Pop\Db\Db
$options array
리턴 Prepared

delete() 공개 메소드

Delete the database record.
public delete ( array $columnsPassed, array $columns = null ) : void
$columnsPassed array
$columns array
리턴 void

execute() 공개 메소드

Execute a custom prepared SQL query.
public execute ( string $sql, array $params = null ) : void
$sql string
$params array
리턴 void

findAll() 공개 메소드

Find all of the database rows by the column passed through the method argument.
public findAll ( string $order = null, array $columns = null, integer $limit = null, integer $offset = null ) : void
$order string
$columns array
$limit integer
$offset integer
리턴 void

findBy() 공개 메소드

Find a database row by the column passed through the method argument.
public findBy ( array $columns, string $order = null, integer $limit = null, integer $offset = null ) : void
$columns array
$order string
$limit integer
$offset integer
리턴 void

findById() 공개 메소드

Find a database row by the primary ID passed through the method argument.
public findById ( mixed $id, integer $limit = null, integer $offset = null ) : void
$id mixed
$limit integer
$offset integer
리턴 void

getCount() 공개 메소드

Get total count of records
public getCount ( array $columns = null ) : integer
$columns array
리턴 integer

getPlaceholder() 보호된 메소드

Get the placeholder for a prepared statement
protected getPlaceholder ( string $column, integer $i = 1 ) : string
$column string
$i integer
리턴 string

query() 공개 메소드

Execute a custom SQL query.
public query ( string $sql ) : void
$sql string
리턴 void

save() 공개 메소드

Save the database record.
public save ( array $columnsPassed, integer $type = Pop\Db\Record::INSERT ) : void
$columnsPassed array
$type integer
리턴 void

setResults() 보호된 메소드

Set the query results.
protected setResults ( ) : void
리턴 void

프로퍼티 상세

$placeholder 보호되어 있는 프로퍼티

Prepared statement parameter placeholder
protected string $placeholder
리턴 string