summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-07-24 14:07:02 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-07-24 14:07:02 +0100
commit206d33d0962128b10d1630b4e1f5511d952172b3 (patch)
treecb3e74c4664694c1047c1788c244a2bc27cf05b1 /test
parentAdd missing keys initializer (diff)
downloadmygrate-206d33d0962128b10d1630b4e1f5511d952172b3.tar.bz2
mygrate-206d33d0962128b10d1630b4e1f5511d952172b3.tar.xz
mygrate-206d33d0962128b10d1630b4e1f5511d952172b3.zip
Fix up insert/delete SQL generation
Diffstat (limited to 'test')
-rw-r--r--test/test-e2e.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test-e2e.cpp b/test/test-e2e.cpp
index 60dca86..e541ec9 100644
--- a/test/test-e2e.cpp
+++ b/test/test-e2e.cpp
@@ -38,7 +38,13 @@ BOOST_AUTO_TEST_CASE(e2e)
std::thread repl {&MyGrate::EventSourceBase::readEvents, src.get(), std::ref(out)};
auto upd = mym.prepare("UPDATE session SET session_id = ? WHERE id = ?", 2);
- upd->execute(std::array<MyGrate::DbValue, 2> {"food", 1});
+ upd->execute({"food", 1});
+ auto del = mym.prepare("DELETE FROM session WHERE id = ?", 2);
+ del->execute({1});
+ auto ins = mym.prepare("INSERT INTO session(session_id, username, user_lvl, ip_addr, port, created, modified) \
+ VALUES(?, ?, ?, ?, ?, now(), now())",
+ 5);
+ ins->execute({"hashyhash", "testuser", "groupadm", "10.10.0.1", 2433});
sleep(1);