Building a DELETE query.

See Select for the full rant, but the tl;dr is that php 4 is messing up my classes, so I have to actually declare where() and limit() in this class instead of just using the cool passthru functionality.

package Peyote
author Dave Widmer

 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

\Peyote\Exception

Returns

Optionally sets the table name and initializes the internal class properties.

__construct(string $table) 

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

Compiles the query into raw SQL

compile() : string

Returns

string

Gets all of the bound parameters for this query.

getParams() : array

Returns

array

Sets the limit.

limit(int $num) : \Peyote\Select

Parameters

$num

int

The number to limit the queries to

Returns

Sets the name of the table.

table(string $name) : \Peyote\Query
Inherited

inherited_from \Peyote\Query::table()

Parameters

$name

string

The table name

Returns

Adds a WHERE clause.

where(string $column, string $op, mixed $value) : \Peyote\Delete

Parameters

$column

string

The column name

$op

string

The comparison operator

$value

mixed

The value to bind

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

 

The limit object

$limit : \Peyote\Limit

 

A list of mixins that the query can passthru

$mixins : array

 

The order object

$order_by : \Peyote\Order

 

Bound parameters

$params : array
Inherited

inherited_from \Peyote\Query::$$params
 

The name of the table

$table : string
Inherited

inherited_from \Peyote\Query::$$table
 

The where object

$where : \Peyote\Where

 

A map of passthru methods

$method_map : array
Inherited

inherited_from \Peyote\Query::$$method_map