App settings.
More...
|
| def | __init__ (self, name='', storedvalue='', type='string') |
| |
| def | value (self) |
| |
| def | value (self, value) |
| |
| def | parseAttributes (self) |
| |
| def | query (self, expr='', order='', keyindex=True) |
| |
| def | __init__ (self, dbpath='app.db', tname=None, primary='rowid', cols={}) |
| |
| def | parseAttributes (self, omit=[]) |
| |
| def | check (self) |
| |
| def | query (self, expr='', order='', keyindex=False) |
| |
| def | getSqlName (self) |
| |
| def | getPrimaryKey (self) |
| |
| def | getColList (self, addprimary=True) |
| |
| def | save (self) |
| |
| def | load (self, index) |
| |
|
def | reload (self) |
| |
| def | loadBy (self, wheres={}) |
| |
| def | delete (self) |
| |
|
|
| name |
| |
|
| type |
| |
|
| storedvalue |
| |
|
| cachedvalue |
| |
|
| db |
| |
§ __init__()
| def Setting.Setting.__init__ |
( |
|
self, |
|
|
|
name = '', |
|
|
|
storedvalue = '', |
|
|
|
type = 'string' |
|
) |
| |
Initializes the Setting object
the setting class provides a type of variable which can be fetched from the database with a default value. if the setting doesn't exist, it is created.
accessing settings in a loop does not cause multiple queries. setting values are cached.
@param name str
@param storedvalue
@param type str
§ get()
| def Setting.Setting.get |
( |
|
name, |
|
|
|
default = None |
|
) |
| |
|
static |
util - retrieves a setting from cache, database or saves the default
@param default
§ parseAttributes()
| def Setting.Setting.parseAttributes |
( |
|
self | ) |
|
overrides the parseAttributes function of the Table class to exclude 'value' and 'get'
§ query()
| def Setting.Setting.query |
( |
|
self, |
|
|
|
expr = '', |
|
|
|
order = '', |
|
|
|
keyindex = True |
|
) |
| |
overrides the query function and adds any results to the cache
§ set()
| def Setting.Setting.set |
( |
|
name, |
|
|
|
value |
|
) |
| |
|
static |
sets the value of a setting in the cache, database or create it
§ value() [1/2]
| def Setting.Setting.value |
( |
|
self | ) |
|
gets the values of the setting
@return bool|int|long|float|complex
§ value() [2/2]
| def Setting.Setting.value |
( |
|
self, |
|
|
|
value |
|
) |
| |
saves the value of a setting
@param value
The documentation for this class was generated from the following file: