$$SongTableTableManager constructor

$$SongTableTableManager(
  1. _$SharedDatabase db,
  2. $SongTable table
)

Implementation

$$SongTableTableManager(_$SharedDatabase db, $SongTable table)
  : super(
      TableManagerState(
        db: db,
        table: table,
        createFilteringComposer: () =>
            $$SongTableFilterComposer($db: db, $table: table),
        createOrderingComposer: () =>
            $$SongTableOrderingComposer($db: db, $table: table),
        createComputedFieldComposer: () =>
            $$SongTableAnnotationComposer($db: db, $table: table),
        updateCompanionCallback:
            ({
              Value<int> id = const Value.absent(),
              Value<String> name = const Value.absent(),
              Value<bool> locked = const Value.absent(),
              Value<bool> published = const Value.absent(),
              Value<String?> imagePath = const Value.absent(),
              Value<String?> description = const Value.absent(),
              Value<String?> note = const Value.absent(),
              Value<String?> youtubeCode = const Value.absent(),
              Value<String?> youtubeVideoInfo = const Value.absent(),
              Value<int> albumId = const Value.absent(),
            }) => SongCompanion(
              id: id,
              name: name,
              locked: locked,
              published: published,
              imagePath: imagePath,
              description: description,
              note: note,
              youtubeCode: youtubeCode,
              youtubeVideoInfo: youtubeVideoInfo,
              albumId: albumId,
            ),
        createCompanionCallback:
            ({
              Value<int> id = const Value.absent(),
              required String name,
              required bool locked,
              required bool published,
              Value<String?> imagePath = const Value.absent(),
              Value<String?> description = const Value.absent(),
              Value<String?> note = const Value.absent(),
              Value<String?> youtubeCode = const Value.absent(),
              Value<String?> youtubeVideoInfo = const Value.absent(),
              required int albumId,
            }) => SongCompanion.insert(
              id: id,
              name: name,
              locked: locked,
              published: published,
              imagePath: imagePath,
              description: description,
              note: note,
              youtubeCode: youtubeCode,
              youtubeVideoInfo: youtubeVideoInfo,
              albumId: albumId,
            ),
        withReferenceMapper: (p0) => p0
            .map(
              (e) =>
                  (e.readTable(table), $$SongTableReferences(db, table, e)),
            )
            .toList(),
        prefetchHooksCallback: ({albumId = false}) {
          return PrefetchHooks(
            db: db,
            explicitlyWatchedTables: [],
            addJoins:
                <
                  T extends TableManagerState<
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic,
                    dynamic
                  >
                >(state) {
                  if (albumId) {
                    state =
                        state.withJoin(
                              currentTable: table,
                              currentColumn: table.albumId,
                              referencedTable: $$SongTableReferences
                                  ._albumIdTable(db),
                              referencedColumn: $$SongTableReferences
                                  ._albumIdTable(db)
                                  .id,
                            )
                            as T;
                  }

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