moor_generator library Null safety
Classes
- AutoIncrement
- AvailableMoorResultSet
- A table or view that is available in the position of a FoundDartPlaceholder.
- BaseMoorAccessor
- Abstract class for database and dao elements.
- CapturedVariable
- ColumnDeclaration
- ColumnFeature
- ColumnGeneratedAs
- ColumnName
- Name of a column. Contains additional info on whether the name was chosen implicitly (based on the dart getter name) or explicitly (via an named()) call in the column builder dsl.
- CustomIndexDeclaration
- CustomTableDeclaration
- CustomTriggerDeclaration
- CustomVirtualTableDeclaration
- Dao
-
A dao, declared via an
UseDao
annotation on a Dart class. - DartCheckExpression
-
A column with a
CHECK()
generated from a Dart expression. - DartColumnDeclaration
- DartDeclaration
-
Declaration for elements that are declared in a
.dart
file. - DartPlaceholderType
- DartTableDeclaration
- DartViewDeclaration
- Database
-
A database, declared via a
UseMoor
annotation on a Dart class. - DatabaseOrDaoDeclaration
- Declaration of a database or dao in a Dart file.
- Declaration
- Base class for all declarations in the generator model.
- DeclaredDartQuery
- A DeclaredQuery parsed from a Dart file by reading a constant annotation.
- DeclaredMoorQuery
-
A DeclaredQuery read from a
.moor
file, where the AST is already available. - DeclaredQuery
- Represents the declaration of a compile-time query that will be analyzed by moor_generator.
- DefaultConstraintsFromSchemaFile
-
When exporting a column to a schema JSON file, all default constraints
like
PRIMARY KEY
,REFERENCES
,UNIQUE
, ...) are written as a single string. Instead of recovering all column features, the schema reader just emits this default constraints feature which is enough for schema tests. - DriftDartType
- ExistingRowClass
- Information used by the generator to generate code for a custom data class written by users.
- ExpressionDartPlaceholderType
- FoundDartPlaceholder
- A Dart placeholder that will be bound to a dynamically-generated SQL node at runtime.
- FoundElement
- Something in the query that needs special attention when generating code, such as variables or Dart placeholders.
- FoundVariable
- A semantic interpretation of a Variable in a sql statement.
- HasDeclaration
- Interface for model elements that are declared somewhere.
- HasType
- Something that has a type.
- IndexDeclaration
- InferredResultSet
- InsertableDartPlaceholderType
- InTransactionQuery
- A special kind of query running multiple inner queries in a transaction.
- LimitingTextLength
- MatchingMoorTable
- Information about a matching table. A table matches a query if a query selects all columns from that table, and nothing more.
- MoorColumn
- A column, as specified by a getter in a table.
- MoorColumnDeclaration
- MoorDeclaration
-
Declaration for elements that are declared in a
.moor
file. - MoorEntityWithResultSet
- MoorIndex
- An sql index.
- MoorIndexDeclaration
- MoorSchemaEntity
- Some schema entity found.
- MoorSpecialQueryDeclaration
- MoorTable
-
A parsed table, declared in code by extending
Table
and referencing that table in@UseMoor
or@UseDao
. - MoorTableDeclaration
- MoorTrigger
- MoorTriggerDeclaration
- MoorView
- A parsed view
- MoorViewDeclaration
- NestedQueriesContainer
- Something that can contain nested queries.
- NestedQuery
- A nested query found in a SQL statement.
- NestedResult
- A nested result, could either be a NestedResultTable or a NestedQueryResult.
- NestedResultQuery
- NestedResultTable
-
A nested table extracted from a
**
column. - PrimaryKey
-
A
PRIMARY KEY
column constraint. - ResolvedDartForeignKeyReference
- ResultColumn
- SimpleDartPlaceholderType
- SourceLocation
- Represents a single location accessible to analysis services.
- SourceRange
- Represents a range in a source file, accessible to analysis services
- SpecialQuery
- A special query, such as the ones executes when the database was created.
- SpecialQueryDeclaration
- SqlQuery
- SqlSelectQuery
- TableDeclaration
- TableDeclarationWithSql
- TableReferenceInDartView
- TriggerDeclaration
- UniqueKey
-
A
UNIQUE
column constraint. - UnresolvedDartForeignKeyReference
- UpdatingQuery
- UsedTypeConverter
- ViewDeclaration
- ViewDeclarationWithSql
- ViewQueryInformation
- WrittenMoorTable
Extensions
Constants
-
createVariable
→ const Map<
ColumnType, String> -
Maps from a column type to code that can be used to create a variable of the
respective type.
{ColumnType.boolean : 'Variable.withBool', ColumnType.text : 'Variable.withString', ColumnType.integer : 'Variable.withInt', ColumnType.datetime : 'Variable.withDateTime…
-
dartTypeNames
→ const Map<
ColumnType, String> -
{ColumnType.boolean : 'bool', ColumnType.text : 'String', ColumnType.integer : 'int', ColumnType.datetime : 'DateTime', ColumnType.blob : 'Uint8List', ColumnTyp…
-
sqlTypes
→ const Map<
ColumnType, String> -
{ColumnType.boolean : 'BoolType', ColumnType.text : 'StringType', ColumnType.integer : 'IntType', ColumnType.datetime : 'DateTimeType', ColumnType.blob : 'BlobType&…
Functions
-
dartNameForSqlColumn(
String name, {Iterable< String> existingNames = const Iterable.empty()}) → String - Selects a valid Dart name for a column in SQL.
-
dbFieldName(
String className) → String -
tableInfoNameForTableClass(
String className) → String
Enums
- ColumnType
- The column types in sql.
- SimpleDartPlaceholderKind
- SpecialQueryMode