The pg_stmt class
This is the class to use for issuing non-parameterized SQL statements with no
other result than indication of success or failure.
Public functions
-
pg_stmt (const char* query, pg_cnx& db)
Constructor. Execute immediately the SQL text pointed to by
query through the db connexion. Upon failure, a
pg_except exception is thrown.
-
pg_stmt (const std::string query, pg_cnx& db)
Constructor. It is similar to the other constructor except for the type
of query, which is const std::string for convenience.
-
[virtual] ~pg_stmt()
Destructor.
Example of an anonymous pg_stmt object:
pg_stmt("CREATE TABLE foo (bar INT)", cnx);