PaferaPy Async 0.1
ASGI framework focused on simplicity and efficiency
Loading...
Searching...
No Matches
Static Public Attributes | List of all members
pafera.db.system_changelog Class Reference

Bootstrap class for the database. More...

Inheritance diagram for pafera.db.system_changelog:
pafera.modelbase.ModelBase

Static Public Attributes

int ACCESSED = 5;
 
int CREATED = 1;
 
int DELETED = 3;
 
int MODIFIED = 2;
 
int RESTORED = 4;
 
- Static Public Attributes inherited from pafera.modelbase.ModelBase
list SECURE_FIELDS
 

Additional Inherited Members

- Public Member Functions inherited from pafera.modelbase.ModelBase
def __cmp__ (self, o)
 Comparing means simply subracting the database ids. More...
 
def __eq__ (self, o)
 Two objects are equivalent if their models are the same and their IDs are the same. More...
 
def __hash__ (self)
 We take the easy route where the hash for an object is just its database ID. More...
 
def __init__ (self)
 Initialize all fields at creation like a good programmer should. More...
 
def __repr__ (self)
 Simply outputs the toJSON() function with the model name. More...
 
def __str__ (self)
 Simply calls the toJSON() function. More...
 
def CheckPassword (self, field, password)
 This special function checks to see if the password matches the hash stored in the field. More...
 
def GetACL (self, db)
 Since we store ACLs as a database lookup, be sure to use these getters and setters if you plan on using ACLs. More...
 
def HasSameValues (self, o)
 While operator = only checks class and ids, this checks every field to see if two objects or an object and a dict have the same values. More...
 
def OffsetTime (self, timeoffset)
 Change all datetime fields to the new time offset. More...
 
def Set (self, **kwargs)
 We use this method instead of direct attribute access in order to keep track of what values have been changed. More...
 
def SetAccess (self, access)
 Special security functions that are useful only if you have enabled security in _dbflags for the model. More...
 
def SetACL (self, db, acl)
 ACLs in Pafera are defined as a set of rules similar to cascading style sheets. More...
 
def SetGroup (self, groupid)
 Special security functions that are useful only if you have enabled security in _dbflags for the model. More...
 
def SetOwner (self, ownerid)
 Special security functions that are useful only if you have enabled security in _dbflags for the model. More...
 
def SetPassword (self, field, password)
 This special function hashes the password before saving the field. More...
 
def ToJSON (self, fields='')
 Converts this object into a format suitable for inclusion in JSON. More...
 
def UpdateFields (self, fieldnames)
 This is a convenience method to update fields without going through the Set() method. More...
 
- Public Attributes inherited from pafera.modelbase.ModelBase
 d
 
 dbaccess
 
 dbacl
 
 dbaclid
 
 dbgroup
 
 dbowner
 
 id
 

Detailed Description

Bootstrap class for the database.

This class keeps track of all changed values if you have enabled tracking in dbflags. Future plans involve using this class to enabled replication and rollbacks like the PHP version.

Definition at line 104 of file db.py.

Member Data Documentation

◆ ACCESSED

int pafera.db.system_changelog.ACCESSED = 5;
static

Definition at line 116 of file db.py.

◆ CREATED

int pafera.db.system_changelog.CREATED = 1;
static

Definition at line 112 of file db.py.

◆ DELETED

int pafera.db.system_changelog.DELETED = 3;
static

Definition at line 114 of file db.py.

◆ MODIFIED

int pafera.db.system_changelog.MODIFIED = 2;
static

Definition at line 113 of file db.py.

◆ RESTORED

int pafera.db.system_changelog.RESTORED = 4;
static

Definition at line 115 of file db.py.


The documentation for this class was generated from the following file: