$$CouponTableTableManager constructor
$$CouponTableTableManager(
- _$SharedDatabase db,
- $CouponTable table
Implementation
$$CouponTableTableManager(_$SharedDatabase db, $CouponTable table)
: super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$CouponTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$CouponTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$CouponTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<String> code = const Value.absent(),
Value<String> name = const Value.absent(),
Value<bool> active = const Value.absent(),
Value<String> type = const Value.absent(),
Value<String?> description = const Value.absent(),
}) => CouponCompanion(
id: id,
code: code,
name: name,
active: active,
type: type,
description: description,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required String code,
required String name,
required bool active,
required String type,
Value<String?> description = const Value.absent(),
}) => CouponCompanion.insert(
id: id,
code: code,
name: name,
active: active,
type: type,
description: description,
),
withReferenceMapper: (p0) => p0
.map(
(e) =>
(e.readTable(table), $$CouponTableReferences(db, table, e)),
)
.toList(),
prefetchHooksCallback: ({type = false}) {
return PrefetchHooks(
db: db,
explicitlyWatchedTables: [],
addJoins:
<
T extends TableManagerState<
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic
>
>(state) {
if (type) {
state =
state.withJoin(
currentTable: table,
currentColumn: table.type,
referencedTable: $$CouponTableReferences
._typeTable(db),
referencedColumn: $$CouponTableReferences
._typeTable(db)
.id,
)
as T;
}
return state;
},
getPrefetchedDataCallback: (items) async {
return [];
},
);
},
),
);