Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EventsQuery interface and LevelIndex enhancements. (#625)
This PR contains a new interface method, EventsQuery, which is primarily used to query for filtered events in order to enable SelectiveSync. EventLogLevel: EventLogLevel now takes an additional property indexes to it's append() function. These indexes are key-value indexes in the same format that we use withe the MessageStore index. IndexLevel: To enable this functionality IndexLevel has been enhanced to become a more general purpose LevelDB Index that supports sorting as well as a cursor pointer property. * dwn selevtive sync wip, copy-pasta from index level * first pass at POC for selective sync * eventlog query with watermark * EventsQuery interface * update after rebase * events query interfaces and handler * index immutable RecordsWrite properties of a RecordsDelete * additional indexing for event log/sync * complete tests added to handler * refactor and move tests * events get coverage * increase coverage clean up query functions * range filter support, extract event within iterator * additional event log indexing tests * refactor indexes to use common methods, remove cidlog in favor of cidindex * simply sync * refactor before consolidation * initial pass at abstraction for IndexStore within the sync log store * abstracting functionality for index store * refactor cleanup * continue refactor and test effort * continue refactoring effort * test index level * complete test coverage for index level * migrate functionality from MessageStoreIndex to new IndexLevel * increase test case coverage * clean up filter object * use new IndexLevel cursor functionality for MessageStore pagination * clean up, comments * remove selective sync specific tests, added to coverage and comments * clean up tests and legibility * improved code legibility and comments * update after rebase * add more testing for sort/cursor, finalized sorting logic * add tests for sort/cursor when inserted out of order * move events get schema into the interfaces folder * export FilteredQuery * export EventsQuery Message and Reply types, add processMessage overload * sortProperty vs sort * deletes all indexed keys * review chanes * key -> item ID rename where appropriate (#571) * more item ID renames (#572) * sync tests, need to make more clear * review suggestions * scenario test and review suggestions * Disambiguating meaning of cursor (#575) * Disambiguating meaning of cursor * comment update Co-authored-by: Diane Huxley <[email protected]> --------- Co-authored-by: Liran Cohen <[email protected]> Co-authored-by: Diane Huxley <[email protected]> * sort and pagination within the index level implementation * rip out property indexing * clean up index level and apply to message store and event log * clean up tests and add comments * cleanup and comments * pagination bench tests * add to scenario test * update benchmark tests * some cleanup * change benchmark filters for pagination * create sorted indexes for all indexed properties * filter query for index * support both query paths, update records query tests * clean up and add some comments * clean up, two paths * cleanup after rebase, add unimplemented missing test * remove circular deps * filter selector/augmentor * add index utils * fix circular dep * clean up * update tests to use top-level query, will addd more tests * fix EventsQuery/cursor check * move filter selector into a class, renamed index utility to FilterUtility * added tests for filter utility * move FilterSelector class to util/filters, updated tests to cover level index, need to refactor tests a bit more * moved index types into their own file, fixes circular deps, cleaner placement * simplify index-level, remove external watermark using messageCid as a cursor for events * filter selector tresting, needs some rules removed/changed * events query for author across message types * review suggestions * replace watermark with cursor where necessary * update match comments * update watermark comments * address PR comments * Remove Nested Object Indexing (#621) * only index strings, numbers, and booleans * clean up any usages of uknown in filters * clean up matchRange filter * move encoding value/numbers into IndexLevel * fix async test * FilterIndex to KeyValues type * remove faltten * refactoring (#622) * Renames (#626) * review suggestions * removed uneeeded indexing, remove refernces to Record type in favor of KeyValues when building indexes * remove circular dep * update tests * update EventsFilter types, error handling, convertFilter/parse * added tests for nonsensicle pobilshed filter * update test suite * allow indexing of empty strings * scaffold events query scenario tests * updated tests for filter reducer * fix message store benchmark * filter reducer coverage * test for one of * add testing, filter type needs work * fix circular dep * rename method * Modified code such that in-memory-paging supports empty filter and array (#632) * Modified code such that in-memory-paging supports empty filter and array * Removed the need for FilterSelector * remove author filter and tests * test filter selector * move encoding tests to index-level, add tests for convert range criterion * protocol events tests * more event filter tests * more scenario test coverage * contextId scenario testing, add comments * updated tests to isFilterConcise --------- Co-authored-by: Henry Tsai <[email protected]> Co-authored-by: Diane Huxley <[email protected]>
- Loading branch information