Classes | |
class | SmacqQuery |
Functions | |
def | __init__ |
def | run |
def | is_running |
def | fetchone |
def | fetchmany |
def | fetch_nb |
def | fetchall |
def | busy_loop |
def | __iter__ |
def | next |
def | append |
def | __iadd__ |
def | add |
def | __rshift__ |
def | __add__ |
def | __str__ |
def | DtsObject_getdata |
def | DtsObject_getitem |
def | DtsObject_dict |
def | DtsObject_str |
def | DtsObject_repr |
def | DtsObject_keys |
Variables | |
graph = None | |
dts = None | |
scheduler = None | |
running = False | |
__running |
System for Modular Analysis and Continuous Queries. See http://smacq.sourceforge.net/
def smacq::__add__ | ( | self, | ||
query | ||||
) |
Adds two queries together, and returns a new query as a result
def smacq::__iadd__ | ( | self, | ||
query | ||||
) |
This is the += operator.
def smacq::__iter__ | ( | self | ) |
Return self in compliane with iterator protocol.
def smacq::__rshift__ | ( | self, | ||
query | ||||
) |
This is the >>= operator. Joins the query on the righthand side with the query on the left. If the right hand side is a query string, it is used to create a new query object first.
def smacq::add | ( | self, | ||
query | ||||
) |
Adds the query on the righthand side to the query on the left. If the right hand side is a query string, it is used to create a new query object first.
def smacq::append | ( | self, | ||
query | ||||
) |
Joins this query with the other_query. other_query can be either a string or a SmacqGraph object
def smacq::busy_loop | ( | self | ) |
Runs the query until it is done, but throws out any results
def smacq::DtsObject_dict | ( | self | ) |
Construct a dictionary of all possible fields
def smacq::DtsObject_keys | ( | self, | ||
field_refs = False | ||||
) |
Returns a list of field names for this object. If field_refs is True, DtsField objects are returned instead. DtsField objects can be used instead of field name strings for DtsObject field lookups, and are signifigantly faster. The DtsField objects will be returned in the same order as the field names.
def smacq::DtsObject_repr | ( | self | ) |
Return string representation of DtsObject
def smacq::DtsObject_str | ( | self | ) |
Return human-readable version of DtsObject by showing all of its fields
def smacq::fetch_nb | ( | self, | ||
num_results = 1 | ||||
) |
Performs a non-blocking fetch of num_results data items. To test if the query is done, check the value of done(). If done is True, then a fetchall performed afterwards should return the remaining results without blocking.
def smacq::fetchall | ( | self, | ||
result_limit = None , |
||||
time_limit = 0 | ||||
) |
Fetches all results produced by the current query. Note that querying an unbounded data source will cause the function to never return or run out of memory. Returns a tuple containing the list of results and the reason it returned. Two limiting parameters are provided: result_limit and time_limit (in seconds). If either limit is reached, the query will return it's results immediately. If either limit is set to None (default) or zero, it has no effect.
def smacq::fetchmany | ( | self, | ||
num_results = 1 | ||||
) |
Returns num_results DtsObject objects in a list. This will wait for results if it needs to. If the number of results returned is less than requested, then the query has been completed.
def smacq::fetchone | ( | self | ) |
Fetch the next result object and return it, or None when no more data is available
def smacq::next | ( | self | ) |
Return the next DtsObject returned by the query. Raise StopIteration when complete.
def smacq::run | ( | self, | ||
ignoreDups = False | ||||
) |
Adds this query to the main SmacqGraph and runs it. If the scheduler hasn't already been started, then it is started.
smacq::graph = None |
Executes one or more queries in the SMACQ (System for Modular Analysis and Continous Queries) API.