diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-02-24 13:06:07 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-02-24 13:09:28 +0000 |
commit | ab47c39c82abee7f0e0cff981dc352fdc310a6fe (patch) | |
tree | 238979d93b5c4c810c130367fcaccdfacf420b9b /libsqlitepp/sqlite-command.cpp | |
parent | Don't rely on libdbppcore's columns (diff) | |
download | libdbpp-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.cpp | 7 |
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); } } |