Dmitigr Pgfe  1.1beta
The modern C++ API to PostgreSQL
Classes | Enumerations | Functions
Main (client/server communication)

Classes

class  Completion
 Defines an abstraction of a successful operation completion. More...
 
class  Composite
 Represents an abstraction of a composite type. More...
 
class  Compositional
 Defines an interface of compositional types. More...
 
class  Connection
 Represents a connection to the PostgreSQL server. More...
 
class  Connection_options
 Defines an interface to work with Connection options. More...
 
class  Data
 Represents an abstraction of a data. More...
 
class  Error
 Represents an abstraction of synchronous messages (responses) from the PostgreSQL server with the information about the error occurred. More...
 
class  Message
 Represents an abstraction of client/server messages to/from the PostgreSQL server. More...
 
class  Notice
 Represents unprompted notices from the server. More...
 
class  Notification
 Represents unprompted notifications from the server. More...
 
class  Parameterizable
 Represents an interface of parameterizable types. More...
 
class  Prepared_statement
 Represents a client-side pointer to a remote prepared statement. More...
 
class  Problem
 Represents the problem which occurred on the PostgreSQL server. More...
 
class  Response
 Represents an abstraction of synchronous (requested) messages from PostgreSQL server. More...
 
class  Row
 Represents an abstraction of a row produced by a server. More...
 
class  Row_info
 Represents an abstraction of an information about the rows produced (or that will be produced) by a server. More...
 
class  Server_message
 Represents an abstraction of PostgreSQL server messages (either synchronous or asynchronous). More...
 
class  Signal
 Represents an abstraction of asynchronous (unprompted) messages from PostgreSQL server. More...
 

Enumerations

enum  Socket_readiness { unready = 0, read_ready = 2, write_ready = 4, exceptions = 8 }
 Represents a socket readiness. More...
 
enum  Communication_mode { uds = 0, tcp = 100 }
 Represents a client/server communication mode. More...
 
enum  Communication_status {
  disconnected = 0, failure = 100, establishment_writing = 200, establishment_reading = 300,
  connected = 400
}
 Represents a communication status. More...
 
enum  Transaction_block_status { unstarted = 0, uncommitted = 100, failed = 200 }
 Represents the transaction block status. More...
 
enum  Data_format { text = 0, binary = 1 }
 Represents a possible data format. More...
 
enum  Problem_severity {
  log = 0, info = 100, debug = 200, notice = 300,
  warning = 400, error = 500, fatal = 600, panic = 700
}
 Represents a problem info severity. More...
 

Functions

Socket_readiness operator & (Socket_readiness lhs, Socket_readiness rhs) noexcept
 
Socket_readiness operator| (Socket_readiness lhs, Socket_readiness rhs) noexcept
 Bitwise OR for Socket_readiness. More...
 
Socket_readiness operator^ (Socket_readiness lhs, Socket_readiness rhs) noexcept
 Bitwise XOR for Socket_readiness. More...
 
Socket_readiness operator~ (Socket_readiness lhs) noexcept
 Bitwise NOT for Socket_readiness. More...
 
Socket_readinessoperator &= (Socket_readiness &lhs, Socket_readiness rhs) noexcept
 Bitwise AND for Socket_readiness with assignment to lvalue. More...
 
Socket_readinessoperator|= (Socket_readiness &lhs, Socket_readiness rhs) noexcept
 Bitwise OR for Socket_readiness with assignment to lvalue. More...
 
Socket_readinessoperator^= (Socket_readiness &lhs, Socket_readiness rhs) noexcept
 Bitwise XOR for Socket_readiness with assignment to lvalue. More...
 
DMITIGR_PGFE_API void APIENTRY set_openssl_library_initialization_enabled (bool value)
 Sets the obligation of initialization the OpenSSL library when needed. More...
 
DMITIGR_PGFE_API bool APIENTRY is_openssl_library_initialization_enabled ()
 
DMITIGR_PGFE_API void APIENTRY set_crypto_library_initialization_enabled (bool value)
 Sets the obligation of initialization the Crypto library when needed. More...
 
DMITIGR_PGFE_API bool APIENTRY is_crypto_library_initialization_enabled ()
 
DMITIGR_PGFE_API std::unique_ptr< Data > APIENTRY to_binary_data (const std::string &text_data)
 Similar to to_binary_data(const Data*). More...
 
DMITIGR_PGFE_API std::unique_ptr< Data > APIENTRY to_binary_data (const Data *text_data)
 

Detailed Description

Enumeration Type Documentation

◆ Communication_mode

enum Communication_mode
strong

Represents a client/server communication mode.

Enumerator
uds 

Denotes that Unix-domain sockets (UDS) is used for communication.

tcp 

Denotes that TCP sockets is used for communication.

◆ Communication_status

enum Communication_status
strong

Represents a communication status.

Enumerator
disconnected 

Denotes a normally disconnected state.

failure 

Denotes a disconnected state due to some kind of failure.

establishment_writing 

Denotes connection establishment in progress state. (Need to poll the socket until it becomes write-ready before continuing connection establishment process.)

