SelectQuery
class SelectQuery implements QueryInterface (View source)
This query class coordinates a select query build from Bolt's custom query DSL as documented here:.
Properties
protected QueryBuilder | $qb | ||
protected QueryParameterParser | $parser | ||
protected string | $contentType | ||
protected array | $params | ||
protected Filter[] | $filters | ||
protected array | $replacements | ||
protected bool | $singleFetchMode | ||
protected int | $index | ||
protected array | $coreFields | ||
protected array | $coreDateFields | ||
protected array | $taxonomyFields | ||
protected array | $referenceFields | ||
protected array | $regularFields | ||
protected string | $anything |
Methods
Constructor.
Sets the ContentType that this query will run against.
Gets the ContentType that this query will run against.
No description
No description
Sets the parameters that will filter / alter the query.
Getter to allow access to a set parameter.
Setter to allow writing to a named parameter.
Creates a composite expression that adds all the attached filters individual expressions into a combined one.
Returns all the parameters for the query.
Returns all the filters attached to the query.
Part of the QueryInterface this turns all the input into a Doctrine QueryBuilder object and is usually run just before query execution.
Allows public access to the QueryBuilder object.
Allows replacing the default QueryBuilder.
Returns whether the query is in single fetch mode.
Turns single fetch mode on or off.
No description
Internal method that runs the individual key/value input through the QueryParameterParser. This allows complicated expressions to be turned into simple sql expressions.
Allows key-value queries for bolt_user
(id) values.
Allows key-value queries for bolt_taxonomy
(slug) values.
Allows key-value queries for bolt_field
values.
No description
No description
No description
No description
No description
Details
__construct(QueryBuilder|null $qb = null, QueryParameterParser $parser, Config $config)
Constructor.
void
setContentType(string $contentType)
Sets the ContentType that this query will run against.
string
getContentType()
Gets the ContentType that this query will run against.
bool
isSingleton()
bool
shouldReturnSingle()
void
setParameters(array $params)
Sets the parameters that will filter / alter the query.
getParameter(string $name)
Getter to allow access to a set parameter.
void
setParameter(string $name, $value)
Setter to allow writing to a named parameter.
Base|null
getWhereExpression()
Creates a composite expression that adds all the attached filters individual expressions into a combined one.
array
getWhereParameters()
Returns all the parameters for the query.
void
addFilter(Filter $filter)
array
getFilters()
Returns all the filters attached to the query.
build()
Part of the QueryInterface this turns all the input into a Doctrine QueryBuilder object and is usually run just before query execution.
That allows modifications to be made to any of the parameters up until query execution time.
QueryBuilder
getQueryBuilder()
Allows public access to the QueryBuilder object.
void
setQueryBuilder(QueryBuilder $qb)
Allows replacing the default QueryBuilder.
bool|null
getSingleFetchMode()
Returns whether the query is in single fetch mode.
void
setSingleFetchMode(bool|null $value)
Turns single fetch mode on or off.
string
__toString()
protected void
processFilters()
Internal method that runs the individual key/value input through the QueryParameterParser. This allows complicated expressions to be turned into simple sql expressions.
void
doReferenceJoins()
Allows key-value queries for bolt_user
(id) values.
void
doTaxonomyJoins()
Allows key-value queries for bolt_taxonomy
(slug) values.
void
doFieldJoins()
Allows key-value queries for bolt_field
values.