$$AlbumTableTableManager constructor

$$AlbumTableTableManager(
  1. _$SharedDatabase db,
  2. $AlbumTable table
)

Implementation

$$AlbumTableTableManager(_$SharedDatabase db, $AlbumTable table)
  : super(
      TableManagerState(
        db: db,
        table: table,
        createFilteringComposer: () =>
            $$AlbumTableFilterComposer($db: db, $table: table),
        createOrderingComposer: () =>
            $$AlbumTableOrderingComposer($db: db, $table: table),
        createComputedFieldComposer: () =>
            $$AlbumTableAnnotationComposer($db: db, $table: table),
        updateCompanionCallback:
            ({
              Value<int> id = const Value.absent(),
              Value<String> code = const Value.absent(),
              Value<String> name = const Value.absent(),
              Value<String> nameInEnglish = const Value.absent(),
              Value<int> seqNum = const Value.absent(),
              Value<bool> published = const Value.absent(),
              Value<bool> locked = const Value.absent(),
              Value<String?> imagePath = const Value.absent(),
              Value<int> publishedSongCount = const Value.absent(),
              Value<int> totalSongCount = const Value.absent(),
              Value<String?> description = const Value.absent(),
              Value<String?> note = const Value.absent(),
            }) => AlbumCompanion(
              id: id,
              code: code,
              name: name,
              nameInEnglish: nameInEnglish,
              seqNum: seqNum,
              published: published,
              locked: locked,
              imagePath: imagePath,
              publishedSongCount: publishedSongCount,
              totalSongCount: totalSongCount,
              description: description,
              note: note,
            ),
        createCompanionCallback:
            ({
              Value<int> id = const Value.absent(),
              required String code,
              required String name,
              required String nameInEnglish,
              required int seqNum,
              required bool published,
              required bool locked,
              Value<String?> imagePath = const Value.absent(),
              required int publishedSongCount,
              required int totalSongCount,
              Value<String?> description = const Value.absent(),
              Value<String?> note = const Value.absent(),
            }) => AlbumCompanion.insert(
              id: id,
              code: code,
              name: name,
              nameInEnglish: nameInEnglish,
              seqNum: seqNum,
              published: published,
              locked: locked,
              imagePath: imagePath,
              publishedSongCount: publishedSongCount,
              totalSongCount: totalSongCount,
              description: description,
              note: note,
            ),
        withReferenceMapper: (p0) => p0
            .map(
              (e) =>
                  (e.readTable(table), $$AlbumTableReferences(db, table, e)),
            )
            .toList(),
        prefetchHooksCallback: ({songRefs = false}) {
          return PrefetchHooks(
            db: db,
            explicitlyWatchedTables: [if (songRefs) db.song],
            addJoins: null,
            getPrefetchedDataCallback: (items) async {
              return [
                if (songRefs)
                  await $_getPrefetchedData<AlbumData, $AlbumTable, SongData>(
                    currentTable: table,
                    referencedTable: $$AlbumTableReferences._songRefsTable(
                      db,
                    ),
                    managerFromTypedResult: (p0) =>
                        $$AlbumTableReferences(db, table, p0).songRefs,
                    referencedItemsForCurrentItem: (item, referencedItems) =>
                        referencedItems.where((e) => e.albumId == item.id),
                    typedResults: items,
                  ),
              ];
            },
          );
        },
      ),
    );