Try to filter event types/state keys at the database level instead of in Go

This commit is contained in:
Neil Alexander 2021-04-16 12:52:46 +01:00
parent 6900e0f495
commit 45bcca2cb6
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 47 additions and 43 deletions

View file

@ -43,7 +43,7 @@ type Events interface {
// bulkSelectStateEventByID lookups a list of state events by event ID.
// If any of the requested events are missing from the database it returns a types.MissingEventError
BulkSelectStateEventByID(ctx context.Context, eventIDs []string) ([]types.StateEntry, error)
BulkSelectStateEventByNID(ctx context.Context, eventNIDs []types.EventNID) ([]types.StateEntry, error)
BulkSelectStateEventByNID(ctx context.Context, eventNIDs []types.EventNID, stateKeyTuples []types.StateKeyTuple) ([]types.StateEntry, error)
// BulkSelectStateAtEventByID lookups the state at a list of events by event ID.
// If any of the requested events are missing from the database it returns a types.MissingEventError.
// If we do not have the state for any of the requested events it returns a types.MissingEventError.