diff options
Diffstat (limited to 'src/dal/mysqldataprovider.h')
-rw-r--r-- | src/dal/mysqldataprovider.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/dal/mysqldataprovider.h b/src/dal/mysqldataprovider.h index 687ed38f..967e9ce2 100644 --- a/src/dal/mysqldataprovider.h +++ b/src/dal/mysqldataprovider.h @@ -101,9 +101,30 @@ class MySqlDataProvider: public DataProvider /** + * Create a connection to the database. + * + * @param dbName the database name. + * @param dbPath the database file path. + * @param userName the user name. + * @param password the user password. + * + * @exception DbConnectionFailure if unsuccessful connection. + * @exception std::exception if unexpected exception. + */ + void + connect(const std::string& dbName, + const std::string& dbPath, + const std::string& userName, + const std::string& password) + throw(DbConnectionFailure, + std::exception); + + + /** * Execute a SQL query. * * @param sql the SQL query. + * @param refresh if true, refresh the cache (optional) * * @return a recordset. * @@ -111,7 +132,8 @@ class MySqlDataProvider: public DataProvider * @exception std::exception if unexpected exception. */ const RecordSet& - execSql(const std::string& sql) + execSql(const std::string& sql, + const bool refresh = false) throw(DbSqlQueryExecFailure, std::exception); |