modules::clDB::DB_Settings Class Reference
Settings Database Class This settings-class is going to become a more powerfull settings interface than the current ConfigParser is.
More...
List of all members.
|
Public Member Functions |
| def | __init__ |
| | The Constructor.
|
| def | set_value |
| | Set a option's value.
|
|
def | increase_value |
| def | get_value |
| | Reads a value from an option.
|
|
def | create_table |
| def | create_database |
| | Create Database if not existant.
|
| def | open |
| | Open Database connection.
|
| def | close |
| | Close Database connection.
|
|
def | quit |
| def | query |
| | Queries the SQLite database.
|
Public Attributes |
|
| pyjama |
| | Reference to pyjama.
|
|
| db |
| | Database file.
|
|
| connection |
| | Holds the databse connection.
|
|
| query_counter |
Detailed Description
Settings Database Class This settings-class is going to become a more powerfull settings interface than the current ConfigParser is.
Of course you can still use the ConfigParser but have in mind, that this class also allows you to have own tables and real db queries.
- Todo:
-
Definition at line 49 of file clDB.py.
Member Function Documentation
| def modules::clDB::DB_Settings::__init__ |
( |
|
self, |
|
|
|
pyjama | |
|
) |
| | |
The Constructor.
- Parameters:
-
| self | The Object pointer |
| pyjama | Reference to pyjama |
Definition at line 53 of file clDB.py.
| def modules::clDB::DB_Settings::close |
( |
|
self |
) |
|
Close Database connection.
- Parameters:
-
Definition at line 183 of file clDB.py.
| def modules::clDB::DB_Settings::create_database |
( |
|
self |
) |
|
Create Database if not existant.
- Parameters:
-
Definition at line 152 of file clDB.py.
| def modules::clDB::DB_Settings::get_value |
( |
|
self, |
|
|
|
section, |
|
|
|
option, |
|
|
|
default = None, |
|
|
|
table = "settings" | |
|
) |
| | |
Reads a value from an option.
- Parameters:
-
| self | The Object pointer |
| section | The table to read from |
| option | An option as string |
| default | A default value |
- Returns:
- The option's value or default if section or option do not exist
Definition at line 109 of file clDB.py.
| def modules::clDB::DB_Settings::open |
( |
|
self |
) |
|
Open Database connection.
- Parameters:
-
Definition at line 178 of file clDB.py.
| def modules::clDB::DB_Settings::query |
( |
|
self, |
|
|
|
query | |
|
) |
| | |
Queries the SQLite database.
- Parameters:
-
| self | The Object pointer |
| query | A SQL Query |
Definition at line 192 of file clDB.py.
| def modules::clDB::DB_Settings::set_value |
( |
|
self, |
|
|
|
section, |
|
|
|
option, |
|
|
|
value, |
|
|
|
table = "settings" | |
|
) |
| | |
Set a option's value.
- Parameters:
-
| self | The Object pointer |
| section | The table to write to |
| option | The option as string |
| value | The value to set as string |
- Returns:
- bool
Definition at line 75 of file clDB.py.
The documentation for this class was generated from the following file: