$$LessonTableTableManager constructor
$$LessonTableTableManager(
- _$SharedDatabase db,
- $LessonTable table
Implementation
$$LessonTableTableManager(_$SharedDatabase db, $LessonTable table)
: super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$LessonTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$LessonTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$LessonTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<String> title = const Value.absent(),
Value<String> titleInEnglish = const Value.absent(),
Value<int> seqNum = const Value.absent(),
Value<bool> locked = const Value.absent(),
Value<bool> published = const Value.absent(),
Value<DateTime?> publishDate = const Value.absent(),
Value<String?> imagePath = const Value.absent(),
Value<int> bookId = const Value.absent(),
Value<String?> description = const Value.absent(),
Value<String?> note = const Value.absent(),
}) => LessonCompanion(
id: id,
title: title,
titleInEnglish: titleInEnglish,
seqNum: seqNum,
locked: locked,
published: published,
publishDate: publishDate,
imagePath: imagePath,
bookId: bookId,
description: description,
note: note,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required String title,
required String titleInEnglish,
required int seqNum,
required bool locked,
required bool published,
Value<DateTime?> publishDate = const Value.absent(),
Value<String?> imagePath = const Value.absent(),
required int bookId,
Value<String?> description = const Value.absent(),
Value<String?> note = const Value.absent(),
}) => LessonCompanion.insert(
id: id,
title: title,
titleInEnglish: titleInEnglish,
seqNum: seqNum,
locked: locked,
published: published,
publishDate: publishDate,
imagePath: imagePath,
bookId: bookId,
description: description,
note: note,
),
withReferenceMapper: (p0) => p0
.map(
(e) =>
(e.readTable(table), $$LessonTableReferences(db, table, e)),
)
.toList(),
prefetchHooksCallback: ({bookId = false}) {
return PrefetchHooks(
db: db,
explicitlyWatchedTables: [],
addJoins:
<
T extends TableManagerState<
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic
>
>(state) {
if (bookId) {
state =
state.withJoin(
currentTable: table,
currentColumn: table.bookId,
referencedTable: $$LessonTableReferences
._bookIdTable(db),
referencedColumn: $$LessonTableReferences
._bookIdTable(db)
.id,
)
as T;
}
return state;
},
getPrefetchedDataCallback: (items) async {
return [];
},
);
},
),
);