Apps Components Interfaces All Files Source Tree | source: tos.lib.TinyDB.DBBuffer.nc |
The DBBuffer interface provides a place for queries to output their results to or fetch results from.
Buffers can be in RAM or simply drain out to the network. In the case of RAM buffers, they have a fixed (preallocated) number of rows that are recycled according to some eviction policy. Radio buffers have a single logical row that is written out via a RadioQueue interface.
Author: | Sam Madden (madden@cs.berkeley.edu) |
Commands |
Returns: | the number of rows in the specified buffer |
Returns: | the number of used rows in the buffer |
Returns: | the schema of the results in the specified buffer |
Parameters: |
bufferId - (on return) An unused buffer id |
Returns: | the next unused buffer id (in bufferId), or err_OutOfMemory, if no mo buffers are available |
Parameters: |
qid - The query id to lookup bufferId - (on return) The id of the buffer corresponding to qid |
Returns: | err_InvalidIndex if no such buffer exists |
Events |
Commands - Details |
Returns: | err_NoMoreResults if no results are available |
Note that this routine may return a QueryResult that contains pointers into DBBuffer-local data structures which will be deallocated as soon as pop() is called.
Returns: | err_NoMoreResults if no results are available |
Returns: | err_UnsupportedPolicy if the specified policy can't be applied |
err_ResultBufferBusy If other buffer requests are currently outstanding |