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
trait like functionality in 5.3
__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 "trait" methods to this class.
addMethods(string $trait, array $methods) : \Petoyte\Query
Inherited
| inherited_from |
\Peyote\Query::addMethods() |
Parameters
$trait
stringThe name of the trait
$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
Properties
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 traits that the query can passthru
$traits : array
Inherited
| inherited_from |
\Peyote\Query::$$traits |
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