Hello, I am trying to read multiple items from storage in server runtime code and Im unsure what to expect in terms of return values when only one of the requested reads does not exist. For instance, if I have the following:
reads := *runtime.StorageRead{
{
Collection: “characters”,
Key: charID,
UserID: userID,
},
{
Collection: “quests”,
Key: questID,
UserID: userID,
},
{
Collection: “accepted_quests”,
Key: questID,
UserID: userID,
},
}
acks, err := nk.StorageRead(ctx, reads)
if err != nil {
return “”, fmt.Errorf(“failed to read from datastore: %w”, err)
}
If the third read object was not found in the datbase, but the other two werre, how many items should be returned in the acks list? The StorageObject type doesn’t seem to have any notion of whether or not the entry existed, so I would expect there to only be two items returned, but then would an error be returned?
In general, the documentation around the Go runtime library is rather lacking and it would be nice to at least see some code comments in the interface defintions so we can see what to expect.