29 #ifndef GUM_NANODBC_PARSER_H 30 #define GUM_NANODBC_PARSER_H 53 template <
template<
typename>
class ALLOC = std::allocator>
67 NanodbcParser(
const ALLOC<std::string>& alloc = ALLOC<std::string>() );
75 const std::string& query,
76 const ALLOC<std::string>& alloc = ALLOC<std::string> () );
95 const std::vector<std::string,ALLOC<std::string>>&
current()
const;
98 std::size_t
nbLine()
const;
104 std::string
columnName (
const std::size_t i )
const;
108 const std::string& query );
113 #ifndef DOXYGEN_SHOULD_SKIP_THIS 118 nanodbc::result __result;
121 std::size_t __nb_line { std::size_t(0) };
124 std::vector<std::string,ALLOC<std::string>> __data;
136 #endif // GUM_NANODBC_PARSER_H
std::string columnName(const std::size_t i) const
returns the name of the ith column
Class for parsing SQL results using Nanodbc.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
ALLOC< std::string > allocator_type
type for the allocators passed in arguments of methods
std::size_t nbLine() const
returns the current line number within the query
virtual ~NanodbcParser()
destructor
void useNewQuery(nanodbc::connection &connexion, const std::string &query)
start a new query
bool next()
Gets the next line of the SQL stream and parses it.
Class for parsing SQL results using Nanodbc.
const std::vector< std::string, ALLOC< std::string > > & current() const
returns the current parsed line.
std::size_t nbColumns() const
returns the number of columns in the query result
NanodbcParser(const ALLOC< std::string > &alloc=ALLOC< std::string >())
Default constructor: create a parser without being connected.