\Dewdrop\Db\Select\FilterNumeric

A filter implementation for numeric data types

Summary

Methods
Properties
Constants
__construct()
apply()
No public properties found
OP_IS
OP_IS_BETWEEN
OP_IS_LESS_THAN
OP_IS_MORE_THAN
getComparisonExpression()
isExpr()
ensurePresenceOfRequiredQueryVars()
$columnName
$tableName
$expr
N/A
No private methods found
No private properties found
N/A

Constants

OP_IS

OP_IS

OP_IS_BETWEEN

OP_IS_BETWEEN

OP_IS_LESS_THAN

OP_IS_LESS_THAN

OP_IS_MORE_THAN

OP_IS_MORE_THAN

Properties

$columnName

$columnName : string

The name of the DB column you need to filter.

Type

string

$tableName

$tableName : string

The name of the table in which the filtered column is present.

Type

string

Methods

__construct()

__construct() 

This filter implementation can be instantiated in one of two ways:

1) By passing the table and column names, respectively 2) By passing an arbitrary SQL expression as an instance of \Dewdrop\Db\Expr

Throws

\Dewdrop\Db\Select\Filter\Exception

apply()

apply(\Dewdrop\Db\Select  $select, string  $conditionSetName, array  $queryVars) : \Dewdrop\Db\Select

Apply the filter to the supplied Select object.

Parameters

\Dewdrop\Db\Select $select
string $conditionSetName
array $queryVars

Throws

\Dewdrop\Db\Select\Filter\Exception\InvalidOperator

Returns

\Dewdrop\Db\Select

getComparisonExpression()

getComparisonExpression(\Dewdrop\Db\Select  $select) 

Parameters

\Dewdrop\Db\Select $select

isExpr()

isExpr() : boolean

Returns

boolean

ensurePresenceOfRequiredQueryVars()

ensurePresenceOfRequiredQueryVars(array  $queryVars) 

Ensure the expected input vars were supplied before we attempt to apply a filter. We need the "comp" variable, which gives us the operator, along with two operands.

Parameters

array $queryVars

Throws

\Dewdrop\Db\Select\Filter\Exception\MissingQueryVar