From 0b762135ae0e28fcda69d58523364aa8bef9637a Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Thu, 19 May 2011 17:08:03 +0200 Subject: Add update_statement --- odb/pgsql/statement.hxx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'odb/pgsql/statement.hxx') diff --git a/odb/pgsql/statement.hxx b/odb/pgsql/statement.hxx index 88b1c14..17d4930 100644 --- a/odb/pgsql/statement.hxx +++ b/odb/pgsql/statement.hxx @@ -79,6 +79,35 @@ namespace odb Oid oid_; }; + class LIBODB_PGSQL_EXPORT update_statement: public statement + { + public: + virtual + ~update_statement (); + + // Asssumes that cond.values, cond.lengths, and cond.formats are + // suffixes of data.values, data.lengths, and data.formats + // respectively. + // + update_statement (connection& conn, + const std::string& name, + const std::string& stmt, + const Oid* types, + std::size_t n, + native_binding& cond, + native_binding& data); + void + execute (); + + private: + update_statement (const update_statement&); + update_statement& operator= (const update_statement&); + + private: + native_binding& cond_; + native_binding& data_; + }; + class LIBODB_PGSQL_EXPORT delete_statement: public statement { public: -- cgit v1.1