RepositoryInsertMixin<T extends OrmEntity> mixin
Mixin that provides insert operations for repositories.
- Superclass constraints
- Mixin applications
Properties
- attachRuntimeMetadata → void Function(Object? model)
-
no setterinherited
- codecs → ValueCodecRegistry
-
no setterinherited
-
definition
→ ModelDefinition<
T> -
no setterinherited
- describeMutation → StatementPreview Function(MutationPlan plan)
-
no setterinherited
- driverName → String
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- queryContext → QueryContext?
-
no setterinherited
-
runMutation
→ Future<
MutationResult> Function(MutationPlan plan) -
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyWhere(
Query< T> query, Object? where, {String feature = 'where'}) → Query<T> -
Applies a repository-style
whereinput toquery.inherited -
extractPrimaryKey(
Object input) → Object? -
Extracts the primary key value from an input.
inherited
-
fieldFor(
String name) → FieldDefinition -
inherited
-
insert(
Object model) → Future< T> -
Inserts a single
modelinto the database and returns the inserted record. -
insertInputToMap(
Object input, {required bool applySentinelFiltering}) → Map< String, Object?> -
Converts an insert input to a map suitable for insertion.
inherited
-
insertMany(
List< Object> inputs, {bool returning = true}) → Future<List< T> > - Inserts multiple items into the database and returns the inserted records.
-
insertOrIgnore(
Object model) → Future< int> - Inserts a single item into the database, ignoring any conflicts.
-
insertOrIgnoreMany(
List< Object> inputs) → Future<int> - Inserts multiple items into the database, ignoring any conflicts.
-
isTrackedModel(
Object input) → bool -
Checks if the input is a tracked model (has ModelAttributes).
inherited
-
jsonUpdatesFor(
T model, JsonUpdateBuilder< T> ? builder) → List<JsonUpdateClause> -
inherited
-
mapResult(
List< T> original, MutationResult result, bool returning) → List<T> -
inherited
-
mapResultWithInputs(
List< T> original, List<Map< inputMaps, MutationResult result, bool returning, {bool canCreateFromInputs = true}) → List<String, Object?> >T> -
Maps mutation results back to model instances.
inherited
-
mutationRowFromModel(
T model, {JsonUpdateBuilder< T> ? jsonUpdates}) → MutationRow -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requireKeys(
List< Map< keys) → voidString, Object?> > -
inherited
-
requireModels(
List< T> models, String method) → void -
inherited
-
resolveColumnName(
String input) → String -
inherited
-
resolveColumnNames(
List< String> ? fields) → List<String> ? -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateInputToMap(
Object input) → Map< String, Object?> -
Converts an update input to a map suitable for updates.
inherited
-
whereInputToMap(
Object? input) → Map< String, Object?> ? -
Converts a "where" input to a map suitable for WHERE clauses.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited