Package coprs :: Module models :: Class CounterStat
[hide private]
[frames] | no frames]

Class CounterStat

source code


Generic store for simple statistics.

Nested Classes [hide private]

Inherited from flask_sqlalchemy.Model: query_class

Instance Methods [hide private]
 
__init__(self, **kwargs)
A simple constructor that allows initialization from kwargs.
source code

Inherited from unreachable.Model: query

Inherited from helpers.Serializer: to_dict

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  name = db.Column(db.String(127), primary_key= True)
  counter_type = db.Column(db.String(30))
  counter = db.Column(db.Integer, default= 0, server_default= "0")
  __mapper__ = <Mapper at 0x7fee489ddd50; CounterStat>
  __table__ = Table('counter_stat', MetaData(bind=None), Column(...
  __tablename__ = 'counter_stat'
  _sa_class_manager = <ClassManager of <class 'coprs.models.Coun...

Inherited from unreachable.Model: metadata

Inherited from unreachable.Model (private): _decl_class_registry

Properties [hide private]

Inherited from helpers.Serializer: serializable_attributes

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

source code 

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in ``kwargs``.

Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.

Overrides: object.__init__

Class Variable Details [hide private]

__table__

Value:
Table('counter_stat', MetaData(bind=None), Column('name', String(lengt\
h=127), table=<counter_stat>, primary_key=True, nullable=False), Colum\
n('counter_type', String(length=30), table=<counter_stat>), Column('co\
unter', Integer(), table=<counter_stat>, default=ColumnDefault(0), ser\
ver_default=DefaultClause('0', for_update=False)), schema=None)

_sa_class_manager

Value:
<ClassManager of <class 'coprs.models.CounterStat'> at 7fee489e94f0>