QueryEngine — Local
Source: reventless-local/src/adapter/QueryEngine/LocalQueryEngine.res
AWS equivalent: QueryEngine → DynamoDB
How It Works
Created via Make(Bus) functor. Uses the bus's QueryDb registries to look up data:
scan— callsBus.getQueryDbStream(readModelName)and appliesStream.take(limit)to honour the limit without loading all items. Falls back toBus.getQueryDbScanfor backward compatibility.query— callsBus.getQueryDb(readModelName)to get the operations record, then usesloadStreamwith optionalStream.take(limit).
Operations
| Operation | Description |
|---|---|
scan | Full scan of a read model's data with optional limit |
query | Key-based lookup with optional limit |
Key Differences from AWS
| Aspect | Local | AWS |
|---|---|---|
| Scan | In-memory array/stream iteration | DynamoDB Scan with filter expressions |
| Query | Dict key lookup | DynamoDB Query with key conditions |
| Indexes | Not supported | secondary index/LSI support |
| Filtering | None (returns all matches) | DynamoDB filter expressions |