$$ContributorTableTableManager constructor
$$ContributorTableTableManager(
- _$SharedDatabase db,
- $ContributorTable table
Implementation
$$ContributorTableTableManager(_$SharedDatabase db, $ContributorTable table)
: super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$ContributorTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$ContributorTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$ContributorTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<int> projectId = const Value.absent(),
Value<int> appUserId = const Value.absent(),
}) => ContributorCompanion(
id: id,
projectId: projectId,
appUserId: appUserId,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required int projectId,
required int appUserId,
}) => ContributorCompanion.insert(
id: id,
projectId: projectId,
appUserId: appUserId,
),
withReferenceMapper: (p0) => p0
.map(
(e) => (
e.readTable(table),
$$ContributorTableReferences(db, table, e),
),
)
.toList(),
prefetchHooksCallback: ({projectId = false, appUserId = false}) {
return PrefetchHooks(
db: db,
explicitlyWatchedTables: [],
addJoins:
<
T extends TableManagerState<
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic
>
>(state) {
if (projectId) {
state =
state.withJoin(
currentTable: table,
currentColumn: table.projectId,
referencedTable: $$ContributorTableReferences
._projectIdTable(db),
referencedColumn: $$ContributorTableReferences
._projectIdTable(db)
.id,
)
as T;
}
if (appUserId) {
state =
state.withJoin(
currentTable: table,
currentColumn: table.appUserId,
referencedTable: $$ContributorTableReferences
._appUserIdTable(db),
referencedColumn: $$ContributorTableReferences
._appUserIdTable(db)
.id,
)
as T;
}
return state;
},
getPrefetchedDataCallback: (items) async {
return [];
},
);
},
),
);