|
Public Member Functions |
| TStorage (int nt, wxString fn=_T("")) |
| Constructor.
|
| ~TStorage () |
| Destructor.
|
void | createDatabase () |
| Creates the database, is it does not exist.
|
TSQLresult | getObject (const wxString &query) |
| Runs a query.
|
void | sqlAdd (wxString &s1, wxString &s2, wxString key, wxString value) |
| Query construction helper method.
|
void | sqlAdd (wxString &s1, wxString &s2, wxString key, char *value) |
| Query construction helper method.
|
void | sqlAdd (wxString &s1, wxString &s2, wxString key, int value) |
| Query construction helper method.
|
void | import () |
| Import enzymes from database.
|
TRestrictionEnzyme * | getRestrictionEnzyme (wxString s) |
| Pointer to TRestrictionEnzyme from re.
|
void | getEnzymeGroups (wxArrayString &vs) |
| List of enzyme groups in this database.
|
void | getEnzymesInGroup (wxString gn, wxArrayString &vs) |
| List of enzymes in a specific group.
|
void | updateRestrictionEnzyme (TRestrictionEnzyme *e) |
| Write enzyme information back to database.
|
void | addRestrictionEnzyme (TRestrictionEnzyme *r) |
| Add new restriction enzyme.
|
bool | addEnzymeGroup (wxString s) |
| Add new enzyme group.
|
void | markEnzymeForDeletion (wxString s) |
| Mark an enzyme for deletion.
|
TProtease * | getProtease (wxString s) |
| Pointer to a TProtease from pr.
|
void | updateProtease (TProtease *p) |
| Write protease information back to database.
|
wxString | getDatabaseList (wxArrayString &name, wxArrayString &file) |
| List of all known databases.
|
void | setOption (wxString oname, int value) |
| Set option in local database.
|
void | setOption (wxString oname, wxString vname) |
| Set option in local database.
|
int | getOption (wxString oname, int def) |
| Get option from local database.
|
wxString | getOption (wxString oname, wxString def) |
| Get option from local database.
|
bool | copySQLfields (TStorage &target, wxString table, wxString cond) |
| Internal use for update.
|
void | synchronize () |
| Synchronize information between databases (not used).
|
void | startup () |
| Startup method.
|
void | autoUpdateSchema () |
| Update database to a new schema.
|
wxString | fixDNAname (wxString s) |
| Fix name quotes.
|
wxString | UCfirst (wxString s) |
| Uppercase first letter in string.
|
wxString | getDBname () |
| Return the database name.
|
bool | getWriteProtect () |
| Is this database write protected?
|
void | optimizeDatabase () |
| Optimize sqlite database.
|
wxString | getDefaultDB () |
| Returns the name of the default (standard) database.
|
void | addEnzymeToGroup (wxString enzyme, wxString group) |
| Add a restriction enzyme to an enzyme group.
|
void | removeEnzymeFromGroup (wxString enzyme, wxString group) |
| Remove an enzyme from an enzyme group.
|
void | removeEnzymeGroup (wxString group) |
| Remove an enzyme group.
|
void | syncEnzymes (TStorage *to=NULL) |
| Get new enzymes from (basic) database.
|
void | startRecord () |
| Start recording queries.
|
void | endRecord () |
| Stop recording, execute all recorded queries.
|
Static Public Member Functions |
static wxString | createMySQLdb (wxString ip, wxString db, wxString name, wxString pwd) |
| Create a MySQL database.
|
Public Attributes |
wxArrayTRestrictionEnzyme | re |
| List of restriction enzymes in this database.
|
wxArrayTProtease | pr |
| List of proteases in this database.
|
TSQLresult | results |
| The results of the last query.
|
Private Member Functions |
wxString | getSingleField (wxString query, wxString field, wxString def=_T("")) |
| Get a single field from a query, with default value.
|
int | getSingleField (wxString query, wxString field, int def=0) |
| Get a single field from a query, with default value.
|
wxString | makeInsert (wxString table, wxArrayString &field, wxArrayString &data) |
| Insert all the fields with their data into a table.
|
void | replaceTable (wxString table, wxArrayString &f, wxArrayString &t) |
| ???
|
void | tableInfoSet (wxArrayString &f, wxArrayString &t, wxString nf, wxString nt) |
| ???
|
TStorage * | getDBfromEnzymeGroup (wxString group) |
| Returns the database of the enzyme group.
|
wxString | stripGroupName (wxString s) |
| ???
|
void | cleanEnzymeGroupCache () |
| Clear the enzyme group cache.
|
void | setEnzymeCache (wxString group, wxArrayString &enzymes) |
| Set cache for an enzyme group.
|
void | getEnzymeCache (wxString group, wxArrayString &enzymes) |
| Get cached enzyme group data.
|
bool | isLocalDB () |
| Is this the local database?
|
bool | convertSqlite2to3 () |
| Converts a sqlite2 database into sqlite3.
|
void | createDatabaseSqlite3 () |
| Creates an sqlite3 database (NOT FUNCTIONAL).
|
TSQLresult | getObjectSqlite2 (const wxString &query) |
| Get object from sqlite2 database.
|
TSQLresult | getObjectSqlite3 (const wxString &query) |
| Get object from sqlite3 database.
|
TSQLresult | getObject_MySQL (const wxString &query) |
| Get object from MySQL database.
|
Private Attributes |
wxArrayString | enzymeGroupCache |
wxArrayString | enzymeGroupNameCache |
wxString | dbname |
wxString | error |
int | storagetype |
int | ierror |
bool | writeProtect |
| Database is write-protected, because this program version is too old.
|
int | rpv |
| Required Program Version.
|
wxString | record |
| Recorded queries.
|
bool | recording |
| Record queries?
|
bool | isMySQL |
| This is a MySQL database.
|
bool | isSqlite3 |
| This is a sqlite3 database.
|
MYSQL * | conn |
MYSQL * | mysql |