Class v.c.a.s.AttributeQuery(BaseQuery):

Part of vmc.contrib.axiom.store View In Hierarchy

A query for the value of a single attribute from an item class, so as to load only a single value rather than an instantiating an entire item when the value is all that is needed.
Method __init__ Create a generic object-oriented interface to SQL, used to implement
Method count
Method sum Return the sum of all the values returned by this query. If no results
Method average Return the average value (as defined by the AVG implementation in the
Method max Undocumented
Method min Undocumented

Inherited from BaseQuery:

Method cloneQuery Create a similar-but-not-identical copy of this query with certain
Method __repr__ Undocumented
Method explain A debugging API, exposing SQLite's 'EXPLAIN' statement.
Method _involvedTables Return a list of tables involved in this query,
Method _computeFromClause Generate the SQL string which follows the "FROM" string and before the
Method _sqlAndArgs Undocumented
Method _runQuery Undocumented
Method locateCallSite Undocumented
Method _selectStuff Return a generator which yields the massaged results of this query with
Method distinct Call this method if you want to avoid repeated results from a query.
Method __iter__ Iterate the results of this query.
Method next This method is deprecated, a holdover from when queries were iterators,
def __init__(self, store, tableClass, comparison=None, limit=None, offset=None, sort=None, attribute=None, raw=False):
Create a generic object-oriented interface to SQL, used to implement Store.query.
Parametersstorethe store that this query is within.
tableClassa subclass of Item.
comparisonan implementor of iaxiom.IComparison
limitan int that limits the number of results that will be queried for, or None to indicate that all results should be returned.
offsetan int that specifies the offset within the query results to begin iterating from, or None to indicate that we should start at 0.
sortA sort order object. Obtained by doing YourItemClass.yourAttribute.ascending or .descending.
def _massageData(self, row):
Convert a raw database row to the type described by an attribute. For example, convert a database integer into an extime.Time instance for an attributes.timestamp attribute.
Parametersrowa 1-tuple, containing the in-database value from my attribute.
Returnsa value of the type described by my attribute.
def count(self):
Returnsthe number of non-None values of this attribute specified by this query.
def sum(self):

Return the sum of all the values returned by this query. If no results are specified, return None.

Note: for non-numeric column types the result of this method will be nonsensical.
Returnsa number or None.
def average(self):

Return the average value (as defined by the AVG implementation in the database) of the values specified by this query.

Note: for non-numeric column types the result of this method will be nonsensical.
Returnsa float representing the 'average' value of this column.
def max(self, default=_noDefault):
Undocumented
def min(self, default=_noDefault):
Undocumented
def _functionOnTarget(self, which, default):
Undocumented
API Documentation for vodafone-mobile-connect-card-driver-for-linux, generated by pydoctor at 2008-01-10 13:06:31.