SQLGenerator class abstract mixin

Base class for a SQL generator.

Implementers

Constructors

SQLGenerator()

Properties

dialect SQLDialect
The generated SQL dialect.
no setter
dialectName String
The generated SQL dialect name.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

entityTypeToSQLType(TypeInfo type, String? column, {List<EntityField>? entityFieldAnnotations}) MapEntry<String, MapEntry<String, String>>?
Returns info for the column: table -> idName: sqlType
enumTypeToSQLType(Type type, String column, {List<EntityField>? entityFieldAnnotations}) MapEntry<String, List<String>>?
Returns: ENUM: valuesNames
foreignKeyTypeToSQLType(TypeInfo idType, String idName, {List<EntityField>? entityFieldAnnotations}) String?
generateAddColumnAlterTableSQL(String table, String fieldName, TypeInfo fieldType, {List<EntityField>? entityFieldAnnotations}) AlterTableSQL
generateAddEnumConstraintAlterTableSQL(String table, String fieldName, TypeInfo fieldType, {List<EntityField>? entityFieldAnnotations}) AlterTableSQL
generateAddUniqueConstraintAlterTableSQL(String table, String fieldName, TypeInfo fieldType, {List<EntityField>? entityFieldAnnotations}) AlterTableSQL
generateCreateTableSQL({EntityRepository<Object>? entityRepository, Object? obj, Type? type, String? name, String? tableName, bool ifNotExists = true, bool sortColumns = true}) CreateTableSQL
generateCreateTableSQLs({bool ifNotExists = true, bool sortColumns = true}) FutureOr<List<SQLBuilder>>
generateFullCreateTableSQLs({String? title, bool withDate = true, bool ifNotExists = true, bool sortColumns = true}) Future<String>
Generate a full text with all the SQLs to create the tables.
getEntityRepository<O extends Object>({O? obj, Type? type, String? name, String? tableName}) EntityRepository<O>?
getEntityRepositoryByType<O extends Object>(Type type) EntityRepository<O>?
getEntityRepositoryByTypeInfo<O extends Object>(TypeInfo typeInfo) EntityRepository<O>?
getTableForEntityRepository(EntityRepository<Object> entityRepository) String
getVarcharPreferredSize(String? column) int
Returns the preferred VARCHAR size for a column name.
isSiblingEntityType(EntityRepository<Object> tableRepository, Type columnType, {EntityRepository<Object>? columnRepository}) bool
Returns true if columnType is a sibling of the tableRepository.
normalizeColumnName(String fieldName) String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
primaryKeyTypeToSQLType(Type type, {List<EntityField>? entityFieldAnnotations}) String?
toString() String
A string representation of this object.
inherited
typeToSQLType(TypeInfo type, String column, {List<EntityField>? entityFieldAnnotations}) String?

Operators

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