establishment_reading 

Denotes connection establishment in progress state. (Need to poll the socket until it becomes read-ready before continuing the connection establishment process.)

connected 

Denotes the connected state.

◆ Data_format

enum Data_format
strong

Represents a possible data format.

Enumerator
text 

Denotes the text format.

binary 

Denotes the binary format.

◆ Problem_severity

enum Problem_severity
strong

Represents a problem info severity.

Enumerator
log 

Denotes "log" problem severity (may be only in dmitigr::pgfe::Notice).

info 

Denotes "info" problem severity (may be only in dmitigr::pgfe::Notice).

debug 

Denotes "debug" problem severity (may be only in dmitigr::pgfe::Notice).

notice 

Denotes "notice" problem severity (may be only in dmitigr::pgfe::Notice).

warning 

Denotes "warning" problem severity (may be only in dmitigr::pgfe::Notice).

error 

Denotes "error" problem severity (may be only in dmitigr::pgfe::Error).

fatal 

Denotes "fatal" problem severity (may be only in dmitigr::pgfe::Error).

panic 

Denotes "panic" problem severity (may be only in dmitigr::pgfe::Error).

◆ Socket_readiness

enum Socket_readiness
strong

Represents a socket readiness.

Enumerator
unready 

Any I/O operation on a socket would block.

read_ready 

Read operation on a socket would not block.

write_ready 

Write operation on a socket would not block.

exceptions 

Exceptions available.

◆ Transaction_block_status

Represents the transaction block status.

Enumerator
unstarted 

Denotes that the next SQL command would be executed in implicitly started transaction block and then implicitly committed.

uncommitted 

Denotes that the next SQL command would be executed in explicitly started and not yet committed transaction block.

failed 

Denotes that the next SQL command would be rejected with an error unless that command is a kind of ROLLBACK.

Function Documentation

◆ is_crypto_library_initialization_enabled()

DMITIGR_PGFE_API bool APIENTRY dmitigr::pgfe::is_crypto_library_initialization_enabled ( )
Returns
The value of the obligation of initialization the Crypto library when needed.

◆ is_openssl_library_initialization_enabled()

DMITIGR_PGFE_API bool APIENTRY dmitigr::pgfe::is_openssl_library_initialization_enabled ( )
Returns
The value of the obligation of initialization the OpenSSL library when needed.

◆ operator &()

Socket_readiness dmitigr::pgfe::operator& ( Socket_readiness  lhs,
Socket_readiness  rhs 
)
noexcept

Bitwise AND for Socket_readiness.

◆ operator &=()

Socket_readiness& dmitigr::pgfe::operator&= ( Socket_readiness lhs,
Socket_readiness  rhs 
)
noexcept

Bitwise AND for Socket_readiness with assignment to lvalue.

◆ operator^()

Socket_readiness dmitigr::pgfe::operator^ ( Socket_readiness  lhs,
Socket_readiness  rhs 
)
noexcept

Bitwise XOR for Socket_readiness.

◆ operator^=()

Socket_readiness& dmitigr::pgfe::operator^= ( Socket_readiness lhs,
Socket_readiness  rhs 
)
noexcept

Bitwise XOR for Socket_readiness with assignment to lvalue.

◆ operator|()

Socket_readiness dmitigr::pgfe::operator| ( Socket_readiness  lhs,
Socket_readiness  rhs 
)
noexcept

Bitwise OR for Socket_readiness.

◆ operator|=()

Socket_readiness& dmitigr::pgfe::operator|= ( Socket_readiness lhs,
Socket_readiness  rhs 
)
noexcept

Bitwise OR for Socket_readiness with assignment to lvalue.

◆ operator~()

Socket_readiness dmitigr::pgfe::operator~ ( Socket_readiness  lhs)
noexcept

Bitwise NOT for Socket_readiness.

◆ set_crypto_library_initialization_enabled()

DMITIGR_PGFE_API void APIENTRY dmitigr::pgfe::set_crypto_library_initialization_enabled ( bool  value)

Sets the obligation of initialization the Crypto library when needed.

Remarks
This function must be called with the value of false if the Crypto library is initialized yet before first connection to the PostgreSQL server.

◆ set_openssl_library_initialization_enabled()

DMITIGR_PGFE_API void APIENTRY dmitigr::pgfe::set_openssl_library_initialization_enabled ( bool  value)

Sets the obligation of initialization the OpenSSL library when needed.

Remarks
This function must be called with the value of false if the OpenSSL library is initialized yet before first connection to the PostgreSQL server.

◆ to_binary_data() [1/2]

DMITIGR_PGFE_API std::unique_ptr< Data > APIENTRY to_binary_data ( const Data text_data)
related
Returns
The result of conversion of text representation of PostgreSQL's Bytea data type to the plain binary data.
Requires
(text_data && text_data->format() == Data_format::text)

◆ to_binary_data() [2/2]

DMITIGR_PGFE_API std::unique_ptr<Data> APIENTRY dmitigr::pgfe::to_binary_data ( const std::string &  text_data)

Similar to to_binary_data(const Data*).