$$SupplierTableTableManager constructor

$$SupplierTableTableManager(
  1. _$SharedDatabase db,
  2. $SupplierTable table
)

Implementation

$$SupplierTableTableManager(_$SharedDatabase db, $SupplierTable table)
  : super(
      TableManagerState(
        db: db,
        table: table,
        createFilteringComposer: () =>
            $$SupplierTableFilterComposer($db: db, $table: table),
        createOrderingComposer: () =>
            $$SupplierTableOrderingComposer($db: db, $table: table),
        createComputedFieldComposer: () =>
            $$SupplierTableAnnotationComposer($db: db, $table: table),
        updateCompanionCallback:
            ({
              Value<int> id = const Value.absent(),
              Value<String> name = const Value.absent(),
              Value<bool> active = const Value.absent(),
              Value<String> email = const Value.absent(),
              Value<String?> address = const Value.absent(),
              Value<String?> phone = const Value.absent(),
              Value<String?> description = const Value.absent(),
              Value<int> supplierTypeId = const Value.absent(),
              Value<String?> imagePath = const Value.absent(),
            }) => SupplierCompanion(
              id: id,
              name: name,
              active: active,
              email: email,
              address: address,
              phone: phone,
              description: description,
              supplierTypeId: supplierTypeId,
              imagePath: imagePath,
            ),
        createCompanionCallback:
            ({
              Value<int> id = const Value.absent(),
              required String name,
              required bool active,
              required String email,
              Value<String?> address = const Value.absent(),
              Value<String?> phone = const Value.absent(),
              Value<String?> description = const Value.absent(),
              required int supplierTypeId,
              Value<String?> imagePath = const Value.absent(),
            }) => SupplierCompanion.insert(
              id: id,
              name: name,
              active: active,
              email: email,
              address: address,
              phone: phone,
              description: description,
              supplierTypeId: supplierTypeId,
              imagePath: imagePath,
            ),
        withReferenceMapper: (p0) => p0
            .map(
              (e) => (
                e.readTable(table),
                $$SupplierTableReferences(db, table, e),
              ),
            )
            .toList(),
        prefetchHooksCallback: ({supplierTypeId = false}) {
          return PrefetchHooks(
            db: db,
            explicitlyWatchedTables: [],
            addJoins:
                <
                  T extends TableManagerState<
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic
                  >
                >(state) {
                  if (supplierTypeId) {
                    state =
                        state.withJoin(
                              currentTable: table,
                              currentColumn: table.supplierTypeId,
                              referencedTable: $$SupplierTableReferences
                                  ._supplierTypeIdTable(db),
                              referencedColumn: $$SupplierTableReferences
                                  ._supplierTypeIdTable(db)
                                  .id,
                            )
                            as T;
                  }

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