pub struct Flavor {
pub search_terms: bool,
pub contains_all_patterns: bool,
pub compiles_aggregates: bool,
pub object_path: Option<ObjectPathCheck>,
pub indexed_distance: Option<i64>,
pub sqlite: Option<SqliteFlavor>,
pub ids: Option<IdCollation>,
}Expand description
How a builder compiles some filters, as utopia-php/database’s builder
subclasses do. The default compiles as this library does.
Fields§
§search_terms: boolPrepares full-text search terms as 7.x did: every character other than a letter, a number, an underscore or whitespace separates words, and a term wrapped in double quotes stays an exact search (MySQL, MariaDB, PostgreSQL).
PHP: Utopia\Database\Builder\PreparesSearchTerms.
contains_all_patterns: boolcontainsAll() on an attribute that is not an array matches as 7.x
did: each value is a LIKE pattern on the whole value, and a row
matching any one of them is returned (MySQL, MariaDB, PostgreSQL).
PHP: Utopia\Database\Builder\MatchesContainsAllPatterns.
compiles_aggregates: boolCompiles the aggregates MySQL and MariaDB answer differently from the
other engines. Each floating aggregate (sum, avg, the variances
and, through SQRT() of a variance, the deviations) compiles through
the engine’s float range check, + 0, which raises an error for a
value that is not finite: both send a DOUBLE aggregate that
overflowed as 0 over the text protocol, and turn an infinite or
undefined variance into DBL_MAX or NULL under STDDEV. Each
bitwise aggregate is cast to SIGNED: both answer BIT_AND,
BIT_OR and BIT_XOR as BIGINT UNSIGNED, and the cast reads the
same 64 bits as the two’s complement integer PostgreSQL answers. An
unaliased aggregate keeps the name the engine gave it.
PHP: Utopia\Database\Builder\CompilesAggregates (8.3.4; until
then RaisesFloatOverflow, without the bitwise cast).
object_path: Option<ObjectPathCheck>Checks the path of a filter into an object attribute
(attribute.key.key) before it compiles (PostgreSQL); its error is
the filter’s.
PHP: Utopia\Database\Builder\Postgres::compileFilter().
indexed_distance: Option<i64>distanceLessThan() leads with a predicate the spatial index serves,
in this SRID (PostgreSQL).
PHP: Utopia\Database\Builder\Postgres::compileSpatialFilter().
sqlite: Option<SqliteFlavor>SQLite’s overrides.
ids: Option<IdCollation>Compares document ids in the collation of their unique indexes (SQLite, PostgreSQL).
PHP: Utopia\Database\Builder\CollatesDocumentIds.