class documentation

class ScalarResult(FilterResult):

View In Hierarchy

A wrapper for a _result.Result that returns scalar values rather than _row.Row values.

The _result.ScalarResult object is acquired by calling the _result.Result.scalars method.

A special limitation of _result.ScalarResult is that it has no fetchone() method; since the semantics of fetchone() are that the None value indicates no more results, this is not compatible with _result.ScalarResult since there is no way to distinguish between None as a row value versus None as an indicator. Use next(result) to receive values individually.

Method __init__ Undocumented
Method __iter__ Undocumented
Method __next__ Undocumented
Method all Return all scalar values in a list.
Method fetchall A synonym for the _engine.ScalarResult.all method.
Method fetchmany Fetch many objects.
Method first Fetch the first object or None if no object is present.
Method next Undocumented
Method one Return exactly one object or raise an exception.
Method one​_or​_none Return at most one object or raise an exception.
Method partitions Iterate through sub-lists of elements of the size given.
Method unique Apply unique filtering to the objects returned by this _engine.ScalarResult.
Class Variable ​_generate​_rows Undocumented
Instance Variable ​_metadata Undocumented
Instance Variable ​_post​_creational​_filter Undocumented
Instance Variable ​_real​_result Undocumented
Instance Variable ​_unique​_filter​_state Undocumented

Inherited from FilterResult:

Method ​_fetchall​_impl Undocumented
Method ​_fetchiter​_impl Undocumented
Method ​_fetchmany​_impl Undocumented
Method ​_fetchone​_impl Undocumented
Method ​_soft​_close Undocumented
Property ​_attributes Undocumented

Inherited from ResultInternal (via FilterResult):

Method ​_allrows Undocumented
Method ​_column​_slices Undocumented
Method ​_iter​_impl Undocumented
Method ​_iterator​_getter Undocumented
Method ​_manyrow​_getter Undocumented
Method ​_next​_impl Undocumented
Method ​_onerow​_getter Undocumented
Method ​_only​_one​_row Undocumented
Method ​_raw​_all​_rows Undocumented
Method ​_row​_getter Undocumented
Method ​_unique​_strategy Undocumented

Inherited from InPlaceGenerative (via FilterResult, ResultInternal):

Method ​_generate Undocumented
def __init__(self, real_result, index):

Undocumented

def __iter__(self):

Undocumented

def __next__(self):

Undocumented

def all(self):

Return all scalar values in a list.

Equivalent to _result.Result.all except that scalar values, rather than _result.Row objects, are returned.

def fetchall(self):
A synonym for the _engine.ScalarResult.all method.
def fetchmany(self, size=None):

Fetch many objects.

Equivalent to _result.Result.fetchmany except that scalar values, rather than _result.Row objects, are returned.

def first(self):

Fetch the first object or None if no object is present.

Equivalent to _result.Result.first except that scalar values, rather than _result.Row objects, are returned.

def next(self):

Undocumented

def one(self):

Return exactly one object or raise an exception.

Equivalent to _result.Result.one except that scalar values, rather than _result.Row objects, are returned.

def one_or_none(self):

Return at most one object or raise an exception.

Equivalent to _result.Result.one_or_none except that scalar values, rather than _result.Row objects, are returned.

def partitions(self, size=None):

Iterate through sub-lists of elements of the size given.

Equivalent to _result.Result.partitions except that scalar values, rather than _result.Row objects, are returned.

def unique(self, strategy=None):

Apply unique filtering to the objects returned by this _engine.ScalarResult.

See _engine.Result.unique for usage details.

_generate_rows: bool =
_metadata =

Undocumented

_post_creational_filter =
_real_result =
_unique_filter_state =