From cfa36aa5466d4c342c7de0f6cea7b8386984fd36 Mon Sep 17 00:00:00 2001 From: randomdan Date: Wed, 9 Feb 2011 01:33:33 +0000 Subject: Fix the build system to do dependencies properly Break down libodbcpp into a set of base classes; libdbpp Add a native PostgreSQL implementation of libdbpp; libpqpp Extend project2 rdbms stuff to work with generic connectors Update datasources to specify connector type Build libmisc as .so --- libpqpp/selectcommand.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 libpqpp/selectcommand.h (limited to 'libpqpp/selectcommand.h') diff --git a/libpqpp/selectcommand.h b/libpqpp/selectcommand.h new file mode 100644 index 0000000..932717d --- /dev/null +++ b/libpqpp/selectcommand.h @@ -0,0 +1,36 @@ +#ifndef PQ_SELECTCOMMAND_H +#define PQ_SELECTCOMMAND_H + +#include "../libdbpp/selectcommand.h" +#include "command.h" +#include +#include + +namespace PQ { + class Connection; + class Column; + class SelectCommand : public DB::SelectCommand, public Command { + public: + SelectCommand(const Connection *, const std::string & sql, unsigned int no); + virtual ~SelectCommand(); + + bool fetch(); + void execute(); + const DB::Column& operator[](unsigned int) const; + const DB::Column& operator[](const Glib::ustring&) const; + unsigned int columnCount() const; + unsigned int getOrdinal(const Glib::ustring&) const; + private: + mutable bool executed; + std::vector fields; + std::map fieldsName; + int nTuples, tuple; + PGresult * execRes; + + friend class Column; + }; +} + +#endif + + -- cgit v1.2.3