FtsQuery class base

A base helper class for composing FTS queries.

This wrapper class and its descendants do not prevent the composition of invalid FTS queries; the goal is only to simplify the composition process by avoiding direct string concatenation and interpolation. For example, the following fragment composes an FTS query using FtsI and FtsP.quote, encloses it in a table-valued function call using SqlT and SqlS, and finally passes the "\"timetable\"('(\"months\": \"january\")')" string to the SQLite.prepare function:

FtsQ ftsQuery = FtsI(["months"], FtsP.quote("january"));
QueryId qid = sqlite.prepare(
  search: SqlT("timetable", SqlS(ftsQuery)),
  /* ... */

See also: Sql.

Implementers
Annotations
  • @immutable

Constructors

FtsQuery(String str)
Wraps the FTS query construct provided in the given str argument.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
str String
The FTS query construct wrapped by this FtsQuery instance.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
not(FtsQ q) FtsQ
Composes and returns a parenthesis-enclosed binary NOT operator.
parens() FtsQ
Encloses this FTS query construct in parentheses and returns the result.
toString() String
A string representation of this object.
inherited

Operators

operator &(FtsQ q) FtsQ
Composes and returns a parenthesis-enclosed AND operator.
operator ==(Object other) bool
The equality operator.
inherited
operator |(FtsQ q) FtsQ
Composes and returns a parenthesis-enclosed OR operator.