new QueryProcessor(logger, registry, coverageProcessor, callbackRegistry, router, dbMgr)
Parameters:
Name | Type | Description |
---|---|---|
logger |
olympe.logging.Channel | |
registry |
olympe.dc.query.SubscriptionRegistry | |
coverageProcessor |
olympe.dc.query.processors.CoverageProcessor | |
callbackRegistry |
olympe.dc.query.CallbackRegistry | |
router |
olympe.dc.Router | |
dbMgr |
olympe.dc.db.DatabaseManager |
Methods
-
execute(query, context)
-
Executes the specified query at the right location:
- locally after ensuring the coverage if data has SERVER destination
- remotely if data is owned by a DBConnector.
Parameters:
Name Type Description query
olympe.dc.Query context
olympe.df.ExecutionContext Returns:
- Type
- Promise.<!olympe.dc.QueryResult>
-
executeFromCache(query)
-
Executes the specified query on the local in memory database, without ensuring any coverage.
Parameters:
Name Type Description query
olympe.dc.Query Returns:
-
subscribe(query, context)
-
Subscribes to the specified query at the right location:
- locally after ensuring the coverage if data has SERVER destination
- remotely if data is owned by a DBConnector.
Parameters:
Name Type Description query
olympe.dc.Query context
olympe.df.ExecutionContext Returns:
- Type
- rxjs.Observable.<!olympe.dc.QueryResult>