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 
25 namespace pqxx
26 {
28 
46 class PQXX_LIBEXPORT array_parser
47 {
48 public:
50  enum juncture
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 
78 private:
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
Ending the current row.
Definition: array.hxx:55
Parsing has completed.
Definition: array.hxx:61
Starting a new row.
Definition: array.hxx:53
Found a string value.
Definition: array.hxx:59
Found a NULL value.
Definition: array.hxx:57
juncture
What&#39;s the latest thing found in the array?
Definition: array.hxx:50
Low-level array parser.
Definition: array.hxx:46
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:25