diff options
author | Huynh Tran <nthuynh75@gmail.com> | 2005-06-27 15:41:00 +0000 |
---|---|---|
committer | Huynh Tran <nthuynh75@gmail.com> | 2005-06-27 15:41:00 +0000 |
commit | a78e59b9f2fb4eb7971eb5f46637df80157d787a (patch) | |
tree | 24e94f377228d9cfaeb5d487031bcdc326bb7c68 /src/dalstorage.h | |
parent | bfcc4c6858238f343508b53f7fe90b9e9ac0ed01 (diff) | |
download | manaserv-a78e59b9f2fb4eb7971eb5f46637df80157d787a.tar.gz manaserv-a78e59b9f2fb4eb7971eb5f46637df80157d787a.tar.bz2 manaserv-a78e59b9f2fb4eb7971eb5f46637df80157d787a.tar.xz manaserv-a78e59b9f2fb4eb7971eb5f46637df80157d787a.zip |
Implemented addAccount() (+ unit tests).
Diffstat (limited to 'src/dalstorage.h')
-rw-r--r-- | src/dalstorage.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/src/dalstorage.h b/src/dalstorage.h index 78a689c7..80408f6c 100644 --- a/src/dalstorage.h +++ b/src/dalstorage.h @@ -81,7 +81,7 @@ class DALStorage: public Storage * @param account the new account. */ void - addAccount(Account* account); + addAccount(const Account* account); /** @@ -95,6 +95,8 @@ class DALStorage: public Storage /** * Save changes to the database permanently. + * + * @exception tmwserv::dal::DbSqlQueryExecFailure. */ void flush(void); @@ -140,6 +142,39 @@ class DALStorage: public Storage const std::string& sql); + /** + * Add an account to the database. + * + * @param account the account to add. + * + * @exeception tmwserv::dal::DbSqlQueryExecFailure. + */ + void + _addAccount(const Account* account); + + + /** + * Update an account from the database. + * + * @param account the account to update. + * + * @exception tmwserv::dal::DbSqlQueryExecFailure. + */ + void + _updAccount(const Account* account); + + + /** + * Delete an account and its associated data from the database. + * + * @param userName the owner of the account. + * + * @exeception tmwserv::dal::DbSqlQueryExecFailure. + */ + void + _delAccount(const std::string& userName); + + private: std::auto_ptr<dal::DataProvider> mDb; /**< the data provider */ }; |