Skip to content

Commit 59c6ef6

Browse files
PIG208gnprice
authored andcommitted
db [nfc]: Remove handwritten copy of copyWithCompanion
This has been addressed in Greg's upstream PR: simolus3/drift#3022 which was pulled in by the Drift upgrade in 8b564e4 (zulip#1117). Signed-off-by: Zixuan James Li <[email protected]>
1 parent 0edabbf commit 59c6ef6

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

lib/model/database.dart

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,13 @@ class Accounts extends Table {
3939

4040
Column<String> get ackedPushToken => text().nullable()();
4141

42-
// If adding a column, be sure to add it to copyWithCompanion too.
43-
4442
@override
4543
List<Set<Column<Object>>> get uniqueKeys => [
4644
{realmUrl, userId},
4745
{realmUrl, email},
4846
];
4947
}
5048

51-
extension AccountExtension on Account {
52-
Account copyWithCompanion(AccountsCompanion data) { // TODO(drift): generate this
53-
return Account(
54-
id: data.id.present ? data.id.value : id,
55-
realmUrl: data.realmUrl.present ? data.realmUrl.value : realmUrl,
56-
userId: data.userId.present ? data.userId.value : userId,
57-
email: data.email.present ? data.email.value : email,
58-
apiKey: data.apiKey.present ? data.apiKey.value : apiKey,
59-
zulipVersion: data.zulipVersion.present ? data.zulipVersion.value : zulipVersion,
60-
zulipMergeBase: data.zulipMergeBase.present ? data.zulipMergeBase.value : zulipMergeBase,
61-
zulipFeatureLevel: data.zulipFeatureLevel.present ? data.zulipFeatureLevel.value : zulipFeatureLevel,
62-
ackedPushToken: data.ackedPushToken.present ? data.ackedPushToken.value : ackedPushToken,
63-
);
64-
}
65-
}
66-
6749
class UriConverter extends TypeConverter<Uri, String> {
6850
const UriConverter();
6951
@override String toSql(Uri value) => value.toString();

0 commit comments

Comments
 (0)