$$CoursesTableTableManager constructor

$$CoursesTableTableManager(
  1. _$AppDatabase db,
  2. $CoursesTable table
)

Implementation

$$CoursesTableTableManager(_$AppDatabase db, $CoursesTable table)
  : super(
      TableManagerState(
        db: db,
        table: table,
        createFilteringComposer: () =>
            $$CoursesTableFilterComposer($db: db, $table: table),
        createOrderingComposer: () =>
            $$CoursesTableOrderingComposer($db: db, $table: table),
        createComputedFieldComposer: () =>
            $$CoursesTableAnnotationComposer($db: db, $table: table),
        updateCompanionCallback:
            ({
              Value<int> id = const Value.absent(),
              Value<DateTime?> fetchedAt = const Value.absent(),
              Value<String> code = const Value.absent(),
              Value<double> credits = const Value.absent(),
              Value<int> hours = const Value.absent(),
              Value<String> nameZh = const Value.absent(),
              Value<String?> nameEn = const Value.absent(),
              Value<String?> descriptionZh = const Value.absent(),
              Value<String?> descriptionEn = const Value.absent(),
            }) => CoursesCompanion(
              id: id,
              fetchedAt: fetchedAt,
              code: code,
              credits: credits,
              hours: hours,
              nameZh: nameZh,
              nameEn: nameEn,
              descriptionZh: descriptionZh,
              descriptionEn: descriptionEn,
            ),
        createCompanionCallback:
            ({
              Value<int> id = const Value.absent(),
              Value<DateTime?> fetchedAt = const Value.absent(),
              required String code,
              required double credits,
              required int hours,
              required String nameZh,
              Value<String?> nameEn = const Value.absent(),
              Value<String?> descriptionZh = const Value.absent(),
              Value<String?> descriptionEn = const Value.absent(),
            }) => CoursesCompanion.insert(
              id: id,
              fetchedAt: fetchedAt,
              code: code,
              credits: credits,
              hours: hours,
              nameZh: nameZh,
              nameEn: nameEn,
              descriptionZh: descriptionZh,
              descriptionEn: descriptionEn,
            ),
        withReferenceMapper: (p0) => p0
            .map(
              (e) => (
                e.readTable(table),
                $$CoursesTableReferences(db, table, e),
              ),
            )
            .toList(),
        prefetchHooksCallback: ({scoresRefs = false}) {
          return PrefetchHooks(
            db: db,
            explicitlyWatchedTables: [if (scoresRefs) db.scores],
            addJoins: null,
            getPrefetchedDataCallback: (items) async {
              return [
                if (scoresRefs)
                  await $_getPrefetchedData<Course, $CoursesTable, Score>(
                    currentTable: table,
                    referencedTable: $$CoursesTableReferences
                        ._scoresRefsTable(db),
                    managerFromTypedResult: (p0) =>
                        $$CoursesTableReferences(db, table, p0).scoresRefs,
                    referencedItemsForCurrentItem: (item, referencedItems) =>
                        referencedItems.where((e) => e.course == item.id),
                    typedResults: items,
                  ),
              ];
            },
          );
        },
      ),
    );