diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-03-30 20:44:02 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-03-30 20:44:02 +0200 |
commit | 46fa473b481191288e2ca6d9279e099b303af012 (patch) | |
tree | 004d5bf132988482404e6e2f87b1d644b36093ff /sensor | |
parent | 34669098e138d595aadc39fbf8c0cdd004c0916d (diff) | |
download | ble-toys-46fa473b481191288e2ca6d9279e099b303af012.tar.gz ble-toys-46fa473b481191288e2ca6d9279e099b303af012.tar.bz2 ble-toys-46fa473b481191288e2ca6d9279e099b303af012.tar.xz ble-toys-46fa473b481191288e2ca6d9279e099b303af012.zip |
o Better sql generation.
Diffstat (limited to 'sensor')
-rw-r--r-- | sensor/main/io.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sensor/main/io.cpp b/sensor/main/io.cpp index 255b4f5..fa15c96 100644 --- a/sensor/main/io.cpp +++ b/sensor/main/io.cpp @@ -336,8 +336,8 @@ void SqlSampleOutputStream::write(SampleRecord const &sample) { fs += ", "; vs += ", "; } - fs += key->name; - vs += value.get(); + fs += "\"" + key->name + "\""; + vs += "'" + value.get() + "'"; } } } else { @@ -354,8 +354,8 @@ void SqlSampleOutputStream::write(SampleRecord const &sample) { // Make sure that the key is registered in the dictionary dict.indexOf(sample_key->name); - fs += sample_key->name; - vs += o.get(); + fs += "\"" + sample_key->name + "\""; + vs += "'" + o.get() + "'"; } } } |