summaryrefslogtreecommitdiff
path: root/src/account-server/dalstorage.hpp
diff options
context:
space:
mode:
authorAndreas Habel <mail@exceptionfault.de>2008-09-10 12:50:23 +0000
committerAndreas Habel <mail@exceptionfault.de>2008-09-10 12:50:23 +0000
commit0849156e914d76dfd0ad0129fdaef3c512219f53 (patch)
tree4c1f049b3a77d461be9a24daf2458814267762f2 /src/account-server/dalstorage.hpp
parent187dfc0418e44d4f20310b297d9d76e4d631ba9f (diff)
downloadmanaserv-0849156e914d76dfd0ad0129fdaef3c512219f53.tar.gz
manaserv-0849156e914d76dfd0ad0129fdaef3c512219f53.tar.bz2
manaserv-0849156e914d76dfd0ad0129fdaef3c512219f53.tar.xz
manaserv-0849156e914d76dfd0ad0129fdaef3c512219f53.zip
* Extended tmw_accounts table with columns for lastlogin and registration date. Modified account-server to fill the new columns on registration and login. Recreation of database needed!
* Added createIndex function to create indexes on tables.
Diffstat (limited to 'src/account-server/dalstorage.hpp')
-rw-r--r--src/account-server/dalstorage.hpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/account-server/dalstorage.hpp b/src/account-server/dalstorage.hpp
index af3546f2..7a8208ff 100644
--- a/src/account-server/dalstorage.hpp
+++ b/src/account-server/dalstorage.hpp
@@ -109,7 +109,6 @@ class DALStorage
void
addAccount(Account *account);
-
/**
* Delete an account.
*
@@ -118,6 +117,13 @@ class DALStorage
void delAccount(Account *account);
/**
+ * Update the date and time of the last login.
+ *
+ * @param account the account that recently logged in.
+ */
+ void updateLastLogin(const Account *account);
+
+ /**
* Sets a ban on an account (hence on all its characters).
*
* @param id character identifier.
@@ -246,6 +252,20 @@ class DALStorage
/**
+ * Create an index on the specified column.
+ *
+ * @param indxName the name of the index.
+ * @param tblName the name of the table.
+ * @param columnName the name of the columns
+ *
+ * @exception dal::DbSqlQueryExecFailure.
+ */
+ void
+ createIndex(const std::string& indxName,
+ const std::string& tblName,
+ const std::string& columnName );
+
+ /**
* Gets an account by using a SQL query string.
*
* @param query the query for the account