Part of elisa.core.db_backend View In Hierarchy
In addition to DB API 2.0 support this class implements an SQL query filter, based on a set of rules (which remain to be defined...)
Components can alter the database by adding new tables in the schema. These new tables can only be accessed via raw SQL queries.
Unknown Field: todo | We need to define a set of rules that specify which component can alter/insert data in core_tables. |
Line # | Kind | Name | Docs |
---|---|---|---|
79 | Method | __init__ | Connect to a db backend hosting the given database. |
135 | Method | disconnect | Commit changes to the database and disconnect. |
142 | Method | connect | Connect to the database, set _db instance variable. |
151 | Method | reconnect | Disconnect and reconnect to the database. |
158 | Method | save_changes | Commit changes to the database |
173 | Method | insert | Execute an INSERT SQL query in the db backend |
206 | Method | sql_execute | Execute a SQL query in the db backend |
277 | Method | table_columns | Introspect given table and retrieve its column names in a cache |
104 | Method | _init_backend | Undocumented |
221 | Method | _query | Undocumented |
255 | Method | _fix_params | Undocumented |
Parameters | username | the user name to use to connect to the database (type: string or None if no username required by backend ) |
password | the password to use to connect to the database (type: string or None if no password required by backend ) | |
hostname | the host name to connect to if the backend runs on a specific machine (type: string or None if no hostname required by backend ) | |
Raises | DBBackendError | When no db backend has been specified or if it cannot be used. |
Parameters | sql_query | the SQL query data to execute (type: string ) |
Returns | (type: int ) |