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.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libpqpp/pq-bulkselectcommand.cpp b/libpqpp/pq-bulkselectcommand.cpp
index 27674f5..8b669f4 100644
--- a/libpqpp/pq-bulkselectcommand.cpp
+++ b/libpqpp/pq-bulkselectcommand.cpp
@@ -6,10 +6,9 @@
PQ::BulkSelectCommand::BulkSelectCommand(Connection * conn, const std::string & sql, unsigned int no) :
DB::Command(sql),
DB::SelectCommand(sql),
- PQ::Command(conn, sql, no),
+ PQ::PreparedStatement(conn, sql, no),
executed(false)
{
- prepareSql(preparedSql, sql);
}
PQ::BulkSelectCommand::~BulkSelectCommand()
@@ -24,7 +23,7 @@ PQ::BulkSelectCommand::execute()
{
if (!executed) {
execRes = c->checkResult(
- PQexecParams(c->conn, preparedSql.c_str(), values.size(), NULL, &values.front(), &lengths.front(), NULL, 0),
+ PQexecPrepared(c->conn, prepare(), values.size(), &values.front(), &lengths.front(), NULL, 0),
PGRES_TUPLES_OK);
nTuples = PQntuples(execRes);
tuple = -1;