summaryrefslogtreecommitdiff
path: root/libsqlitepp/sqlite-command.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-02-24 13:06:07 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-02-24 13:09:28 +0000
commitab47c39c82abee7f0e0cff981dc352fdc310a6fe (patch)
tree238979d93b5c4c810c130367fcaccdfacf420b9b /libsqlitepp/sqlite-command.cpp
parentDon't rely on libdbppcore's columns (diff)
downloadlibdbpp-sqlite-ab47c39c82abee7f0e0cff981dc352fdc310a6fe.tar.bz2
libdbpp-sqlite-ab47c39c82abee7f0e0cff981dc352fdc310a6fe.tar.xz
libdbpp-sqlite-ab47c39c82abee7f0e0cff981dc352fdc310a6fe.zip
Bring up-to-date with libdbpp.
Diffstat (limited to 'libsqlitepp/sqlite-command.cpp')
-rw-r--r--libsqlitepp/sqlite-command.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libsqlitepp/sqlite-command.cpp b/libsqlitepp/sqlite-command.cpp
index 3d8ac07..adaf41e 100644
--- a/libsqlitepp/sqlite-command.cpp
+++ b/libsqlitepp/sqlite-command.cpp
@@ -76,7 +76,12 @@ SQLite::Command::bindParamF(unsigned int n, float v)
void
SQLite::Command::bindParamS(unsigned int n, const Glib::ustring & s)
{
- if (sqlite3_bind_text(stmt, n + 1, s.c_str(), s.length(), SQLITE_STATIC) != SQLITE_OK) {
+ return bindParamS(n, std::string_view(s.raw()));
+}
+void
+SQLite::Command::bindParamS(unsigned int n, const std::string_view & s)
+{
+ if (sqlite3_bind_text(stmt, n + 1, s.data(), s.length(), SQLITE_STATIC) != SQLITE_OK) {
throw Error(c->db);
}
}