diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-12 14:19:05 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-12 14:19:05 +0300 |
commit | c5d7d8ab002cf73fd309a4eb65e4fc8d5dafa9db (patch) | |
tree | f056770de33275961cb70d42a933613a443b602a /plugins/Dbx_sqlite/src/dbevents.cpp | |
parent | 002aca2fb53de2d7593e305c99190c52c3d72391 (diff) |
event cursors for mdbx driver
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbevents.cpp')
-rwxr-xr-x | plugins/Dbx_sqlite/src/dbevents.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index bef40881e8..cec73e5a50 100755 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -718,18 +718,18 @@ BOOL CDbxSQLite::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact*) return TRUE; } -STDMETHODIMP_(DB::EventCursor*) CDbxSQLite::EventCursor(MCONTACT hContact, DBEVENTINFO& dbei) +STDMETHODIMP_(DB::EventCursor*) CDbxSQLite::EventCursor(MCONTACT hContact, DBEVENTINFO &dbei) { return new CDbxSQLiteEventCursor(hContact, dbei, m_db); } -STDMETHODIMP_(DB::EventCursor*) CDbxSQLite::EventCursorRev(MCONTACT hContact, DBEVENTINFO& dbei) +STDMETHODIMP_(DB::EventCursor*) CDbxSQLite::EventCursorRev(MCONTACT hContact, DBEVENTINFO &dbei) { return new CDbxSQLiteEventCursor(hContact, dbei, m_db, true); } CDbxSQLiteEventCursor::CDbxSQLiteEventCursor(MCONTACT _1, DBEVENTINFO& _2, sqlite3* _db, bool reverse) - : EventCursorBase(_1, _2), m_db(_db) + : EventCursor(_1, _2), m_db(_db) { if (reverse) sqlite3_prepare_v2(m_db, reverse_order_query, -1, &cursor, nullptr); @@ -743,6 +743,7 @@ CDbxSQLiteEventCursor::~CDbxSQLiteEventCursor() if (cursor) sqlite3_reset(cursor); } + MEVENT CDbxSQLiteEventCursor::FetchNext() { if (!cursor) @@ -758,4 +759,3 @@ MEVENT CDbxSQLiteEventCursor::FetchNext() } return sqlite3_column_int64(cursor, 0); } - |