Interface: QueryProcessor
A QueryProcessor runs queries -- this interface is very simple since
our only query processor (TupleRouterM) generates and processes queries
all by itself (it doesn't currently provide a non-am based interface
for receiving queries from neighbors.)
See uses portion of the Network interface in TupleRouterM to understand
how queries are submitted to a query processor.
For now, this interface simply allows clients to know when a query has ended
and get information about currently running queries.
- Components providing this interface:
-
tos.lib.TinyDB.TupleRouter
tos.lib.TinyDB.TupleRouterM
- Components requiring this interface:
-
tos.lib.TinyDB.AggOperator
tos.lib.TinyDB.DBBufferC
tos.lib.TinyDB.NetworkMultiHopM
tos.lib.TinyDB.TinyDBAttrM
tos.lib.TinyDB.Tuple
-
ParsedQueryPtr
getQueryCmd
(uint8_t qid)
-
short
msgToQueryRoot
(TOS_Msg *msg)
-
short numQueries(void)
-
ParsedQueryPtr getQueryIdx(short i)
-
bool queryProcessorWantsData(QueryResult *qr)
-
result_t queryComplete(ParsedQueryPtr q)
getQueryCmd
ParsedQueryPtr getQueryCmd(uint8_t qid) Return information about a currently running query
Parameters: |
qid - The query for which information is sought
|
Returns: |
A pointer to the query data structure, or NULL if no such query exists.
|
msgToQueryRoot
short msgToQueryRoot(TOS_Msg *msg) Given a processor message return the owner (origninating node) of the query, or
-1 if the query is unknown or the message is a query processor message.
Parameters: |
msg - The query for which the root is sought
|