mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 06:55:50 +00:00
Cleanup blob functions.
This commit is contained in:
@@ -291,11 +291,19 @@ int SqliteStatement::size(int column)
|
||||
return sqlite3_column_bytes(statement, column);
|
||||
}
|
||||
|
||||
const void* SqliteStatement::getBlob(int column)
|
||||
const void* SqliteStatement::peekBlob(int column)
|
||||
{
|
||||
return sqlite3_column_blob(statement, column);
|
||||
}
|
||||
|
||||
std::vector<unsigned char> SqliteStatement::getBlob(int column)
|
||||
{
|
||||
int size = sqlite3_column_bytes(statement, column);
|
||||
std::vector<unsigned char> ret(size);
|
||||
memcpy(&(ret.front()), sqlite3_column_blob(statement, column), size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string SqliteStatement::getString(int column)
|
||||
{
|
||||
return reinterpret_cast<const char *>(sqlite3_column_text(statement, column));
|
||||
|
||||
@@ -86,7 +86,9 @@ public:
|
||||
|
||||
int size(int column);
|
||||
|
||||
const void* getBlob(int column);
|
||||
const void* peekBlob(int column);
|
||||
std::vector<unsigned char> getBlob(int column);
|
||||
|
||||
std::string getString(int column);
|
||||
const char* peekString(int column);
|
||||
uint32 getUInt32(int column);
|
||||
|
||||
Reference in New Issue
Block a user