GenerationContext class Null safety

Contains information about a query while it's being constructed.

Constructors

GenerationContext(SqlTypeSystem typeSystem, DatabaseConnectionUser? executor, {SqlDialect dialect = SqlDialect.sqlite})
Constructs a custom GenerationContext by setting the fields manually. See GenerationContext.fromDb for a more convenient factory.
GenerationContext.fromDb(DatabaseConnectionUser? executor)
Constructs a GenerationContext by copying the relevant fields from the database.

Properties

amountOfVariables int
Returns the amount of variables that have been introduced when writing this query.
read-only
boundVariables List
The values of introducedVariables that will be sent to the underlying engine.
read-only
buffer StringBuffer
The string buffer contains the sql query as it's being constructed.
final
dialect SqlDialect
The SqlDialect that should be respected when generating the query.
final
executor DatabaseConnectionUser?
The actual DatabaseConnectionUser that's going to execute the generated query.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
hasMultipleTables bool
Whether the query obtained by this context operates on multiple tables. [...]
read / write
introducedVariables List<Variable>
All variables ("?" in sql) that were added to this context.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sql String
Gets the generated sql statement
read-only
typeSystem SqlTypeSystem
The SqlTypeSystem to use when mapping variables to values that the underlying database understands.
final
watchedTables List<ResultSetImplementation>
All tables that the generated query reads from.
final

Methods

introduceVariable(Variable v, dynamic value) → void
Introduces a variable that will be sent to the database engine. Whenever this method is called, a question mark should be added to the buffer so that the prepared statement can be executed with the variable. The value must be a type that is supported by the sqflite library. A list of supported types can be found here.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited
writeWhitespace() → void
Shortcut to add a single space to the buffer because it's used very often.

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited