map method
override
Maps the given row returned by the database into the fitting data class.
Implementation
@override
MyUserRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return MyUserRow(
id: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}id'])!,
num: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}num'])!,
login: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}login']),
name: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}name']),
bio: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}bio']),
hasPassword: attachedDatabase.typeMapping
.read(DriftSqlType.bool, data['${effectivePrefix}has_password'])!,
emails: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}emails'])!,
phones: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}phones'])!,
chatDirectLink: attachedDatabase.typeMapping.read(
DriftSqlType.string, data['${effectivePrefix}chat_direct_link']),
unreadChatsCount: attachedDatabase.typeMapping.read(
DriftSqlType.int, data['${effectivePrefix}unread_chats_count'])!,
status: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}status']),
avatar: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}avatar']),
callCover: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}call_cover']),
presenceIndex: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}presence_index'])!,
online: attachedDatabase.typeMapping
.read(DriftSqlType.bool, data['${effectivePrefix}online'])!,
muted: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}muted']),
blocklistCount: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}blocklist_count']),
lastSeenAt: $MyUsersTable.$converterlastSeenAtn.fromSql(attachedDatabase
.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}last_seen_at'])),
ver: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}ver'])!,
welcomeMessage: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}welcome_message']),
);
}