mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore: bump dart sdk to 3.8 (#20355)
* chore: bump dart sdk to 3.8 * chore: make build * make pigeon * chore: format files --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
9b3718120b
commit
e52b9d15b5
643 changed files with 32561 additions and 35292 deletions
|
|
@ -11,74 +11,92 @@ import 'package:drift/internal/modular.dart' as i4;
|
|||
import 'package:immich_mobile/infrastructure/entities/memory.entity.drift.dart'
|
||||
as i5;
|
||||
|
||||
typedef $$MemoryAssetEntityTableCreateCompanionBuilder
|
||||
= i1.MemoryAssetEntityCompanion Function({
|
||||
required String assetId,
|
||||
required String memoryId,
|
||||
});
|
||||
typedef $$MemoryAssetEntityTableUpdateCompanionBuilder
|
||||
= i1.MemoryAssetEntityCompanion Function({
|
||||
i0.Value<String> assetId,
|
||||
i0.Value<String> memoryId,
|
||||
});
|
||||
typedef $$MemoryAssetEntityTableCreateCompanionBuilder =
|
||||
i1.MemoryAssetEntityCompanion Function({
|
||||
required String assetId,
|
||||
required String memoryId,
|
||||
});
|
||||
typedef $$MemoryAssetEntityTableUpdateCompanionBuilder =
|
||||
i1.MemoryAssetEntityCompanion Function({
|
||||
i0.Value<String> assetId,
|
||||
i0.Value<String> memoryId,
|
||||
});
|
||||
|
||||
final class $$MemoryAssetEntityTableReferences extends i0.BaseReferences<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$MemoryAssetEntityTable,
|
||||
i1.MemoryAssetEntityData> {
|
||||
final class $$MemoryAssetEntityTableReferences
|
||||
extends
|
||||
i0.BaseReferences<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$MemoryAssetEntityTable,
|
||||
i1.MemoryAssetEntityData
|
||||
> {
|
||||
$$MemoryAssetEntityTableReferences(
|
||||
super.$_db, super.$_table, super.$_typedResult);
|
||||
super.$_db,
|
||||
super.$_table,
|
||||
super.$_typedResult,
|
||||
);
|
||||
|
||||
static i3.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) =>
|
||||
i4.ReadDatabaseContainer(db)
|
||||
.resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity')
|
||||
.createAlias(i0.$_aliasNameGenerator(
|
||||
.createAlias(
|
||||
i0.$_aliasNameGenerator(
|
||||
i4.ReadDatabaseContainer(db)
|
||||
.resultSet<i1.$MemoryAssetEntityTable>('memory_asset_entity')
|
||||
.assetId,
|
||||
i4.ReadDatabaseContainer(db)
|
||||
.resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity')
|
||||
.id));
|
||||
i4.ReadDatabaseContainer(
|
||||
db,
|
||||
).resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity').id,
|
||||
),
|
||||
);
|
||||
|
||||
i3.$$RemoteAssetEntityTableProcessedTableManager get assetId {
|
||||
final $_column = $_itemColumn<String>('asset_id')!;
|
||||
|
||||
final manager = i3
|
||||
.$$RemoteAssetEntityTableTableManager(
|
||||
$_db,
|
||||
i4.ReadDatabaseContainer(
|
||||
$_db,
|
||||
i4.ReadDatabaseContainer($_db)
|
||||
.resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'))
|
||||
).resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'),
|
||||
)
|
||||
.filter((f) => f.id.sqlEquals($_column));
|
||||
final item = $_typedResult.readTableOrNull(_assetIdTable($_db));
|
||||
if (item == null) return manager;
|
||||
return i0.ProcessedTableManager(
|
||||
manager.$state.copyWith(prefetchedData: [item]));
|
||||
manager.$state.copyWith(prefetchedData: [item]),
|
||||
);
|
||||
}
|
||||
|
||||
static i5.$MemoryEntityTable _memoryIdTable(i0.GeneratedDatabase db) =>
|
||||
i4.ReadDatabaseContainer(db)
|
||||
.resultSet<i5.$MemoryEntityTable>('memory_entity')
|
||||
.createAlias(i0.$_aliasNameGenerator(
|
||||
.createAlias(
|
||||
i0.$_aliasNameGenerator(
|
||||
i4.ReadDatabaseContainer(db)
|
||||
.resultSet<i1.$MemoryAssetEntityTable>('memory_asset_entity')
|
||||
.memoryId,
|
||||
i4.ReadDatabaseContainer(db)
|
||||
.resultSet<i5.$MemoryEntityTable>('memory_entity')
|
||||
.id));
|
||||
i4.ReadDatabaseContainer(
|
||||
db,
|
||||
).resultSet<i5.$MemoryEntityTable>('memory_entity').id,
|
||||
),
|
||||
);
|
||||
|
||||
i5.$$MemoryEntityTableProcessedTableManager get memoryId {
|
||||
final $_column = $_itemColumn<String>('memory_id')!;
|
||||
|
||||
final manager = i5
|
||||
.$$MemoryEntityTableTableManager(
|
||||
$_db,
|
||||
i4.ReadDatabaseContainer(
|
||||
$_db,
|
||||
i4.ReadDatabaseContainer($_db)
|
||||
.resultSet<i5.$MemoryEntityTable>('memory_entity'))
|
||||
).resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
)
|
||||
.filter((f) => f.id.sqlEquals($_column));
|
||||
final item = $_typedResult.readTableOrNull(_memoryIdTable($_db));
|
||||
if (item == null) return manager;
|
||||
return i0.ProcessedTableManager(
|
||||
manager.$state.copyWith(prefetchedData: [item]));
|
||||
manager.$state.copyWith(prefetchedData: [item]),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -93,45 +111,55 @@ class $$MemoryAssetEntityTableFilterComposer
|
|||
});
|
||||
i3.$$RemoteAssetEntityTableFilterComposer get assetId {
|
||||
final i3.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder(
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.assetId,
|
||||
referencedTable: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder: (joinBuilder,
|
||||
{$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer}) =>
|
||||
i3.$$RemoteAssetEntityTableFilterComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
));
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.assetId,
|
||||
referencedTable: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder:
|
||||
(
|
||||
joinBuilder, {
|
||||
$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
}) => i3.$$RemoteAssetEntityTableFilterComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
),
|
||||
);
|
||||
return composer;
|
||||
}
|
||||
|
||||
i5.$$MemoryEntityTableFilterComposer get memoryId {
|
||||
final i5.$$MemoryEntityTableFilterComposer composer = $composerBuilder(
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.memoryId,
|
||||
referencedTable: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder: (joinBuilder,
|
||||
{$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer}) =>
|
||||
i5.$$MemoryEntityTableFilterComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
));
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.memoryId,
|
||||
referencedTable: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder:
|
||||
(
|
||||
joinBuilder, {
|
||||
$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
}) => i5.$$MemoryEntityTableFilterComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
),
|
||||
);
|
||||
return composer;
|
||||
}
|
||||
}
|
||||
|
|
@ -148,46 +176,55 @@ class $$MemoryAssetEntityTableOrderingComposer
|
|||
i3.$$RemoteAssetEntityTableOrderingComposer get assetId {
|
||||
final i3.$$RemoteAssetEntityTableOrderingComposer composer =
|
||||
$composerBuilder(
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.assetId,
|
||||
referencedTable: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder: (joinBuilder,
|
||||
{$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer}) =>
|
||||
i3.$$RemoteAssetEntityTableOrderingComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i3.$RemoteAssetEntityTable>(
|
||||
'remote_asset_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
));
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.assetId,
|
||||
referencedTable: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder:
|
||||
(
|
||||
joinBuilder, {
|
||||
$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
}) => i3.$$RemoteAssetEntityTableOrderingComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
),
|
||||
);
|
||||
return composer;
|
||||
}
|
||||
|
||||
i5.$$MemoryEntityTableOrderingComposer get memoryId {
|
||||
final i5.$$MemoryEntityTableOrderingComposer composer = $composerBuilder(
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.memoryId,
|
||||
referencedTable: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder: (joinBuilder,
|
||||
{$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer}) =>
|
||||
i5.$$MemoryEntityTableOrderingComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
));
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.memoryId,
|
||||
referencedTable: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder:
|
||||
(
|
||||
joinBuilder, {
|
||||
$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
}) => i5.$$MemoryEntityTableOrderingComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
),
|
||||
);
|
||||
return composer;
|
||||
}
|
||||
}
|
||||
|
|
@ -204,65 +241,79 @@ class $$MemoryAssetEntityTableAnnotationComposer
|
|||
i3.$$RemoteAssetEntityTableAnnotationComposer get assetId {
|
||||
final i3.$$RemoteAssetEntityTableAnnotationComposer composer =
|
||||
$composerBuilder(
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.assetId,
|
||||
referencedTable: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder: (joinBuilder,
|
||||
{$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer}) =>
|
||||
i3.$$RemoteAssetEntityTableAnnotationComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i3.$RemoteAssetEntityTable>(
|
||||
'remote_asset_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
));
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.assetId,
|
||||
referencedTable: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder:
|
||||
(
|
||||
joinBuilder, {
|
||||
$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
}) => i3.$$RemoteAssetEntityTableAnnotationComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i3.$RemoteAssetEntityTable>('remote_asset_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
),
|
||||
);
|
||||
return composer;
|
||||
}
|
||||
|
||||
i5.$$MemoryEntityTableAnnotationComposer get memoryId {
|
||||
final i5.$$MemoryEntityTableAnnotationComposer composer = $composerBuilder(
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.memoryId,
|
||||
referencedTable: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder: (joinBuilder,
|
||||
{$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer}) =>
|
||||
i5.$$MemoryEntityTableAnnotationComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
));
|
||||
composer: this,
|
||||
getCurrentColumn: (t) => t.memoryId,
|
||||
referencedTable: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
getReferencedColumn: (t) => t.id,
|
||||
builder:
|
||||
(
|
||||
joinBuilder, {
|
||||
$addJoinBuilderToRootComposer,
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
}) => i5.$$MemoryEntityTableAnnotationComposer(
|
||||
$db: $db,
|
||||
$table: i4.ReadDatabaseContainer(
|
||||
$db,
|
||||
).resultSet<i5.$MemoryEntityTable>('memory_entity'),
|
||||
$addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,
|
||||
joinBuilder: joinBuilder,
|
||||
$removeJoinBuilderFromRootComposer:
|
||||
$removeJoinBuilderFromRootComposer,
|
||||
),
|
||||
);
|
||||
return composer;
|
||||
}
|
||||
}
|
||||
|
||||
class $$MemoryAssetEntityTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$MemoryAssetEntityTable,
|
||||
i1.MemoryAssetEntityData,
|
||||
i1.$$MemoryAssetEntityTableFilterComposer,
|
||||
i1.$$MemoryAssetEntityTableOrderingComposer,
|
||||
i1.$$MemoryAssetEntityTableAnnotationComposer,
|
||||
$$MemoryAssetEntityTableCreateCompanionBuilder,
|
||||
$$MemoryAssetEntityTableUpdateCompanionBuilder,
|
||||
(i1.MemoryAssetEntityData, i1.$$MemoryAssetEntityTableReferences),
|
||||
i1.MemoryAssetEntityData,
|
||||
i0.PrefetchHooks Function({bool assetId, bool memoryId})> {
|
||||
class $$MemoryAssetEntityTableTableManager
|
||||
extends
|
||||
i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$MemoryAssetEntityTable,
|
||||
i1.MemoryAssetEntityData,
|
||||
i1.$$MemoryAssetEntityTableFilterComposer,
|
||||
i1.$$MemoryAssetEntityTableOrderingComposer,
|
||||
i1.$$MemoryAssetEntityTableAnnotationComposer,
|
||||
$$MemoryAssetEntityTableCreateCompanionBuilder,
|
||||
$$MemoryAssetEntityTableUpdateCompanionBuilder,
|
||||
(i1.MemoryAssetEntityData, i1.$$MemoryAssetEntityTableReferences),
|
||||
i1.MemoryAssetEntityData,
|
||||
i0.PrefetchHooks Function({bool assetId, bool memoryId})
|
||||
> {
|
||||
$$MemoryAssetEntityTableTableManager(
|
||||
i0.GeneratedDatabase db, i1.$MemoryAssetEntityTable table)
|
||||
: super(i0.TableManagerState(
|
||||
i0.GeneratedDatabase db,
|
||||
i1.$MemoryAssetEntityTable table,
|
||||
) : super(
|
||||
i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer: () =>
|
||||
|
|
@ -271,35 +322,38 @@ class $$MemoryAssetEntityTableTableManager extends i0.RootTableManager<
|
|||
.$$MemoryAssetEntityTableOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
i1.$$MemoryAssetEntityTableAnnotationComposer(
|
||||
$db: db, $table: table),
|
||||
updateCompanionCallback: ({
|
||||
i0.Value<String> assetId = const i0.Value.absent(),
|
||||
i0.Value<String> memoryId = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.MemoryAssetEntityCompanion(
|
||||
assetId: assetId,
|
||||
memoryId: memoryId,
|
||||
),
|
||||
createCompanionCallback: ({
|
||||
required String assetId,
|
||||
required String memoryId,
|
||||
}) =>
|
||||
i1.MemoryAssetEntityCompanion.insert(
|
||||
assetId: assetId,
|
||||
memoryId: memoryId,
|
||||
),
|
||||
$db: db,
|
||||
$table: table,
|
||||
),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
i0.Value<String> assetId = const i0.Value.absent(),
|
||||
i0.Value<String> memoryId = const i0.Value.absent(),
|
||||
}) => i1.MemoryAssetEntityCompanion(
|
||||
assetId: assetId,
|
||||
memoryId: memoryId,
|
||||
),
|
||||
createCompanionCallback:
|
||||
({required String assetId, required String memoryId}) =>
|
||||
i1.MemoryAssetEntityCompanion.insert(
|
||||
assetId: assetId,
|
||||
memoryId: memoryId,
|
||||
),
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map((e) => (
|
||||
e.readTable(table),
|
||||
i1.$$MemoryAssetEntityTableReferences(db, table, e)
|
||||
))
|
||||
.map(
|
||||
(e) => (
|
||||
e.readTable(table),
|
||||
i1.$$MemoryAssetEntityTableReferences(db, table, e),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
prefetchHooksCallback: ({assetId = false, memoryId = false}) {
|
||||
return i0.PrefetchHooks(
|
||||
db: db,
|
||||
explicitlyWatchedTables: [],
|
||||
addJoins: <
|
||||
T extends i0.TableManagerState<
|
||||
addJoins:
|
||||
<
|
||||
T extends i0.TableManagerState<
|
||||
dynamic,
|
||||
dynamic,
|
||||
dynamic,
|
||||
|
|
@ -310,53 +364,65 @@ class $$MemoryAssetEntityTableTableManager extends i0.RootTableManager<
|
|||
dynamic,
|
||||
dynamic,
|
||||
dynamic,
|
||||
dynamic>>(state) {
|
||||
if (assetId) {
|
||||
state = state.withJoin(
|
||||
currentTable: table,
|
||||
currentColumn: table.assetId,
|
||||
referencedTable:
|
||||
i1.$$MemoryAssetEntityTableReferences._assetIdTable(db),
|
||||
referencedColumn: i1.$$MemoryAssetEntityTableReferences
|
||||
._assetIdTable(db)
|
||||
.id,
|
||||
) as T;
|
||||
}
|
||||
if (memoryId) {
|
||||
state = state.withJoin(
|
||||
currentTable: table,
|
||||
currentColumn: table.memoryId,
|
||||
referencedTable: i1.$$MemoryAssetEntityTableReferences
|
||||
._memoryIdTable(db),
|
||||
referencedColumn: i1.$$MemoryAssetEntityTableReferences
|
||||
._memoryIdTable(db)
|
||||
.id,
|
||||
) as T;
|
||||
}
|
||||
dynamic
|
||||
>
|
||||
>(state) {
|
||||
if (assetId) {
|
||||
state =
|
||||
state.withJoin(
|
||||
currentTable: table,
|
||||
currentColumn: table.assetId,
|
||||
referencedTable: i1
|
||||
.$$MemoryAssetEntityTableReferences
|
||||
._assetIdTable(db),
|
||||
referencedColumn: i1
|
||||
.$$MemoryAssetEntityTableReferences
|
||||
._assetIdTable(db)
|
||||
.id,
|
||||
)
|
||||
as T;
|
||||
}
|
||||
if (memoryId) {
|
||||
state =
|
||||
state.withJoin(
|
||||
currentTable: table,
|
||||
currentColumn: table.memoryId,
|
||||
referencedTable: i1
|
||||
.$$MemoryAssetEntityTableReferences
|
||||
._memoryIdTable(db),
|
||||
referencedColumn: i1
|
||||
.$$MemoryAssetEntityTableReferences
|
||||
._memoryIdTable(db)
|
||||
.id,
|
||||
)
|
||||
as T;
|
||||
}
|
||||
|
||||
return state;
|
||||
},
|
||||
return state;
|
||||
},
|
||||
getPrefetchedDataCallback: (items) async {
|
||||
return [];
|
||||
},
|
||||
);
|
||||
},
|
||||
));
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
typedef $$MemoryAssetEntityTableProcessedTableManager
|
||||
= i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$MemoryAssetEntityTable,
|
||||
i1.MemoryAssetEntityData,
|
||||
i1.$$MemoryAssetEntityTableFilterComposer,
|
||||
i1.$$MemoryAssetEntityTableOrderingComposer,
|
||||
i1.$$MemoryAssetEntityTableAnnotationComposer,
|
||||
$$MemoryAssetEntityTableCreateCompanionBuilder,
|
||||
$$MemoryAssetEntityTableUpdateCompanionBuilder,
|
||||
(i1.MemoryAssetEntityData, i1.$$MemoryAssetEntityTableReferences),
|
||||
i1.MemoryAssetEntityData,
|
||||
i0.PrefetchHooks Function({bool assetId, bool memoryId})>;
|
||||
typedef $$MemoryAssetEntityTableProcessedTableManager =
|
||||
i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$MemoryAssetEntityTable,
|
||||
i1.MemoryAssetEntityData,
|
||||
i1.$$MemoryAssetEntityTableFilterComposer,
|
||||
i1.$$MemoryAssetEntityTableOrderingComposer,
|
||||
i1.$$MemoryAssetEntityTableAnnotationComposer,
|
||||
$$MemoryAssetEntityTableCreateCompanionBuilder,
|
||||
$$MemoryAssetEntityTableUpdateCompanionBuilder,
|
||||
(i1.MemoryAssetEntityData, i1.$$MemoryAssetEntityTableReferences),
|
||||
i1.MemoryAssetEntityData,
|
||||
i0.PrefetchHooks Function({bool assetId, bool memoryId})
|
||||
>;
|
||||
|
||||
class $MemoryAssetEntityTable extends i2.MemoryAssetEntity
|
||||
with i0.TableInfo<$MemoryAssetEntityTable, i1.MemoryAssetEntityData> {
|
||||
|
|
@ -364,24 +430,34 @@ class $MemoryAssetEntityTable extends i2.MemoryAssetEntity
|
|||
final i0.GeneratedDatabase attachedDatabase;
|
||||
final String? _alias;
|
||||
$MemoryAssetEntityTable(this.attachedDatabase, [this._alias]);
|
||||
static const i0.VerificationMeta _assetIdMeta =
|
||||
const i0.VerificationMeta('assetId');
|
||||
static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta(
|
||||
'assetId',
|
||||
);
|
||||
@override
|
||||
late final i0.GeneratedColumn<String> assetId = i0.GeneratedColumn<String>(
|
||||
'asset_id', aliasedName, false,
|
||||
type: i0.DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
defaultConstraints: i0.GeneratedColumn.constraintIsAlways(
|
||||
'REFERENCES remote_asset_entity (id) ON DELETE CASCADE'));
|
||||
static const i0.VerificationMeta _memoryIdMeta =
|
||||
const i0.VerificationMeta('memoryId');
|
||||
'asset_id',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i0.DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
defaultConstraints: i0.GeneratedColumn.constraintIsAlways(
|
||||
'REFERENCES remote_asset_entity (id) ON DELETE CASCADE',
|
||||
),
|
||||
);
|
||||
static const i0.VerificationMeta _memoryIdMeta = const i0.VerificationMeta(
|
||||
'memoryId',
|
||||
);
|
||||
@override
|
||||
late final i0.GeneratedColumn<String> memoryId = i0.GeneratedColumn<String>(
|
||||
'memory_id', aliasedName, false,
|
||||
type: i0.DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
defaultConstraints: i0.GeneratedColumn.constraintIsAlways(
|
||||
'REFERENCES memory_entity (id) ON DELETE CASCADE'));
|
||||
'memory_id',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i0.DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
defaultConstraints: i0.GeneratedColumn.constraintIsAlways(
|
||||
'REFERENCES memory_entity (id) ON DELETE CASCADE',
|
||||
),
|
||||
);
|
||||
@override
|
||||
List<i0.GeneratedColumn> get $columns => [assetId, memoryId];
|
||||
@override
|
||||
|
|
@ -391,19 +467,24 @@ class $MemoryAssetEntityTable extends i2.MemoryAssetEntity
|
|||
static const String $name = 'memory_asset_entity';
|
||||
@override
|
||||
i0.VerificationContext validateIntegrity(
|
||||
i0.Insertable<i1.MemoryAssetEntityData> instance,
|
||||
{bool isInserting = false}) {
|
||||
i0.Insertable<i1.MemoryAssetEntityData> instance, {
|
||||
bool isInserting = false,
|
||||
}) {
|
||||
final context = i0.VerificationContext();
|
||||
final data = instance.toColumns(true);
|
||||
if (data.containsKey('asset_id')) {
|
||||
context.handle(_assetIdMeta,
|
||||
assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta));
|
||||
context.handle(
|
||||
_assetIdMeta,
|
||||
assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta),
|
||||
);
|
||||
} else if (isInserting) {
|
||||
context.missing(_assetIdMeta);
|
||||
}
|
||||
if (data.containsKey('memory_id')) {
|
||||
context.handle(_memoryIdMeta,
|
||||
memoryId.isAcceptableOrUnknown(data['memory_id']!, _memoryIdMeta));
|
||||
context.handle(
|
||||
_memoryIdMeta,
|
||||
memoryId.isAcceptableOrUnknown(data['memory_id']!, _memoryIdMeta),
|
||||
);
|
||||
} else if (isInserting) {
|
||||
context.missing(_memoryIdMeta);
|
||||
}
|
||||
|
|
@ -413,14 +494,20 @@ class $MemoryAssetEntityTable extends i2.MemoryAssetEntity
|
|||
@override
|
||||
Set<i0.GeneratedColumn> get $primaryKey => {assetId, memoryId};
|
||||
@override
|
||||
i1.MemoryAssetEntityData map(Map<String, dynamic> data,
|
||||
{String? tablePrefix}) {
|
||||
i1.MemoryAssetEntityData map(
|
||||
Map<String, dynamic> data, {
|
||||
String? tablePrefix,
|
||||
}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return i1.MemoryAssetEntityData(
|
||||
assetId: attachedDatabase.typeMapping
|
||||
.read(i0.DriftSqlType.string, data['${effectivePrefix}asset_id'])!,
|
||||
memoryId: attachedDatabase.typeMapping
|
||||
.read(i0.DriftSqlType.string, data['${effectivePrefix}memory_id'])!,
|
||||
assetId: attachedDatabase.typeMapping.read(
|
||||
i0.DriftSqlType.string,
|
||||
data['${effectivePrefix}asset_id'],
|
||||
)!,
|
||||
memoryId: attachedDatabase.typeMapping.read(
|
||||
i0.DriftSqlType.string,
|
||||
data['${effectivePrefix}memory_id'],
|
||||
)!,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -448,8 +535,10 @@ class MemoryAssetEntityData extends i0.DataClass
|
|||
return map;
|
||||
}
|
||||
|
||||
factory MemoryAssetEntityData.fromJson(Map<String, dynamic> json,
|
||||
{i0.ValueSerializer? serializer}) {
|
||||
factory MemoryAssetEntityData.fromJson(
|
||||
Map<String, dynamic> json, {
|
||||
i0.ValueSerializer? serializer,
|
||||
}) {
|
||||
serializer ??= i0.driftRuntimeOptions.defaultSerializer;
|
||||
return MemoryAssetEntityData(
|
||||
assetId: serializer.fromJson<String>(json['assetId']),
|
||||
|
|
@ -507,8 +596,8 @@ class MemoryAssetEntityCompanion
|
|||
MemoryAssetEntityCompanion.insert({
|
||||
required String assetId,
|
||||
required String memoryId,
|
||||
}) : assetId = i0.Value(assetId),
|
||||
memoryId = i0.Value(memoryId);
|
||||
}) : assetId = i0.Value(assetId),
|
||||
memoryId = i0.Value(memoryId);
|
||||
static i0.Insertable<i1.MemoryAssetEntityData> custom({
|
||||
i0.Expression<String>? assetId,
|
||||
i0.Expression<String>? memoryId,
|
||||
|
|
@ -519,8 +608,10 @@ class MemoryAssetEntityCompanion
|
|||
});
|
||||
}
|
||||
|
||||
i1.MemoryAssetEntityCompanion copyWith(
|
||||
{i0.Value<String>? assetId, i0.Value<String>? memoryId}) {
|
||||
i1.MemoryAssetEntityCompanion copyWith({
|
||||
i0.Value<String>? assetId,
|
||||
i0.Value<String>? memoryId,
|
||||
}) {
|
||||
return i1.MemoryAssetEntityCompanion(
|
||||
assetId: assetId ?? this.assetId,
|
||||
memoryId: memoryId ?? this.memoryId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue