django_powerbank.db.models package

Submodules

django_powerbank.db.models.base module

class django_powerbank.db.models.base.BaseModel(*args, **kwargs)[source]

Bases: django.db.models.base.Model

class Meta[source]

Bases: object

abstract = False
get_field_name(field_name)[source]
get_field_names()[source]
populate(**kwargs)[source]

Populate an instance from keyword arguments.

Each keyword argument will be used to set a corresponding field. Keywords must refer to valid property name. This is similar to passing keyword arguments to the Model constructor.

to_dict(include=None, exclude=None)[source]

Return a dict containing the entity’s property values.

Parameters:
  • include – Optional set of property names to include, default all.
  • exclude – Optional set of property names to skip, default none. A name contained in both include and exclude is excluded.

django_powerbank.db.models.query module

class django_powerbank.db.models.query.ApproxQuerySet(model=None, query=None, using=None, hints=None)[source]

Bases: django.db.models.query.QuerySet

count()[source]

Perform a SELECT COUNT() and return the number of records as an integer.

If the QuerySet is already fully cached, return the length of the cached results set to avoid multiple SELECT COUNT(*) calls.

classmethod wrap_query(qry)[source]
class django_powerbank.db.models.query.TableStatusQuerySet(model=None, query=None, using=None, hints=None)[source]

Bases: django_powerbank.db.models.query.ApproxQuerySet

Module contents