summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-08-27 20:45:18 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-08-27 20:45:18 +0100
commit148a508b1bf16824cfe469796547b20cd7e410fa (patch)
tree430c660cf71b6b1ba588d4594265b7198dfd0c52 /lib
parentFix parse of PostgreSQL of timestamp (diff)
downloadmygrate-148a508b1bf16824cfe469796547b20cd7e410fa.tar.bz2
mygrate-148a508b1bf16824cfe469796547b20cd7e410fa.tar.xz
mygrate-148a508b1bf16824cfe469796547b20cd7e410fa.zip
Add raw() view of RawDataReader
Diffstat (limited to 'lib')
-rw-r--r--lib/rawDataReader.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rawDataReader.h b/lib/rawDataReader.h
index 58724ff..b23de88 100644
--- a/lib/rawDataReader.h
+++ b/lib/rawDataReader.h
@@ -6,6 +6,7 @@
#include <cstddef>
#include <cstdint>
#include <cstring>
+#include <span>
#include <stdexcept>
namespace MyGrate {
@@ -62,6 +63,12 @@ namespace MyGrate {
return offset < len;
}
+ std::span<const std::byte>
+ raw() const
+ {
+ return {rawdata, len};
+ }
+
private:
void offsetSizeCheck(size_t) const;