StatementBuffer class final

A mutable buffer of SQL text, parameters and associated state.

This is used by StatementCompiler implementations to generate SQL from Dart.

Constructors

StatementBuffer(DriftDialect dialect)
Creates an empty statement buffer.

Properties

buffer → StringBuffer
The StringBuffer building SQL text.
final
dialect → DriftDialect
The DriftDialect for which this statement has been generated.
final
hashCode → int
The hash code for this object.
no setterinherited
hasMultipleTables ↔ bool
Whether this statement operates on multiple tables.
getter/setter pair
isReadOnly ↔ bool
Whether the generated statement does not alter any database state.
getter/setter pair
possibleUpdates → Set<TableUpdate>
A set of tables that might get updated when running the statement.
final
resultSetStructure ↔ ResultSetStructure?
For statements that return columns, the ResultSetStructure describing expected columns.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supportsVariables ↔ bool
Whether variables are supposed in the generated statement.
getter/setter pair
variableOffset ↔ int
The last index of a SQL variable that has already been used in this statement, or 0 initially.
getter/setter pair
variables → List<Variable<Object>>
Instantiations of parameters (typically from Variable instances) that have been added to the statement.
final
watchedTables → Set<SchemaEntityWithResultSet<Object, ResultSet<Object, dynamic>>>
For read-only queries, a set of tables directly referenced in the query.
final

Methods

comma() → void
Writes a comma into this statement's buffer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
semicolon() → void
Writes a semicolon into this statement's buffer.
space() → void
Writes a space into this statement's buffer.
toStatementInfo() → StatementInfo
Returns a StatementInfo reflecting the current state of this compiled statement buffer.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited