Building an INSERT query.
These four classes will share some functionality, so let us share!
Methods
The only bit of magic in this codebase. This is necessary so we can add
mixins.
__call(string $name, $params) : \Peyote\Query
Inherited
| inherited_from |
\Peyote\Query::__call() |
Parameters
$name
stringThe name of the method to call
$params
Exceptions
Returns
Creates the method map. Make sure you call parent::__construct()
after all of your main passthru objects are created.
__construct(string $table)
Inherited
| inherited_from |
\Peyote\Query::__construct() |
Parameters
$table
stringThe name of the table
Adds "mixin" methods to this class.
addMethods(string $mixin, array $methods) : \Petoyte\Query
Inherited
| inherited_from |
\Peyote\Query::addMethods() |
Parameters
$mixin
stringThe name of the mixin
$methods
arrayA list of methods to add
Returns
\Petoyte\Query
Specify the columns to insert.
columns(array $columns) : \Peyote\Insert
Parameters
$columns
arrayThe columns
Returns
Compiles the query into raw SQL
compile() : string
Gets all of the bound parameters for this query.
getParams() : array
Inherited
| inherited_from |
\Peyote\Query::getParams() |
Returns
array
Sets the name of the table.
table(string $name) : \Peyote\Query
Inherited
| inherited_from |
\Peyote\Query::table() |
Parameters
$name
stringThe table name
Returns
The values to add to the insert statement.
values(array $values) : \Peyote\Insert
Parameters
$values
arrayThe column values
Returns
Compiles all of the mixins into an array.
compileMixins() : array
Inherited
| inherited_from |
\Peyote\Query::compileMixins() |
Returns
arrayAll of the mixins into an array.
Properties
A list of mixins that the query can passthru
$mixins : array
Inherited
| inherited_from |
\Peyote\Query::$$mixins |
Bound parameters
$params : array
Inherited
| inherited_from |
\Peyote\Query::$$params |
The name of the table
$table : string
Inherited
| inherited_from |
\Peyote\Query::$$table |
A list of columns to insert
$columns : array
A map of passthru methods
$method_map : array
Inherited
| inherited_from |
\Peyote\Query::$$method_map |
A list of values to insert
$values : array