From d2caf82ad16f8d31db6afdd69383ba1c04e02c32 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 7 Aug 2015 17:39:23 +0200 Subject: o More explicit bind functions, it is useful because Cassandra is touchy with its types. o Saving the topic and message id in the raw record table. o Dropping the mosquittopp, it is not very useful. --- sm-http-server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sm-http-server.cpp') diff --git a/sm-http-server.cpp b/sm-http-server.cpp index 80dd68f..e567655 100644 --- a/sm-http-server.cpp +++ b/sm-http-server.cpp @@ -59,10 +59,10 @@ void handle_device_get(const request &req, const response &res, string device) { cout << "handle_device_get(" << device << ");" << endl; cassandra_statement stmt("SELECT device, timestamp, sensors FROM sm_by_day WHERE device=? AND day IN ?", 2); - stmt.bind(0, device); + stmt.bind_string(0, device); vector days = {"2015-07-10", "2015-07-11", "2015-07-12", "2015-07-13", "2015-07-14", "2015-07-15", "2015-07-16"}; - stmt.bind(1, std::move(days)); + stmt.bind_list(1, std::move(days)); current_cassandra_session->execute(std::move(stmt), [&](cassandra_future& future) { const cassandra_result result = future.result(); -- cgit v1.2.3