Client 4—An Interactive Query Processor
I'll finish this chapter by developing a general purpose, interactive query processor. In this example, I'll describe the SQLPrepare()/SQLExec() query execution method. Finally, I'll show you a way to process result sets more efficiently.
This example is based on the libpq++/qt-sql.cpp client from Chapter 10, “The New PostgreSQL C++ API—libpqxx.” Rather than showing you the entire application again, I'll just explain the differences—refer to Chapter 10 for a complete explanation of the original application.
In this application, you can enter arbitrary SQL commands; the result set for SELECT statements appears in a table and the results for other commands display in a status bar.
The first thing that you ...
Get PostgreSQL, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.