S3JsonFileModel class abstract
S3-backed JSON-file driver for Archery ORM.
This driver stores each model "table" as a JSON document in S3 under an
application-specific prefix. It maintains a constructor registry via
migrate<T>() so records can be hydrated back into model instances.
This is useful for niche workflows and lightweight persistence, but it has different consistency and performance characteristics than SQL drivers.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
migrations
→ Map<
Type, Function> -
Public access to constructor registry (for migrations).
no setter
Static Methods
-
all<
T extends Model> () → Future< List< T> > -
Alias for
index<T>(). -
count<
T extends Model> () → Future< int> - Counts total records.
-
create<
T extends Model> (Map< String, dynamic> json) → Future<T?> -
Creates a new record from
json. -
delete<
T extends Model> ({required String uuid}) → Future< bool> - Deletes record by UUID.
-
deleteInstance<
T extends Model> ({required T instance}) → Future< bool> -
Deletes
instanceby UUID. -
exists<
T extends Model> ({required dynamic id}) → Future< bool> -
Checks if record with
id(UUID) exists. -
find<
T extends Model> ({required String uuid}) → Future< T?> - Finds record by UUID.
-
findBy<
T extends Model> ({required String field, required dynamic value}) → Future< T?> -
Finds first record where
field==value. -
findByUUID<
T extends Model> (String uuid) → Future< T?> -
firstWhere<
T extends Model> ({required String field, String comp = "==", dynamic value}) → Future< T?> -
Returns first record matching
where()condition. -
index<
T extends Model> () → Future< List< T> > -
jsonIndex<
T extends Model> () → Future< List< Map< >String, dynamic> > -
migrate<
T extends Model> ({required T constructor(Map< String, dynamic> )}) → Future<bool> -
save<
T extends Model> (T instance) → Future< bool> -
Saves
instance(create if new, update if exists). -
saveInstance<
T extends Model> ({required T instance}) → Future< bool> -
Saves
instance. -
truncate<
T extends Model> () → Future< bool> -
update<
T extends Model> ({required dynamic id, required String field, required dynamic value}) → Future< bool> -
updateInstance<
T extends Model> ({required T instance, required Map< String, dynamic> withJson}) → Future<bool> -
Updates instance with partial
withJson. -
where<
T extends Model> ({required String field, String comp = "==", dynamic value}) → Future< List< T> >