aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/sqlite.h
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2020-04-12 13:40:43 -0400
committerRyan Ofsky <ryan@ofsky.org>2023-04-12 05:30:43 -0400
commit5938ad0bdb013953861c7cd15a95f00998a06f44 (patch)
tree5c760ab363b8c3ee305f1762766af2007cd65b00 /src/wallet/sqlite.h
parentcae0608ad4b195652e0cfcc905e19b50197d43ab (diff)
downloadbitcoin-5938ad0bdb013953861c7cd15a95f00998a06f44.tar.xz
wallet: Add DatabaseBatch::ErasePrefix method
This new function is not used yet this commit, but next commit adds usages and test coverage for both BDB and sqlite.
Diffstat (limited to 'src/wallet/sqlite.h')
-rw-r--r--src/wallet/sqlite.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/sqlite.h b/src/wallet/sqlite.h
index 5745a1d4cf..d9de40569b 100644
--- a/src/wallet/sqlite.h
+++ b/src/wallet/sqlite.h
@@ -36,13 +36,16 @@ private:
sqlite3_stmt* m_insert_stmt{nullptr};
sqlite3_stmt* m_overwrite_stmt{nullptr};
sqlite3_stmt* m_delete_stmt{nullptr};
+ sqlite3_stmt* m_delete_prefix_stmt{nullptr};
void SetupSQLStatements();
+ bool ExecStatement(sqlite3_stmt* stmt, Span<const std::byte> blob);
bool ReadKey(DataStream&& key, DataStream& value) override;
bool WriteKey(DataStream&& key, DataStream&& value, bool overwrite = true) override;
bool EraseKey(DataStream&& key) override;
bool HasKey(DataStream&& key) override;
+ bool ErasePrefix(Span<const std::byte> prefix) override;
public:
explicit SQLiteBatch(SQLiteDatabase& database);