mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add a new helper function.
This commit is contained in:
@@ -266,6 +266,11 @@ int SqliteStatement::bindStatic(int position, const void *data, int length)
|
||||
return sqlite3_bind_blob(statement, position, data, length, SQLITE_STATIC);
|
||||
}
|
||||
|
||||
int SqliteStatement::bindStatic(int position, const std::vector<unsigned char>& value)
|
||||
{
|
||||
return sqlite3_bind_blob(statement, position, &value.front(), value.size(), SQLITE_STATIC);
|
||||
}
|
||||
|
||||
int SqliteStatement::bind(int position, uint32 value)
|
||||
{
|
||||
return sqlite3_bind_int64(statement, position, static_cast<sqlite3_int64>(value));
|
||||
@@ -278,7 +283,7 @@ int SqliteStatement::bind(int position, const std::string& value)
|
||||
|
||||
int SqliteStatement::bindStatic(int position, const std::string& value)
|
||||
{
|
||||
return sqlite3_bind_text(statement, position, value.data(), value.size(), SQLITE_TRANSIENT);
|
||||
return sqlite3_bind_text(statement, position, value.data(), value.size(), SQLITE_STATIC);
|
||||
}
|
||||
|
||||
int SqliteStatement::bind(int position)
|
||||
|
||||
@@ -75,13 +75,12 @@ public:
|
||||
|
||||
int bind(int position, const void *data, int length);
|
||||
int bindStatic(int position, const void *data, int length);
|
||||
|
||||
int bind(int position, uint32 value);
|
||||
int bindStatic(int position, const std::vector<unsigned char>& value);
|
||||
|
||||
int bind(int position, const std::string& value);
|
||||
|
||||
int bindStatic(int position, const std::string& value);
|
||||
|
||||
int bind(int position, uint32 value);
|
||||
int bind(int position);
|
||||
|
||||
int size(int column);
|
||||
|
||||
Reference in New Issue
Block a user