Dmitigr Pgfe  1.1beta
The modern C++ API to PostgreSQL
Public Member Functions | List of all members
Completion Class Referenceabstract

Defines an abstraction of a successful operation completion. More...

#include <dmitigr/pgfe/completion.hpp>

Inheritance diagram for Completion:
Response Server_message Message

Public Member Functions

virtual const std::string & operation_name () const =0
virtual const std::optional< std::string > & affected_row_count () const =0

Detailed Description

Defines an abstraction of a successful operation completion.

Member Function Documentation

◆ affected_row_count()

virtual const std::optional<std::string>& affected_row_count ( ) const
pure virtual
The string with the number of rows affected by completed SQL command if available.
SQL commands for which this information is available are: INSERT, DELETE, UPDATE, SELECT or CREATE TABLE AS, MOVE, FETCH, COPY.

◆ operation_name()

virtual const std::string& operation_name ( ) const
pure virtual
The operation name which may be:
  • an empty string that denotes the response to the empty query request;
  • a string "invalid response" that denotes response was not understood;
  • a single word in uppercase that identifies the completed SQL command;
  • a single word in lowercase that identifies the completed operation.
The operation name is not always matches to the SQL command. For instance, the operation name for END command is "COMMIT", the operation name for CREATE TABLE AS command is "SELECT" etc.

The documentation for this class was generated from the following file: