SqliteSerialize<_Model extends SqliteModel> class Null safety

Generate a function to produce a ClassElement to SQLite data

Inheritance

Constructors

SqliteSerialize(ClassElement element, SqliteFields fields, {required String repositoryName})

Properties

adapterMethod String
The method as printed by the adapter. Does not include semicolon. [...]
read-only, inherited
adapterMethodInputType String
The expected input type for the adapterMethod
read-only, inherited
adapterMethodOutputType String
The expected output type of the adapterMethod
read-only, inherited
className String
read-only, inherited
constructorName String
Discover factories within the class that rely on the provider. For example factory User.fromRest
read-only, inherited
deserializeInputType String
The Type expected from the provider when deserializing
read-only, inherited
doesDeserialize bool
Whether this generator serializes or deserializes raw input
final
element ClassElement
The annotated class
final, inherited
fields FieldsForClass<Sqlite>
The sorted fields of the element
final, inherited
fieldsForGenerator String
Mash the element's fields into a list for serialization or deserialization
@visibleForOverriding, @visibleForTesting, read-only, inherited
generateSuffix String
Code to follow after a class has been instantiated. Must end with semicolon. [...]
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
instanceFieldsAndMethods List<String>
Any instance fields that should be copied to the adapter. Should terminate in ; if required.
read-only, override
providerName String
For example, Rest or Sqlite
final, inherited
repositoryHasBeenForceCast bool
Avoid linter error on subsequent passes for the repository. For example, if repository has already been casted to ! it should not be recast
read / write, inherited
repositoryName String
For example, OfflineFirst
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
serializeMethod String
Discover serializers within the class that rely on the provider. For example toRest() =>
read-only, inherited
serializeOutputType String
The Type expected by the provider when serializing
read-only, inherited
serializingFunctionArguments String
Expected arguments for the serializing/deserializing function. Does not include parentheses. [...]
read-only, inherited
serializingFunctionName String
The generated deserialize function name
read-only, inherited
tableName String
read-only
unignoredFields Iterable<FieldElement>
All fields that are serializable by this generator and are not declared to be ignored by an annotation.
read-only, inherited

Methods

addField(FieldElement field, Sqlite fieldAnnotation) String?
Given each field, determine whether it can be added to the serdes function and, more importantly, determine how it should be added. If the field should not be added, return null. [...]
checkerForField(FieldElement field) SharedChecker<Model>
External models, such as REST or I/O, pull type inference data from class constructors. This is to allow for class constructors to process potentially nullable data into non-nullable data by assigning a default at initialization, or to allow a class to process one type into another at construction (eg String myString -> Foo(myString)). Sqlite data, however, is always serialized from dart -- as a result, we don't care about mismatches between the constructor and member fields, and will always use the type defined by the class member.
inherited
checkerForType(DartType type) SharedChecker<Model>
Return a SharedChecker for a type. If including a custom checker in your domain, overwrite this field
inherited
coderForField(FieldElement field, SharedChecker<Model> checker, {required bool wrappedInFuture, required Sqlite fieldAnnotation}) String?
Produces serializing or deserializing method given a field and checker. [...]
override
deserializerNullableClause({required FieldElement field, required Sqlite fieldAnnotation, required String name}) String
Injected between the field member in the constructor and the contents
inherited
digestPlaceholders(String? input, String annotatedName, String fieldName) String?
Replace default placeholders
@mustCallSuper, inherited
expandGenerators(Sqlite annotation, {required FieldElement field, required SharedChecker<Model> checker}) String?
Convert placeholders in fromGenerator and toGenerator to functions.
inherited
generate() String
Wraps fieldsForGenerator in a method to produce serialization or deserialization
inherited
generateUniqueSqliteFunction(Map<String, String> uniqueFields) String
Generates the method primaryKeyByUniqueColumns for the adapter
getAssociationMethod(DartType argType, {required String query}) String
inherited
hasConstructor(DartType type) bool
If this element possesses a factory such as fromRest
@protected, inherited
hasSerializer(DartType type) bool
If this field possesses a serializing method such as toSqlite
@protected, inherited
ignoreCoderForField(FieldElement field, Sqlite annotation, SharedChecker<Model> checker) bool
Determine whether this field should be included in generated output.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
providerNameForField(String? annotatedName, {required SharedChecker<Model> checker}) String
Generate foreign key column if the type is a sibling; otherwise, return the field's annotated name;
inherited
serdesValueForField(FieldElement field, String annotatedName, {required SharedChecker<Model> checker}) String
The field's value when used by the generator. For example, data['my_field'] when used by a deserializing generator or instance.myField when used by a serializing generator
@protected, inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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