AS_ARRAY
AS_ARRAY
Constants to set individual row data type
Record class
$rowGateway : \Pop\Db\Gateway\Row
Row gateway
$tableGateway : \Pop\Db\Gateway\Table
Table gateway
setTable(string $table) : \Pop\Db\Record\AbstractRecord
Set the table
string | $table |
setPrefix(string $prefix) : \Pop\Db\Record\AbstractRecord
Set the table prefix
string | $prefix |
setPrimaryKeys(array $keys) : \Pop\Db\Record\AbstractRecord
Set the primary keys
array | $keys |
addRelationship(integer $id, \Pop\Db\Record\AbstractRecord $row = null) : \Pop\Db\Record\AbstractRecord
Add eager relationship
integer | $id | |
\Pop\Db\Record\AbstractRecord | $row |
addWith(string $name, array $options = null) : \Pop\Db\Record\AbstractRecord
Set eager with
string | $name | |
array | $options |
getRowGateway() : \Pop\Db\Gateway\Row
Get the row gateway
getTableGateway() : \Pop\Db\Gateway\Table
Get the table gateway
getRows() : \Pop\Db\Record\Collection
Get the rows
rows() : \Pop\Db\Record\Collection
Get the rows (alias method)
setColumns(mixed $columns = null) : \Pop\Db\Record\AbstractRecord
Set all the table column values at once
mixed | $columns |
setRows(array $rows = null, string $resultAs = \Pop\Db\Record\AbstractRecord::AS_RECORD) : \Pop\Db\Record\AbstractRecord
Set all the table rows at once
array | $rows | |
string | $resultAs |
setDb(\Pop\Db\Adapter\AbstractAdapter $db, string $prefix = null, boolean $isDefault = false) : void
Set DB adapter
\Pop\Db\Adapter\AbstractAdapter | $db | |
string | $prefix | |
boolean | $isDefault |
setDefaultDb(\Pop\Db\Adapter\AbstractAdapter $db) : void
Set DB adapter
\Pop\Db\Adapter\AbstractAdapter | $db |
getDb() : \Pop\Db\Adapter\AbstractAdapter
Get DB adapter
db() : \Pop\Db\Adapter\AbstractAdapter
Get DB adapter (alias)
getSql() : \Pop\Db\Sql
Get SQL builder
sql() : \Pop\Db\Sql
Get SQL builder (alias)
findById(mixed $id) : static|\Pop\Db\Record\Collection
Find by ID static method
mixed | $id |
findBy(array $columns = null, array $options = null, string $resultAs = \Pop\Db\Record::AS_RECORD) : \Pop\Db\Record\Collection
Find by static method
array | $columns | |
array | $options | |
string | $resultAs |
findByOrCreate(array $columns = null, array $options = null, string $resultAs = \Pop\Db\Record::AS_RECORD) : \Pop\Db\Record\Collection
Find by or create static method
array | $columns | |
array | $options | |
string | $resultAs |
findAll(array $options = null, string $resultAs = \Pop\Db\Record::AS_RECORD) : \Pop\Db\Record\Collection
Find all static method
array | $options | |
string | $resultAs |
execute(mixed $sql, array $params, string $resultAs = \Pop\Db\Record::AS_RECORD) : \Pop\Db\Record\Collection
Static method to execute a custom prepared SQL statement.
mixed | $sql | |
array | $params | |
string | $resultAs |
query(mixed $sql, string $resultAs = \Pop\Db\Record::AS_RECORD) : \Pop\Db\Record\Collection
Static method to execute a custom SQL query.
mixed | $sql | |
string | $resultAs |
getById(mixed $id) : static|\Pop\Db\Record\Collection
Get by ID method
mixed | $id |
getBy(array $columns = null, array $options = null, string $resultAs = \Pop\Db\Record::AS_RECORD) : \Pop\Db\Record\Collection
Get by method
array | $columns | |
array | $options | |
string | $resultAs |
getAll(array $options = null, string $resultAs = \Pop\Db\Record::AS_RECORD) : \Pop\Db\Record\Collection
Get all method
array | $options | |
string | $resultAs |