mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Use DataStream where possible
This commit is contained in:
parent
fa9becfe1c
commit
fa29e73cda
48 changed files with 144 additions and 151 deletions
|
|
@ -385,7 +385,7 @@ void SQLiteBatch::Close()
|
|||
}
|
||||
}
|
||||
|
||||
bool SQLiteBatch::ReadKey(CDataStream&& key, CDataStream& value)
|
||||
bool SQLiteBatch::ReadKey(DataStream&& key, DataStream& value)
|
||||
{
|
||||
if (!m_database.m_db) return false;
|
||||
assert(m_read_stmt);
|
||||
|
|
@ -412,7 +412,7 @@ bool SQLiteBatch::ReadKey(CDataStream&& key, CDataStream& value)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool SQLiteBatch::WriteKey(CDataStream&& key, CDataStream&& value, bool overwrite)
|
||||
bool SQLiteBatch::WriteKey(DataStream&& key, DataStream&& value, bool overwrite)
|
||||
{
|
||||
if (!m_database.m_db) return false;
|
||||
assert(m_insert_stmt && m_overwrite_stmt);
|
||||
|
|
@ -439,7 +439,7 @@ bool SQLiteBatch::WriteKey(CDataStream&& key, CDataStream&& value, bool overwrit
|
|||
return res == SQLITE_DONE;
|
||||
}
|
||||
|
||||
bool SQLiteBatch::EraseKey(CDataStream&& key)
|
||||
bool SQLiteBatch::EraseKey(DataStream&& key)
|
||||
{
|
||||
if (!m_database.m_db) return false;
|
||||
assert(m_delete_stmt);
|
||||
|
|
@ -457,7 +457,7 @@ bool SQLiteBatch::EraseKey(CDataStream&& key)
|
|||
return res == SQLITE_DONE;
|
||||
}
|
||||
|
||||
bool SQLiteBatch::HasKey(CDataStream&& key)
|
||||
bool SQLiteBatch::HasKey(DataStream&& key)
|
||||
{
|
||||
if (!m_database.m_db) return false;
|
||||
assert(m_read_stmt);
|
||||
|
|
@ -470,7 +470,7 @@ bool SQLiteBatch::HasKey(CDataStream&& key)
|
|||
return res == SQLITE_ROW;
|
||||
}
|
||||
|
||||
DatabaseCursor::Status SQLiteCursor::Next(CDataStream& key, CDataStream& value)
|
||||
DatabaseCursor::Status SQLiteCursor::Next(DataStream& key, DataStream& value)
|
||||
{
|
||||
int res = sqlite3_step(m_cursor_stmt);
|
||||
if (res == SQLITE_DONE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue