$$TeacherTableTableManager constructor
$$TeacherTableTableManager(
- _$SharedDatabase db,
- $TeacherTable table
Implementation
$$TeacherTableTableManager(_$SharedDatabase db, $TeacherTable table)
: super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$TeacherTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$TeacherTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$TeacherTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<String> fullName = const Value.absent(),
Value<DateTime> birthday = const Value.absent(),
Value<String> genderId = const Value.absent(),
Value<String> teacherPositionId = const Value.absent(),
Value<bool> locked = const Value.absent(),
Value<bool> active = const Value.absent(),
Value<int> universityId = const Value.absent(),
Value<String?> countryId = const Value.absent(),
Value<String?> youtubeVideoCode = const Value.absent(),
Value<String> email = const Value.absent(),
Value<String?> skype = const Value.absent(),
Value<String?> facebook = const Value.absent(),
Value<String?> phoneNumber = const Value.absent(),
Value<String?> description = const Value.absent(),
Value<String?> note = const Value.absent(),
Value<String?> imagePath = const Value.absent(),
}) => TeacherCompanion(
id: id,
fullName: fullName,
birthday: birthday,
genderId: genderId,
teacherPositionId: teacherPositionId,
locked: locked,
active: active,
universityId: universityId,
countryId: countryId,
youtubeVideoCode: youtubeVideoCode,
email: email,
skype: skype,
facebook: facebook,
phoneNumber: phoneNumber,
description: description,
note: note,
imagePath: imagePath,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required String fullName,
required DateTime birthday,
required String genderId,
required String teacherPositionId,
required bool locked,
required bool active,
required int universityId,
Value<String?> countryId = const Value.absent(),
Value<String?> youtubeVideoCode = const Value.absent(),
required String email,
Value<String?> skype = const Value.absent(),
Value<String?> facebook = const Value.absent(),
Value<String?> phoneNumber = const Value.absent(),
Value<String?> description = const Value.absent(),
Value<String?> note = const Value.absent(),
Value<String?> imagePath = const Value.absent(),
}) => TeacherCompanion.insert(
id: id,
fullName: fullName,
birthday: birthday,
genderId: genderId,
teacherPositionId: teacherPositionId,
locked: locked,
active: active,
universityId: universityId,
countryId: countryId,
youtubeVideoCode: youtubeVideoCode,
email: email,
skype: skype,
facebook: facebook,
phoneNumber: phoneNumber,
description: description,
note: note,
imagePath: imagePath,
),
withReferenceMapper: (p0) => p0
.map(
(e) => (
e.readTable(table),
$$TeacherTableReferences(db, table, e),
),
)
.toList(),
prefetchHooksCallback:
({
genderId = false,
teacherPositionId = false,
universityId = false,
countryId = false,
}) {
return PrefetchHooks(
db: db,
explicitlyWatchedTables: [],
addJoins:
<
T extends TableManagerState<
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic,
dynamic
>
>(state) {
if (genderId) {
state =
state.withJoin(
currentTable: table,
currentColumn: table.genderId,
referencedTable: $$TeacherTableReferences
._genderIdTable(db),
referencedColumn: $$TeacherTableReferences
._genderIdTable(db)
.id,
)
as T;
}
if (teacherPositionId) {
state =
state.withJoin(
currentTable: table,
currentColumn: table.teacherPositionId,
referencedTable: $$TeacherTableReferences
._teacherPositionIdTable(db),
referencedColumn: $$TeacherTableReferences
._teacherPositionIdTable(db)
.id,
)
as T;
}
if (universityId) {
state =
state.withJoin(
currentTable: table,
currentColumn: table.universityId,
referencedTable: $$TeacherTableReferences
._universityIdTable(db),
referencedColumn: $$TeacherTableReferences
._universityIdTable(db)
.id,
)
as T;
}
if (countryId) {
state =
state.withJoin(
currentTable: table,
currentColumn: table.countryId,
referencedTable: $$TeacherTableReferences
._countryIdTable(db),
referencedColumn: $$TeacherTableReferences
._countryIdTable(db)
.id,
)
as T;
}
return state;
},
getPrefetchedDataCallback: (items) async {
return [];
},
);
},
),
);