serializeDbEvent function
int
serializeDbEvent(
- IsarWriter writer,
- DbEvent object
)
Implementation
@isarProtected
int serializeDbEvent(IsarWriter writer, DbEvent object) {
IsarCore.writeString(writer, 1, object.id);
IsarCore.writeString(writer, 2, object.pubKey);
IsarCore.writeLong(writer, 3, object.kind);
IsarCore.writeLong(writer, 4, object.createdAt);
IsarCore.writeString(writer, 5, isarJsonEncode(object.tags));
{
final list = object.pTags;
final listWriter = IsarCore.beginList(writer, 6, list.length);
for (var i = 0; i < list.length; i++) {
IsarCore.writeString(listWriter, i, list[i]);
}
IsarCore.endList(writer, listWriter);
}
IsarCore.writeString(writer, 7, object.content);
IsarCore.writeString(writer, 8, object.sig);
{
final value = object.validSig;
if (value == null) {
IsarCore.writeNull(writer, 9);
} else {
IsarCore.writeBool(writer, 9, value);
}
}
{
final list = object.sources;
final listWriter = IsarCore.beginList(writer, 10, list.length);
for (var i = 0; i < list.length; i++) {
IsarCore.writeString(listWriter, i, list[i]);
}
IsarCore.endList(writer, listWriter);
}
return Isar.fastHash(object.id);
}