summaryrefslogtreecommitdiff
path: root/libpqpp/pq-bulkselectcommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libpqpp/pq-bulkselectcommand.cpp')
-rw-r--r--libpqpp/pq-bulkselectcommand.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/libpqpp/pq-bulkselectcommand.cpp b/libpqpp/pq-bulkselectcommand.cpp
index 466eaaf..d745e64 100644
--- a/libpqpp/pq-bulkselectcommand.cpp
+++ b/libpqpp/pq-bulkselectcommand.cpp
@@ -5,19 +5,12 @@
PQ::BulkSelectCommand::BulkSelectCommand(Connection * conn, const std::string & sql, unsigned int no, const DB::CommandOptions * opts) :
DB::Command(sql),
- DB::SelectCommand(sql),
+ PQ::SelectBase(sql),
PQ::PreparedStatement(conn, sql, no, opts),
executed(false)
{
}
-PQ::BulkSelectCommand::~BulkSelectCommand()
-{
- if (execRes) {
- PQclear(execRes);
- }
-}
-
void
PQ::BulkSelectCommand::execute()
{
@@ -27,10 +20,7 @@ PQ::BulkSelectCommand::execute()
PGRES_TUPLES_OK);
nTuples = PQntuples(execRes);
tuple = -1;
- unsigned int nFields = PQnfields(execRes);
- for (unsigned int f = 0; f < nFields; f += 1) {
- insertColumn(DB::ColumnPtr(new Column(this, f)));
- }
+ createColumns(execRes);
executed = true;
}
}