]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules/sql.h
Fix a minor typo in ssl.h
[user/henk/code/inspircd.git] / include / modules / sql.h
index 01adbb42e587e1d540f4c6309c28a002d46aa6ab..15e8260b6ec57e3e75326e3c19fc23f669a9572d 100644 (file)
@@ -42,7 +42,7 @@ namespace SQL
        enum ErrorCode
        {
                /** No error has occurred. */
-               NO_ERROR,
+               SUCCESS,
 
                /** The database identifier is invalid. */
                BAD_DBID,
@@ -122,6 +122,15 @@ class SQL::Result : public classbase
         * @param result A reference to the vector to store column names in.
         */
        virtual void GetCols(std::vector<std::string>& result) = 0;
+
+       /**
+        * Check if there's a column with the specified name in the result
+        *
+        * @param the column name
+        * @param on success, this is the column index
+        * @returns true, or false if the column is not found
+        */
+       virtual bool HasColumn(const std::string& column, size_t& index) = 0;
 };
 
 /** SQL::Error holds the error state of a request.
@@ -251,7 +260,7 @@ inline void SQL::PopulateUserInfo(User* user, ParamMap& userinfo)
        userinfo["nick"] = user->nick;
        userinfo["host"] = user->GetRealHost();
        userinfo["ip"] = user->GetIPString();
-       userinfo["gecos"] = user->fullname;
+       userinfo["real"] = user->GetRealName();
        userinfo["ident"] = user->ident;
        userinfo["server"] = user->server->GetName();
        userinfo["uuid"] = user->uuid;