summaryrefslogtreecommitdiff
path: root/lib/streamSupport.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-05-24 01:01:30 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-05-24 01:01:30 +0100
commit15c1e5566f7ad8448985ca6e52805ceb4ec389a8 (patch)
tree14908b221d01cca00975da84656adcea57898620 /lib/streamSupport.cpp
parentMinor tidy up of replStream (diff)
downloadmygrate-15c1e5566f7ad8448985ca6e52805ceb4ec389a8.tar.bz2
mygrate-15c1e5566f7ad8448985ca6e52805ceb4ec389a8.tar.xz
mygrate-15c1e5566f7ad8448985ca6e52805ceb4ec389a8.zip
Basic support for queries with bound parameters
Bit of a reshuffle to make the types not DB specific, add some basic tests over query execution, no selects yet and no validation anything is actually right.
Diffstat (limited to 'lib/streamSupport.cpp')
-rw-r--r--lib/streamSupport.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/streamSupport.cpp b/lib/streamSupport.cpp
index acf6f7e..32c1fce 100644
--- a/lib/streamSupport.cpp
+++ b/lib/streamSupport.cpp
@@ -1,7 +1,7 @@
#include "streamSupport.h"
#include "bitset.h"
#include "compileTimeFormatter.h"
-#include "mysql_types.h"
+#include "dbTypes.h"
#include <cstdint>
#include <string_view>
#include <type_traits>
@@ -35,21 +35,21 @@ namespace std {
}
std::ostream &
- operator<<(std::ostream & s, const MyGrate::MySQL::Date & d)
+ operator<<(std::ostream & s, const MyGrate::Date & d)
{
return AdHoc::scprintf<"%04d-%02d-%02d">(s, d.year, d.month, d.day);
}
std::ostream &
- operator<<(std::ostream & s, const MyGrate::MySQL::Time & t)
+ operator<<(std::ostream & s, const MyGrate::Time & t)
{
return AdHoc::scprintf<"%02d:%02d:%02d">(s, t.hour, t.minute, t.second);
}
std::ostream &
- operator<<(std::ostream & s, const MyGrate::MySQL::DateTime & dt)
+ operator<<(std::ostream & s, const MyGrate::DateTime & dt)
{
- return AdHoc::scprintf<"%? %?">(s, (const MyGrate::MySQL::Date)dt, (const MyGrate::MySQL::Time)dt);
+ return AdHoc::scprintf<"%? %?">(s, (const MyGrate::Date)dt, (const MyGrate::Time)dt);
}
std::ostream &