SilverStripe\FullTextSearch\Search\Criteria\SearchCriterion
Class SearchCriterion
Synopsis
class SearchCriterion
implements
SearchCriteriaInterface
{
- // constants
- const EQUAL = 'EQUAL';
- const NOT_EQUAL = 'NOT_EQUAL';
- const GREATER_EQUAL = 'GREATER_EQUAL';
- const GREATER_THAN = 'GREATER_THAN';
- const LESS_EQUAL = 'LESS_EQUAL';
- const LESS_THAN = 'LESS_THAN';
- const IN = 'IN';
- const NOT_IN = 'NOT_IN';
- const ISNULL = 'ISNULL';
- const ISNOTNULL = 'ISNOTNULL';
- const CUSTOM = 'CUSTOM';
- // members
- protected $comparison;
- protected $target;
- protected $value;
- protected SearchAdapterInterface $adapter;
- protected AbstractSearchQueryWriter $searchQueryWriter;
- // methods
- public void __construct()
- public SearchAdapterInterface getAdapter()
- public $this setAdapter()
- public void appendPreparedStatementTo()
- public string getQuoteValue()
- public AbstractSearchQueryWriter getSearchQueryWriter()
- public $this setSearchQueryWriter()
- public string getComparison()
- protected $this setComparison()
- public string getTarget()
- protected $this setTarget()
- public string|array getValue()
- protected $this setValue()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
Implements
Constants
Name | Value |
---|---|
EQUAL | 'EQUAL' |
NOT_EQUAL | 'NOT_EQUAL' |
GREATER_EQUAL | 'GREATER_EQUAL' |
GREATER_THAN | 'GREATER_THAN' |
LESS_EQUAL | 'LESS_EQUAL' |
LESS_THAN | 'LESS_THAN' |
IN | 'IN' |
NOT_IN | 'NOT_IN' |
ISNULL | 'ISNULL' |
ISNOTNULL | 'ISNOTNULL' |
CUSTOM | 'CUSTOM' |
Members
protected
- $adapter — SilverStripe\FullTextSearch\Search\Adapters\SearchAdapterInterface
- $comparison — string
- $searchQueryWriter — SilverStripe\FullTextSearch\Search\Queries\AbstractSearchQueryWriter
- $target
—
string
The table and field that this Criterion is applied to. - $value — mixed
Methods
protected
public
- __construct()
- appendPreparedStatementTo()
- getAdapter()
- getComparison()
- getQuoteValue() — String values should be passed into our filter string with quotation marks and escaping.
- getSearchQueryWriter()
- getTarget()
- getValue()
- setAdapter()
- setSearchQueryWriter()