PHP Class Pop\Db\Record\Escaped

Author: Nick Sagona, III ([email protected])
Inheritance: extends AbstractRecord
Exibir arquivo Open project: nicksagona/PopPHP

Public Methods

Method Description
__construct ( Db $db, array $options ) : Escaped Constructor
delete ( array $columnsPassed, array $columns = null ) : void Delete the database record.
execute ( string $sql, array $params = null ) : void Execute a custom 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.

Protected Methods

Method Description
setResults ( ) : void Set the query results.

Method Details

__construct() public method

Instantiate the record escaped object.
public __construct ( Db $db, array $options ) : Escaped
$db Pop\Db\Db
$options array
return Escaped

delete() public method

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

execute() public method

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

findAll() public method

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
return void

findBy() public method

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
return void

findById() public method

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
return void

getCount() public method

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

query() public method

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

save() public method

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

setResults() protected method

Set the query results.
protected setResults ( ) : void
return void