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
string
The 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
string
The 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
string
The name of the mixin
$methods
array
A list of methods to add
Returns
\Petoyte\Query
Specify the columns to insert.
columns(array $columns) : \Peyote\Insert
Parameters
$columns
array
The 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
string
The table name
Returns
The values to add to the insert statement.
values(array $values) : \Peyote\Insert
Parameters
$values
array
The column values
Returns
Compiles all of the mixins into an array.
compileMixins() : array
Inherited
inherited_from |
\Peyote\Query::compileMixins() |
Returns
array
All 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