60 Commits

Author SHA1 Message Date
51d336b88b
feat: handle undefined values in custom resolvers
- Update ResolverPlugin interface to allow resolve() to return undefined
- Modify CustomResolver to skip properties with undefined values
- Add test case for resolvers that return undefined
- Update existing tests to handle cases where no properties are resolved

This change makes the behavior more explicit when resolvers don't return a value,
which is particularly important for numeric aggregations where 0 might be a valid result.
2025-06-15 14:15:48 -05:00
35bbc974d8
refactor: move common resolve logic to base Lossy class
- Moved the resolve method implementation from individual resolvers to the base Lossy class
- Updated initializer methods to accept a LosslessViewOne parameter
- Removed redundant resolve methods from LastWriteWins, TimestampResolver, CustomResolver, and AggregationResolver
- Ensured consistent behavior across all resolver implementations
- All tests passing with the refactored code
2025-06-15 14:15:48 -05:00
885630f4d9
refactor: move CommonSchemas to test-utils
- Moved CommonSchemas from src/schema/schema.ts to src/test-utils/schemas.ts
- Updated all test files to import CommonSchemas from the new location
- Fixed the Document schema to match test expectations by making the author field required
- Added additional fields to the Document schema to match the original implementation
- Ensured all tests pass with the new implementation

Addresses PR feedback that CommonSchemas is only used in tests and should be moved to test files.
2025-06-15 14:15:47 -05:00
91514289ae
Entity conforms to schema if it has all required properties, not just some 2025-06-15 14:15:46 -05:00
1c55e95a7b cleanup and levelDB integration 2025-06-09 22:37:51 -04:00
c8488843d2 refactored file structure, added levelDB (needs work) 2025-06-09 21:53:28 -04:00
9a7bd7d3b0 implemented initial query engine and exposed HTTP endpoints 2025-06-09 21:23:18 -04:00
c2f1f537f7 major refactor to shore up some misalignments, ready for phase 3 2025-06-09 20:50:33 -04:00
2dbf9a420a Conflict Resolution strategies completed 2025-06-09 15:01:09 -04:00
c2aae9cfe6 support for negations complete 2025-06-09 13:39:25 -04:00
dc59dcc778 schema foundation support complete 2025-06-09 13:21:52 -04:00
33d4f92f8d transaction support done, deferred rollback 2025-06-09 12:55:15 -04:00
ba9cbc220d delta validation and error handling done 2025-06-09 12:47:37 -04:00
Ladd
b5e1acf4e3 minor stuff 2025-01-02 21:26:13 -06:00
Ladd
f1fcd97fe2 clarify type name 2025-01-02 21:22:29 -06:00
Ladd
6e0dccdfea refactored collection into abstract and basic in preparation for adding relational 2025-01-02 21:21:16 -06:00
Ladd
c6f6ece504 refactoring in preparation for adding more resolvers 2025-01-02 20:29:26 -06:00
Ladd
39d70b4680 added more concise syntax for deltas 2025-01-02 16:58:51 -06:00
Ladd
b147378bf8 achieve clean shutdown, no open handles 2025-01-02 14:43:32 -06:00
Ladd
58c5f5dc4e switched back to commonjs rather than esm 2025-01-01 22:56:34 -06:00
Ladd
756fd240f5 removed libp2p/gossipsub 2025-01-01 22:45:17 -06:00
Ladd
b4451a4d7a reduce logging 2025-01-01 22:31:07 -06:00
Ladd
65572a0e01 imports formatting 2025-01-01 22:27:16 -06:00
Ladd
e89d07c127 removed old comments 2025-01-01 22:26:51 -06:00
Ladd
4eec3b294c refactored lossy for clarity, added separate class for last write wins 2025-01-01 22:21:16 -06:00
Ladd
002c0a9fa9 trying to get jest to exit cleanly when running all tests.
Seems like maybe something in libp2p. Giving up for now.
2024-12-31 15:27:12 -06:00
Ladd
52bada4ac8 log messages start with uppercase 2024-12-31 14:58:28 -06:00
Ladd
cb09606590 fixed a small bug with global seedPeers 2024-12-31 14:04:34 -06:00
Ladd
20b71c5d2f log when libp2p is stopped 2024-12-31 12:49:08 -06:00
Ladd
6678176326 prefix logs with rz: 2024-12-31 12:40:26 -06:00
Ladd
1f8cbda73f prefix log messages with peer id 2024-12-31 12:28:24 -06:00
Ladd
44e6cfa13c added gossipsub in parallel with zeromq. converted project to ESM for compatibility with gossipsub 2024-12-31 11:35:09 -06:00
Ladd
940c3212be route to get delta ids 2024-12-30 01:32:51 -06:00
Ladd
198c996231 transaction improvements 2024-12-30 01:23:11 -06:00
Ladd
066c03f690 scaffolding to support transactions 2024-12-29 17:50:20 -06:00
Ladd
2e0672e04c added last-write-wins resolver 2024-12-29 14:35:30 -06:00
Ladd
870c1a62b6 moved lossless from collection to node, as we can reuse it for different kinds of data structures 2024-12-28 18:20:32 -06:00
Ladd
8fdec5da11 added delta ids; refactored delta to its own file; refactored http server 2024-12-27 13:43:43 -06:00
Ladd
9ec95ca8d8 removing vestigal scope 2024-12-26 19:03:50 -06:00
Ladd
c3f896f130 use lossless view for full list of entity ids 2024-12-26 16:52:46 -06:00
Ladd
3f0b5bec4e refactored to use lossless/lossy view mechanisms for resolving get requests 2024-12-26 15:59:03 -06:00
Ladd
9d9a1e1f08 fixed test run/002 2024-12-25 19:27:36 -06:00
Ladd
7b590ee77e formatting 2024-12-25 16:15:38 -06:00
Ladd
a5fb49475b refactored globals into classes 2024-12-25 16:13:48 -06:00
Ladd
8f97517075 notes 2024-12-25 00:42:16 -06:00
Ladd
a176a88b8c added concept status info to README 2024-12-24 13:58:02 -06:00
Ladd
b7921a6edf converted logging to use debug library. added markdown watch and reread 2024-12-24 13:41:31 -06:00
Ladd
165732d7cd fixup 2024-12-23 23:36:38 -06:00
Ladd
74cd5536af comments 2024-12-23 23:34:28 -06:00
Ladd
a283649c77 added lossy view 2024-12-23 23:30:54 -06:00