insert method

  1. @override
Future<CacheObject> insert(
  1. CacheObject cacheObject, {
  2. bool setTouchedToNow = true,
})
override

Inserts cacheObject into the repository

Implementation

@override
Future<CacheObject> insert(CacheObject cacheObject,
    {bool setTouchedToNow = true}) async {
  final id = await db!.insert(
    _tableCacheObject,
    cacheObject.toMap(setTouchedToNow: setTouchedToNow),
  );
  return cacheObject.copyWith(id: id);
}