regenerated drift database g dart
This commit is contained in:
@@ -913,15 +913,26 @@ class $MatchTableTable extends MatchTable
|
|||||||
late final GeneratedColumn<String> groupId = GeneratedColumn<String>(
|
late final GeneratedColumn<String> groupId = GeneratedColumn<String>(
|
||||||
'group_id',
|
'group_id',
|
||||||
aliasedName,
|
aliasedName,
|
||||||
true,
|
false,
|
||||||
type: DriftSqlType.string,
|
type: DriftSqlType.string,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: true,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
||||||
'REFERENCES group_table (id)',
|
'REFERENCES group_table (id)',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
||||||
|
'createdAt',
|
||||||
|
);
|
||||||
@override
|
@override
|
||||||
List<GeneratedColumn> get $columns => [id, gameId, groupId];
|
late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(
|
||||||
|
'created_at',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: DriftSqlType.dateTime,
|
||||||
|
requiredDuringInsert: true,
|
||||||
|
);
|
||||||
|
@override
|
||||||
|
List<GeneratedColumn> get $columns => [id, gameId, groupId, createdAt];
|
||||||
@override
|
@override
|
||||||
String get aliasedName => _alias ?? actualTableName;
|
String get aliasedName => _alias ?? actualTableName;
|
||||||
@override
|
@override
|
||||||
@@ -952,6 +963,16 @@ class $MatchTableTable extends MatchTable
|
|||||||
_groupIdMeta,
|
_groupIdMeta,
|
||||||
groupId.isAcceptableOrUnknown(data['group_id']!, _groupIdMeta),
|
groupId.isAcceptableOrUnknown(data['group_id']!, _groupIdMeta),
|
||||||
);
|
);
|
||||||
|
} else if (isInserting) {
|
||||||
|
context.missing(_groupIdMeta);
|
||||||
|
}
|
||||||
|
if (data.containsKey('created_at')) {
|
||||||
|
context.handle(
|
||||||
|
_createdAtMeta,
|
||||||
|
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
|
||||||
|
);
|
||||||
|
} else if (isInserting) {
|
||||||
|
context.missing(_createdAtMeta);
|
||||||
}
|
}
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
@@ -973,7 +994,11 @@ class $MatchTableTable extends MatchTable
|
|||||||
groupId: attachedDatabase.typeMapping.read(
|
groupId: attachedDatabase.typeMapping.read(
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}group_id'],
|
data['${effectivePrefix}group_id'],
|
||||||
),
|
)!,
|
||||||
|
createdAt: attachedDatabase.typeMapping.read(
|
||||||
|
DriftSqlType.dateTime,
|
||||||
|
data['${effectivePrefix}created_at'],
|
||||||
|
)!,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -986,16 +1011,21 @@ class $MatchTableTable extends MatchTable
|
|||||||
class MatchTableData extends DataClass implements Insertable<MatchTableData> {
|
class MatchTableData extends DataClass implements Insertable<MatchTableData> {
|
||||||
final String id;
|
final String id;
|
||||||
final int gameId;
|
final int gameId;
|
||||||
final String? groupId;
|
final String groupId;
|
||||||
const MatchTableData({required this.id, required this.gameId, this.groupId});
|
final DateTime createdAt;
|
||||||
|
const MatchTableData({
|
||||||
|
required this.id,
|
||||||
|
required this.gameId,
|
||||||
|
required this.groupId,
|
||||||
|
required this.createdAt,
|
||||||
|
});
|
||||||
@override
|
@override
|
||||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||||
final map = <String, Expression>{};
|
final map = <String, Expression>{};
|
||||||
map['id'] = Variable<String>(id);
|
map['id'] = Variable<String>(id);
|
||||||
map['game_id'] = Variable<int>(gameId);
|
map['game_id'] = Variable<int>(gameId);
|
||||||
if (!nullToAbsent || groupId != null) {
|
|
||||||
map['group_id'] = Variable<String>(groupId);
|
map['group_id'] = Variable<String>(groupId);
|
||||||
}
|
map['created_at'] = Variable<DateTime>(createdAt);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1003,9 +1033,8 @@ class MatchTableData extends DataClass implements Insertable<MatchTableData> {
|
|||||||
return MatchTableCompanion(
|
return MatchTableCompanion(
|
||||||
id: Value(id),
|
id: Value(id),
|
||||||
gameId: Value(gameId),
|
gameId: Value(gameId),
|
||||||
groupId: groupId == null && nullToAbsent
|
groupId: Value(groupId),
|
||||||
? const Value.absent()
|
createdAt: Value(createdAt),
|
||||||
: Value(groupId),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1017,7 +1046,8 @@ class MatchTableData extends DataClass implements Insertable<MatchTableData> {
|
|||||||
return MatchTableData(
|
return MatchTableData(
|
||||||
id: serializer.fromJson<String>(json['id']),
|
id: serializer.fromJson<String>(json['id']),
|
||||||
gameId: serializer.fromJson<int>(json['gameId']),
|
gameId: serializer.fromJson<int>(json['gameId']),
|
||||||
groupId: serializer.fromJson<String?>(json['groupId']),
|
groupId: serializer.fromJson<String>(json['groupId']),
|
||||||
|
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
@@ -1026,24 +1056,28 @@ class MatchTableData extends DataClass implements Insertable<MatchTableData> {
|
|||||||
return <String, dynamic>{
|
return <String, dynamic>{
|
||||||
'id': serializer.toJson<String>(id),
|
'id': serializer.toJson<String>(id),
|
||||||
'gameId': serializer.toJson<int>(gameId),
|
'gameId': serializer.toJson<int>(gameId),
|
||||||
'groupId': serializer.toJson<String?>(groupId),
|
'groupId': serializer.toJson<String>(groupId),
|
||||||
|
'createdAt': serializer.toJson<DateTime>(createdAt),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
MatchTableData copyWith({
|
MatchTableData copyWith({
|
||||||
String? id,
|
String? id,
|
||||||
int? gameId,
|
int? gameId,
|
||||||
Value<String?> groupId = const Value.absent(),
|
String? groupId,
|
||||||
|
DateTime? createdAt,
|
||||||
}) => MatchTableData(
|
}) => MatchTableData(
|
||||||
id: id ?? this.id,
|
id: id ?? this.id,
|
||||||
gameId: gameId ?? this.gameId,
|
gameId: gameId ?? this.gameId,
|
||||||
groupId: groupId.present ? groupId.value : this.groupId,
|
groupId: groupId ?? this.groupId,
|
||||||
|
createdAt: createdAt ?? this.createdAt,
|
||||||
);
|
);
|
||||||
MatchTableData copyWithCompanion(MatchTableCompanion data) {
|
MatchTableData copyWithCompanion(MatchTableCompanion data) {
|
||||||
return MatchTableData(
|
return MatchTableData(
|
||||||
id: data.id.present ? data.id.value : this.id,
|
id: data.id.present ? data.id.value : this.id,
|
||||||
gameId: data.gameId.present ? data.gameId.value : this.gameId,
|
gameId: data.gameId.present ? data.gameId.value : this.gameId,
|
||||||
groupId: data.groupId.present ? data.groupId.value : this.groupId,
|
groupId: data.groupId.present ? data.groupId.value : this.groupId,
|
||||||
|
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1052,50 +1086,59 @@ class MatchTableData extends DataClass implements Insertable<MatchTableData> {
|
|||||||
return (StringBuffer('MatchTableData(')
|
return (StringBuffer('MatchTableData(')
|
||||||
..write('id: $id, ')
|
..write('id: $id, ')
|
||||||
..write('gameId: $gameId, ')
|
..write('gameId: $gameId, ')
|
||||||
..write('groupId: $groupId')
|
..write('groupId: $groupId, ')
|
||||||
|
..write('createdAt: $createdAt')
|
||||||
..write(')'))
|
..write(')'))
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(id, gameId, groupId);
|
int get hashCode => Object.hash(id, gameId, groupId, createdAt);
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
(other is MatchTableData &&
|
(other is MatchTableData &&
|
||||||
other.id == this.id &&
|
other.id == this.id &&
|
||||||
other.gameId == this.gameId &&
|
other.gameId == this.gameId &&
|
||||||
other.groupId == this.groupId);
|
other.groupId == this.groupId &&
|
||||||
|
other.createdAt == this.createdAt);
|
||||||
}
|
}
|
||||||
|
|
||||||
class MatchTableCompanion extends UpdateCompanion<MatchTableData> {
|
class MatchTableCompanion extends UpdateCompanion<MatchTableData> {
|
||||||
final Value<String> id;
|
final Value<String> id;
|
||||||
final Value<int> gameId;
|
final Value<int> gameId;
|
||||||
final Value<String?> groupId;
|
final Value<String> groupId;
|
||||||
|
final Value<DateTime> createdAt;
|
||||||
final Value<int> rowid;
|
final Value<int> rowid;
|
||||||
const MatchTableCompanion({
|
const MatchTableCompanion({
|
||||||
this.id = const Value.absent(),
|
this.id = const Value.absent(),
|
||||||
this.gameId = const Value.absent(),
|
this.gameId = const Value.absent(),
|
||||||
this.groupId = const Value.absent(),
|
this.groupId = const Value.absent(),
|
||||||
|
this.createdAt = const Value.absent(),
|
||||||
this.rowid = const Value.absent(),
|
this.rowid = const Value.absent(),
|
||||||
});
|
});
|
||||||
MatchTableCompanion.insert({
|
MatchTableCompanion.insert({
|
||||||
required String id,
|
required String id,
|
||||||
required int gameId,
|
required int gameId,
|
||||||
this.groupId = const Value.absent(),
|
required String groupId,
|
||||||
|
required DateTime createdAt,
|
||||||
this.rowid = const Value.absent(),
|
this.rowid = const Value.absent(),
|
||||||
}) : id = Value(id),
|
}) : id = Value(id),
|
||||||
gameId = Value(gameId);
|
gameId = Value(gameId),
|
||||||
|
groupId = Value(groupId),
|
||||||
|
createdAt = Value(createdAt);
|
||||||
static Insertable<MatchTableData> custom({
|
static Insertable<MatchTableData> custom({
|
||||||
Expression<String>? id,
|
Expression<String>? id,
|
||||||
Expression<int>? gameId,
|
Expression<int>? gameId,
|
||||||
Expression<String>? groupId,
|
Expression<String>? groupId,
|
||||||
|
Expression<DateTime>? createdAt,
|
||||||
Expression<int>? rowid,
|
Expression<int>? rowid,
|
||||||
}) {
|
}) {
|
||||||
return RawValuesInsertable({
|
return RawValuesInsertable({
|
||||||
if (id != null) 'id': id,
|
if (id != null) 'id': id,
|
||||||
if (gameId != null) 'game_id': gameId,
|
if (gameId != null) 'game_id': gameId,
|
||||||
if (groupId != null) 'group_id': groupId,
|
if (groupId != null) 'group_id': groupId,
|
||||||
|
if (createdAt != null) 'created_at': createdAt,
|
||||||
if (rowid != null) 'rowid': rowid,
|
if (rowid != null) 'rowid': rowid,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1103,13 +1146,15 @@ class MatchTableCompanion extends UpdateCompanion<MatchTableData> {
|
|||||||
MatchTableCompanion copyWith({
|
MatchTableCompanion copyWith({
|
||||||
Value<String>? id,
|
Value<String>? id,
|
||||||
Value<int>? gameId,
|
Value<int>? gameId,
|
||||||
Value<String?>? groupId,
|
Value<String>? groupId,
|
||||||
|
Value<DateTime>? createdAt,
|
||||||
Value<int>? rowid,
|
Value<int>? rowid,
|
||||||
}) {
|
}) {
|
||||||
return MatchTableCompanion(
|
return MatchTableCompanion(
|
||||||
id: id ?? this.id,
|
id: id ?? this.id,
|
||||||
gameId: gameId ?? this.gameId,
|
gameId: gameId ?? this.gameId,
|
||||||
groupId: groupId ?? this.groupId,
|
groupId: groupId ?? this.groupId,
|
||||||
|
createdAt: createdAt ?? this.createdAt,
|
||||||
rowid: rowid ?? this.rowid,
|
rowid: rowid ?? this.rowid,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1126,6 +1171,9 @@ class MatchTableCompanion extends UpdateCompanion<MatchTableData> {
|
|||||||
if (groupId.present) {
|
if (groupId.present) {
|
||||||
map['group_id'] = Variable<String>(groupId.value);
|
map['group_id'] = Variable<String>(groupId.value);
|
||||||
}
|
}
|
||||||
|
if (createdAt.present) {
|
||||||
|
map['created_at'] = Variable<DateTime>(createdAt.value);
|
||||||
|
}
|
||||||
if (rowid.present) {
|
if (rowid.present) {
|
||||||
map['rowid'] = Variable<int>(rowid.value);
|
map['rowid'] = Variable<int>(rowid.value);
|
||||||
}
|
}
|
||||||
@@ -1138,6 +1186,7 @@ class MatchTableCompanion extends UpdateCompanion<MatchTableData> {
|
|||||||
..write('id: $id, ')
|
..write('id: $id, ')
|
||||||
..write('gameId: $gameId, ')
|
..write('gameId: $gameId, ')
|
||||||
..write('groupId: $groupId, ')
|
..write('groupId: $groupId, ')
|
||||||
|
..write('createdAt: $createdAt, ')
|
||||||
..write('rowid: $rowid')
|
..write('rowid: $rowid')
|
||||||
..write(')'))
|
..write(')'))
|
||||||
.toString();
|
.toString();
|
||||||
@@ -3449,14 +3498,16 @@ typedef $$MatchTableTableCreateCompanionBuilder =
|
|||||||
MatchTableCompanion Function({
|
MatchTableCompanion Function({
|
||||||
required String id,
|
required String id,
|
||||||
required int gameId,
|
required int gameId,
|
||||||
Value<String?> groupId,
|
required String groupId,
|
||||||
|
required DateTime createdAt,
|
||||||
Value<int> rowid,
|
Value<int> rowid,
|
||||||
});
|
});
|
||||||
typedef $$MatchTableTableUpdateCompanionBuilder =
|
typedef $$MatchTableTableUpdateCompanionBuilder =
|
||||||
MatchTableCompanion Function({
|
MatchTableCompanion Function({
|
||||||
Value<String> id,
|
Value<String> id,
|
||||||
Value<int> gameId,
|
Value<int> gameId,
|
||||||
Value<String?> groupId,
|
Value<String> groupId,
|
||||||
|
Value<DateTime> createdAt,
|
||||||
Value<int> rowid,
|
Value<int> rowid,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -3486,9 +3537,9 @@ final class $$MatchTableTableReferences
|
|||||||
$_aliasNameGenerator(db.matchTable.groupId, db.groupTable.id),
|
$_aliasNameGenerator(db.matchTable.groupId, db.groupTable.id),
|
||||||
);
|
);
|
||||||
|
|
||||||
$$GroupTableTableProcessedTableManager? get groupId {
|
$$GroupTableTableProcessedTableManager get groupId {
|
||||||
final $_column = $_itemColumn<String>('group_id');
|
final $_column = $_itemColumn<String>('group_id')!;
|
||||||
if ($_column == null) return null;
|
|
||||||
final manager = $$GroupTableTableTableManager(
|
final manager = $$GroupTableTableTableManager(
|
||||||
$_db,
|
$_db,
|
||||||
$_db.groupTable,
|
$_db.groupTable,
|
||||||
@@ -3587,6 +3638,11 @@ class $$MatchTableTableFilterComposer
|
|||||||
builder: (column) => ColumnFilters(column),
|
builder: (column) => ColumnFilters(column),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ColumnFilters<DateTime> get createdAt => $composableBuilder(
|
||||||
|
column: $table.createdAt,
|
||||||
|
builder: (column) => ColumnFilters(column),
|
||||||
|
);
|
||||||
|
|
||||||
$$GameTableTableFilterComposer get gameId {
|
$$GameTableTableFilterComposer get gameId {
|
||||||
final $$GameTableTableFilterComposer composer = $composerBuilder(
|
final $$GameTableTableFilterComposer composer = $composerBuilder(
|
||||||
composer: this,
|
composer: this,
|
||||||
@@ -3723,6 +3779,11 @@ class $$MatchTableTableOrderingComposer
|
|||||||
builder: (column) => ColumnOrderings(column),
|
builder: (column) => ColumnOrderings(column),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
|
||||||
|
column: $table.createdAt,
|
||||||
|
builder: (column) => ColumnOrderings(column),
|
||||||
|
);
|
||||||
|
|
||||||
$$GameTableTableOrderingComposer get gameId {
|
$$GameTableTableOrderingComposer get gameId {
|
||||||
final $$GameTableTableOrderingComposer composer = $composerBuilder(
|
final $$GameTableTableOrderingComposer composer = $composerBuilder(
|
||||||
composer: this,
|
composer: this,
|
||||||
@@ -3782,6 +3843,9 @@ class $$MatchTableTableAnnotationComposer
|
|||||||
GeneratedColumn<String> get id =>
|
GeneratedColumn<String> get id =>
|
||||||
$composableBuilder(column: $table.id, builder: (column) => column);
|
$composableBuilder(column: $table.id, builder: (column) => column);
|
||||||
|
|
||||||
|
GeneratedColumn<DateTime> get createdAt =>
|
||||||
|
$composableBuilder(column: $table.createdAt, builder: (column) => column);
|
||||||
|
|
||||||
$$GameTableTableAnnotationComposer get gameId {
|
$$GameTableTableAnnotationComposer get gameId {
|
||||||
final $$GameTableTableAnnotationComposer composer = $composerBuilder(
|
final $$GameTableTableAnnotationComposer composer = $composerBuilder(
|
||||||
composer: this,
|
composer: this,
|
||||||
@@ -3941,24 +4005,28 @@ class $$MatchTableTableTableManager
|
|||||||
({
|
({
|
||||||
Value<String> id = const Value.absent(),
|
Value<String> id = const Value.absent(),
|
||||||
Value<int> gameId = const Value.absent(),
|
Value<int> gameId = const Value.absent(),
|
||||||
Value<String?> groupId = const Value.absent(),
|
Value<String> groupId = const Value.absent(),
|
||||||
|
Value<DateTime> createdAt = const Value.absent(),
|
||||||
Value<int> rowid = const Value.absent(),
|
Value<int> rowid = const Value.absent(),
|
||||||
}) => MatchTableCompanion(
|
}) => MatchTableCompanion(
|
||||||
id: id,
|
id: id,
|
||||||
gameId: gameId,
|
gameId: gameId,
|
||||||
groupId: groupId,
|
groupId: groupId,
|
||||||
|
createdAt: createdAt,
|
||||||
rowid: rowid,
|
rowid: rowid,
|
||||||
),
|
),
|
||||||
createCompanionCallback:
|
createCompanionCallback:
|
||||||
({
|
({
|
||||||
required String id,
|
required String id,
|
||||||
required int gameId,
|
required int gameId,
|
||||||
Value<String?> groupId = const Value.absent(),
|
required String groupId,
|
||||||
|
required DateTime createdAt,
|
||||||
Value<int> rowid = const Value.absent(),
|
Value<int> rowid = const Value.absent(),
|
||||||
}) => MatchTableCompanion.insert(
|
}) => MatchTableCompanion.insert(
|
||||||
id: id,
|
id: id,
|
||||||
gameId: gameId,
|
gameId: gameId,
|
||||||
groupId: groupId,
|
groupId: groupId,
|
||||||
|
createdAt: createdAt,
|
||||||
rowid: rowid,
|
rowid: rowid,
|
||||||
),
|
),
|
||||||
withReferenceMapper: (p0) => p0
|
withReferenceMapper: (p0) => p0
|
||||||
|
|||||||
Reference in New Issue
Block a user