$$PortalApplicationsTableTableManager constructor

$$PortalApplicationsTableTableManager(
  1. _$AppDatabase db,
  2. $PortalApplicationsTable table
)

Implementation

$$PortalApplicationsTableTableManager(
  _$AppDatabase db,
  $PortalApplicationsTable table,
) : super(
      TableManagerState(
        db: db,
        table: table,
        createFilteringComposer: () =>
            $$PortalApplicationsTableFilterComposer($db: db, $table: table),
        createOrderingComposer: () =>
            $$PortalApplicationsTableOrderingComposer($db: db, $table: table),
        createComputedFieldComposer: () =>
            $$PortalApplicationsTableAnnotationComposer(
              $db: db,
              $table: table,
            ),
        updateCompanionCallback:
            ({
              Value<int> id = const Value.absent(),
              Value<int> category = const Value.absent(),
              Value<String> code = const Value.absent(),
              Value<String> nameZh = const Value.absent(),
              Value<String?> nameEn = const Value.absent(),
              Value<String?> iconUrl = const Value.absent(),
              Value<int> position = const Value.absent(),
            }) => PortalApplicationsCompanion(
              id: id,
              category: category,
              code: code,
              nameZh: nameZh,
              nameEn: nameEn,
              iconUrl: iconUrl,
              position: position,
            ),
        createCompanionCallback:
            ({
              Value<int> id = const Value.absent(),
              required int category,
              required String code,
              required String nameZh,
              Value<String?> nameEn = const Value.absent(),
              Value<String?> iconUrl = const Value.absent(),
              required int position,
            }) => PortalApplicationsCompanion.insert(
              id: id,
              category: category,
              code: code,
              nameZh: nameZh,
              nameEn: nameEn,
              iconUrl: iconUrl,
              position: position,
            ),
        withReferenceMapper: (p0) => p0
            .map(
              (e) => (
                e.readTable(table),
                $$PortalApplicationsTableReferences(db, table, e),
              ),
            )
            .toList(),
        prefetchHooksCallback: ({category = false}) {
          return PrefetchHooks(
            db: db,
            explicitlyWatchedTables: [],
            addJoins:
                <
                  T extends TableManagerState<
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic
                  >
                >(state) {
                  if (category) {
                    state =
                        state.withJoin(
                              currentTable: table,
                              currentColumn: table.category,
                              referencedTable:
                                  $$PortalApplicationsTableReferences
                                      ._categoryTable(db),
                              referencedColumn:
                                  $$PortalApplicationsTableReferences
                                      ._categoryTable(db)
                                      .id,
                            )
                            as T;
                  }

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