$$FootballPlayerTableTableManager constructor

$$FootballPlayerTableTableManager(
  1. _$SharedDatabase db,
  2. $FootballPlayerTable table
)

Implementation

$$FootballPlayerTableTableManager(
  _$SharedDatabase db,
  $FootballPlayerTable table,
) : super(
      TableManagerState(
        db: db,
        table: table,
        createFilteringComposer: () =>
            $$FootballPlayerTableFilterComposer($db: db, $table: table),
        createOrderingComposer: () =>
            $$FootballPlayerTableOrderingComposer($db: db, $table: table),
        createComputedFieldComposer: () =>
            $$FootballPlayerTableAnnotationComposer($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> countryId = const Value.absent(),
              Value<String?> imagePath = const Value.absent(),
              Value<String?> description = const Value.absent(),
            }) => FootballPlayerCompanion(
              id: id,
              fullName: fullName,
              birthday: birthday,
              countryId: countryId,
              imagePath: imagePath,
              description: description,
            ),
        createCompanionCallback:
            ({
              Value<int> id = const Value.absent(),
              required String fullName,
              required DateTime birthday,
              required String countryId,
              Value<String?> imagePath = const Value.absent(),
              Value<String?> description = const Value.absent(),
            }) => FootballPlayerCompanion.insert(
              id: id,
              fullName: fullName,
              birthday: birthday,
              countryId: countryId,
              imagePath: imagePath,
              description: description,
            ),
        withReferenceMapper: (p0) => p0
            .map(
              (e) => (
                e.readTable(table),
                $$FootballPlayerTableReferences(db, table, e),
              ),
            )
            .toList(),
        prefetchHooksCallback: ({countryId = false}) {
          return PrefetchHooks(
            db: db,
            explicitlyWatchedTables: [],
            addJoins:
                <
                  T extends TableManagerState<
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic
                  >
                >(state) {
                  if (countryId) {
                    state =
                        state.withJoin(
                              currentTable: table,
                              currentColumn: table.countryId,
                              referencedTable: $$FootballPlayerTableReferences
                                  ._countryIdTable(db),
                              referencedColumn:
                                  $$FootballPlayerTableReferences
                                      ._countryIdTable(db)
                                      .id,
                            )
                            as T;
                  }

                  return state;
                },
            getPrefetchedDataCallback: (items) async {
              return [];
            },
          );
        },
      ),
    );