libpqxx
array.hxx
1
11#ifndef PQXX_H_ARRAY
12#define PQXX_H_ARRAY
13
14#include "pqxx/compiler-public.hxx"
15#include "pqxx/compiler-internal-pre.hxx"
16
17#include "pqxx/internal/encoding_group.hxx"
18#include "pqxx/internal/encodings.hxx"
19
20#include <stdexcept>
21#include <string>
22#include <utility>
23
24
25namespace pqxx
26{
28
46class PQXX_LIBEXPORT array_parser
47{
48public:
51 {
62 };
63
64// XXX: Actually _pass_ encoding group!
66 explicit array_parser(
67 const char input[],
68 internal::encoding_group=internal::encoding_group::MONOBYTE);
69
71
76 std::pair<juncture, std::string> get_next();
77
78private:
79 const char *const m_input;
80 const std::string::size_type m_end;
81 internal::glyph_scanner_func *const m_scan;
82
84 std::string::size_type m_pos;
85
86 std::string::size_type scan_single_quoted_string() const;
87 std::string parse_single_quoted_string(std::string::size_type end) const;
88 std::string::size_type scan_double_quoted_string() const;
89 std::string parse_double_quoted_string(std::string::size_type end) const;
90 std::string::size_type scan_unquoted_string() const;
91 std::string parse_unquoted_string(std::string::size_type end) const;
92
93 std::string::size_type scan_glyph(std::string::size_type pos) const;
94 std::string::size_type scan_glyph(
95 std::string::size_type pos,
96 std::string::size_type end) const;
97};
98} // namespace pqxx
99
100#include "pqxx/compiler-internal-post.hxx"
101#endif
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:26
Low-level array parser.
Definition: array.hxx:47
juncture
What's the latest thing found in the array?
Definition: array.hxx:51
@ string_value
Found a string value.
Definition: array.hxx:59
@ row_end
Ending the current row.
Definition: array.hxx:55
@ done
Parsing has completed.
Definition: array.hxx:61
@ row_start
Starting a new row.
Definition: array.hxx:53
@ null_value
Found a NULL value.
Definition: array.hxx:57