diff options
| author | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
| commit | 573e49a7ead331219eb6f0d3ca9cf83e793a5c9c (patch) | |
| tree | e145e04fa3d041cf92ce46da4ac790b63231059c /modules/extra/sql.h | |
| parent | 63c639e108a00d7dbb0d7ac9891684fc83a3b207 (diff) | |
Reworked live SQL support yet again
Diffstat (limited to 'modules/extra/sql.h')
| -rw-r--r-- | modules/extra/sql.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/extra/sql.h b/modules/extra/sql.h index b23466dee..a986cf794 100644 --- a/modules/extra/sql.h +++ b/modules/extra/sql.h @@ -65,12 +65,15 @@ class SQLResult SQLQuery query; Anope::string error; public: + unsigned int id; Anope::string finished_query; - SQLResult(const SQLQuery &q, const Anope::string &fq, const Anope::string &err = "") : query(q), error(err), finished_query(fq) { } + SQLResult() : id(0) { } + SQLResult(unsigned int i, const SQLQuery &q, const Anope::string &fq, const Anope::string &err = "") : query(q), error(err), id(i), finished_query(fq) { } inline operator bool() const { return this->error.empty(); } + inline const unsigned int GetID() const { return this->id; } inline const SQLQuery &GetQuery() const { return this->query; } inline const Anope::string &GetError() const { return this->error; } @@ -124,7 +127,7 @@ class SQLProvider : public Service virtual SQLResult RunQuery(const SQLQuery &query) = 0; - virtual SQLQuery CreateTable(const Anope::string &table, const Serializable::serialized_data &data) = 0; + virtual std::vector<SQLQuery> CreateTable(const Anope::string &table, const Serialize::Data &data) = 0; virtual SQLQuery GetTables() = 0; }; |
