forked from pinchbv/floor
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transient annotation is implemented to support the transient fields in entities these fields should not be persisted to data tables in project's database and they only serve the data integrity
- Loading branch information
Showing
9 changed files
with
157 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/// Marks a field in an [Entity] as the transient. | ||
class Transient { | ||
const Transient(); | ||
} | ||
|
||
/// Marks a field in an [Entity] as the transient. | ||
const transient = Transient(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:collection/collection.dart'; | ||
import 'package:floor_generator/value_object/field.dart'; | ||
|
||
/// Transient representation of a field in an Entity | ||
class Transient { | ||
final List<Field> fields; | ||
|
||
Transient(this.fields); | ||
|
||
@override | ||
bool operator ==(Object other) => | ||
identical(this, other) || | ||
other is Transient && | ||
runtimeType == other.runtimeType && | ||
const ListEquality<Field>().equals(fields, other.fields); | ||
|
||
@override | ||
String toString() { | ||
return 'Transient{fields: $fields}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.