Import full typed name files
This commit is contained in:
parent
87b622441e
commit
fcd704437f
157 changed files with 224 additions and 192 deletions
|
|
@ -96,7 +96,7 @@ await node.PutMigrationLedgerAsync(new AetheriaMigrationLedger
|
|||
},
|
||||
new AetheriaMigrationCount
|
||||
{
|
||||
DocumentType = "aetheria.name_file.v1",
|
||||
DocumentType = "aetheria.name_file.v2",
|
||||
Count = parsedNameFiles.Length
|
||||
}
|
||||
],
|
||||
|
|
@ -421,7 +421,8 @@ internal static class LegacyCatalogReader
|
|||
Name = name,
|
||||
LegacyId = legacyId,
|
||||
NameCount = GetArrayLength(payload, 2),
|
||||
SampleNames = GetStringArraySample(payload, 2, 8)
|
||||
SampleNames = GetStringArraySample(payload, 2, 8),
|
||||
Names = GetStringArray(payload, 2)
|
||||
}
|
||||
: null);
|
||||
}
|
||||
|
|
@ -789,6 +790,13 @@ internal static class LegacyCatalogReader
|
|||
: [];
|
||||
}
|
||||
|
||||
private static string[] GetStringArray(IReadOnlyDictionary<int, object?> payload, int key)
|
||||
{
|
||||
return payload.TryGetValue(key, out var value) && value is object?[] array
|
||||
? array.OfType<string>().ToArray()
|
||||
: [];
|
||||
}
|
||||
|
||||
private static ShapeFacts ReadShape(IReadOnlyDictionary<int, object?> payload, int key)
|
||||
{
|
||||
if (!payload.TryGetValue(key, out var value) || value == null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue