SchemaFromCreateTable class
Reads the Table definition from a CreateTableStatement.
Constructors
- SchemaFromCreateTable({bool driftExtensions = false, bool driftUseTextForDateTime = false, AnalyzeStatementOptions? statementOptions})
-
const
Properties
- driftExtensions → bool
-
Whether we should provide additional type hints for nonstandard
BOOL
andDATETIME
columns.final - driftUseTextForDateTime → bool
-
Whether the
DATE
column type (only respected if driftExtensions are enabled) should be reported as a text column instead of an int column.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statementOptions → AnalyzeStatementOptions?
-
final
Methods
-
columnAffinity(
String? typeName) → BasicType? - Looks up the correct column affinity for a declared type name with the rules described here: https://www.sqlite.org/datatype3.html#determination_of_column_affinity
-
isValidTypeNameForStrictTable(
String typeName) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
TableInducingStatement stmt) → Table -
Reads a Table schema from the
stmt
inducing a table (either a CreateTableStatement or a CreateVirtualTableStatement). -
readView(
AnalysisContext context, CreateViewStatement stmt) → View -
Creates a View from a CreateViewStatement. The
CREATE VIEW
statement must be fully resolved throughcontext
when calling this method. -
resolveColumnType(
String? typeName, {bool isStrict = false}) → ResolvedType -
Resolves a column type via its typename, see the linked rules below.
Additionally, if driftExtensions are enabled, we support IsBoolean and
IsDateTime hints if the type name contains
BOOL
orDATE
, respectively. https://www.sqlite.org/datatype3.html#determination_of_column_affinity -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited