summaryrefslogtreecommitdiff
path: root/lib/mysql_types.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-05-22 16:42:06 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-05-22 16:42:06 +0100
commit2317b4608821b03da0cc288d06b9c0bdb6b60239 (patch)
tree7dd46e3c2c5601e603baa7defa057cd4d41fc4c9 /lib/mysql_types.cpp
parentMove everything into more sensible places (diff)
downloadmygrate-2317b4608821b03da0cc288d06b9c0bdb6b60239.tar.bz2
mygrate-2317b4608821b03da0cc288d06b9c0bdb6b60239.tar.xz
mygrate-2317b4608821b03da0cc288d06b9c0bdb6b60239.zip
Pass linter checks
Except IWYU, doesn't like the C++20 CTF.
Diffstat (limited to 'lib/mysql_types.cpp')
-rw-r--r--lib/mysql_types.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/mysql_types.cpp b/lib/mysql_types.cpp
index b61de08..a4641ba 100644
--- a/lib/mysql_types.cpp
+++ b/lib/mysql_types.cpp
@@ -1,8 +1,10 @@
#include "mysql_types.h"
#include "helpers.h"
#include "rawDataReader.h"
-#include <iostream>
+#include <algorithm>
+#include <array>
#include <stdexcept>
+#include <string>
namespace MyGrate::MySQL {
typename Type<MYSQL_TYPE_NULL, false>::C
@@ -96,13 +98,11 @@ namespace MyGrate::MySQL {
const auto realtype {md.readValue<enum_field_types, 1>()}; \
const auto lenlen {md.readValue<uint8_t>()}; \
switch (realtype) { \
- case MYSQL_TYPE_ENUM: { \
+ case MYSQL_TYPE_ENUM: \
+ case MYSQL_TYPE_VAR_STRING: \
return data.viewValue<std::string_view>(lenlen); \
- break; \
- } \
default: \
throw std::logic_error("Not implemented: sub-type: " + std::to_string(realtype)); \
- break; \
} \
throw std::logic_error("Didn't return a value: " + std::to_string(realtype)); \
}