Kea 2.5.8
|
Base class for marshalling leases to and from PostgreSQL. More...
Public Member Functions | |
PgSqlLeaseExchange () | |
virtual | ~PgSqlLeaseExchange () |
Public Member Functions inherited from isc::db::PgSqlExchange | |
PgSqlExchange (const size_t num_columns=0) | |
Constructor. | |
virtual | ~PgSqlExchange () |
Destructor. | |
Protected Attributes | |
std::vector< uint8_t > | addr_bin_ |
std::string | addr_str_ |
Common Instance members used for binding and conversion. | |
time_t | cltt_ |
time_t | expire_ |
std::string | expire_str_ |
bool | fqdn_fwd_ |
bool | fqdn_rev_ |
std::string | hostname_ |
std::vector< uint8_t > | hwaddr_ |
uint8_t | hwaddr_buffer_ [HWAddr::MAX_HWADDR_LEN] |
size_t | hwaddr_length_ |
uint32_t | pool_id_ |
std::string | pool_id_str_ |
std::string | state_str_ |
uint32_t | subnet_id_ |
std::string | subnet_id_str_ |
std::string | user_context_ |
uint32_t | valid_lifetime_ |
std::string | valid_lifetime_str_ |
Protected Attributes inherited from isc::db::PgSqlExchange | |
std::vector< std::string > | columns_ |
Stores text labels for columns, currently only used for logging and errors. | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::db::PgSqlExchange | |
static void | convertFromBytea (const PgSqlResult &r, const int row, const size_t col, std::vector< uint8_t > &value) |
Converts a column in a row in a result set to a binary bytes. | |
static void | convertFromBytea (const PgSqlResult &r, const int row, const size_t col, uint8_t *buffer, const size_t buffer_size, size_t &bytes_converted) |
Converts a column in a row in a result set to a binary bytes. | |
static time_t | convertFromDatabaseTime (const std::string &db_time_val) |
Converts time stamp from the database to a time_t. | |
static void | convertFromDatabaseTime (const std::string &db_time_val, boost::posix_time::ptime &conv_time) |
Converts time stamp from the database to a boost::posix::ptime. | |
static std::string | convertLocalToDatabaseTime (const time_t input_time) |
Converts local time_t value to a text representation in local time. | |
static std::string | convertToDatabaseTime (const time_t cltt, const uint32_t valid_lifetime) |
Converts lease expiration time to a text representation in local time. | |
static std::string | convertToDatabaseTime (const time_t input_time) |
Converts UTC time_t value to a text representation in local time. | |
static std::string | dumpRow (const PgSqlResult &r, int row) |
Diagnostic tool which dumps the Result row contents as a string. | |
static std::string | getColumnLabel (const PgSqlResult &r, const size_t col) |
Fetches the name of the column in a result set. | |
static void | getColumnValue (const PgSqlResult &r, const int row, const size_t col, bool &value) |
Fetches boolean text ('t' or 'f') as a bool. | |
static void | getColumnValue (const PgSqlResult &r, const int row, const size_t col, boost::posix_time::ptime &value) |
Fetches a timestamp column as a ptime. | |
static void | getColumnValue (const PgSqlResult &r, const int row, const size_t col, data::ElementPtr &value) |
Fetches a JSON column as an ElementPtr. | |
static void | getColumnValue (const PgSqlResult &r, const int row, const size_t col, std::string &value) |
Fetches text column value as a string. | |
template<typename T > | |
static void | getColumnValue (const PgSqlResult &r, const int row, const size_t col, T &value) |
Fetches a text column as the given value type. | |
static void | getColumnValue (const PgSqlResult &r, const int row, const size_t col, uint8_t &value) |
Fetches an integer text column as a uint8_t. | |
static isc::asiolink::IOAddress | getInetValue4 (const PgSqlResult &r, const int row, const size_t col) |
Converts a column in a row in a result set into IPv4 address. | |
static isc::asiolink::IOAddress | getInetValue6 (const PgSqlResult &r, const int row, const size_t col) |
Converts a column in a row in a result set into IPv6 address. | |
static isc::asiolink::IOAddress | getIPv6Value (const PgSqlResult &r, const int row, const size_t col) |
Converts a column in a row in a result set into IPv6 address. | |
static const char * | getRawColumnValue (const PgSqlResult &r, const int row, const size_t col) |
Gets a pointer to the raw column value in a result set row. | |
static isc::util::Triplet< uint32_t > | getTripletValue (const PgSqlResult &r, const int row, const size_t col) |
Fetches a uint32_t value into a Triplet using a single column value. | |
static isc::util::Triplet< uint32_t > | getTripletValue (const PgSqlResult &r, const int row, const size_t def_col, const size_t min_col, const size_t max_col) |
Fetches a uint32_t value into a Triplet using a three column values: default, minimum, and maximum. | |
static bool | isColumnNull (const PgSqlResult &r, const int row, const size_t col) |
Returns true if a column within a row is null. | |
Base class for marshalling leases to and from PostgreSQL.
Provides the common functionality to set up binding information between lease objects in the program and their database representation in the database.
Definition at line 645 of file pgsql_lease_mgr.cc.
|
inline |
Definition at line 648 of file pgsql_lease_mgr.cc.
|
inlinevirtual |
Definition at line 656 of file pgsql_lease_mgr.cc.
|
protected |
Definition at line 680 of file pgsql_lease_mgr.cc.
|
protected |
Common Instance members used for binding and conversion.
Definition at line 662 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::createBindForSend(), and isc::dhcp::PgSqlLease6Exchange::createBindForSend().
|
protected |
Definition at line 674 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(), and isc::dhcp::PgSqlLease6Exchange::convertFromDatabase().
|
protected |
Definition at line 668 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(), and isc::dhcp::PgSqlLease6Exchange::convertFromDatabase().
|
protected |
Definition at line 669 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::createBindForSend(), and isc::dhcp::PgSqlLease6Exchange::createBindForSend().
|
protected |
Definition at line 675 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(), and isc::dhcp::PgSqlLease6Exchange::convertFromDatabase().
|
protected |
Definition at line 676 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(), and isc::dhcp::PgSqlLease6Exchange::convertFromDatabase().
|
protected |
Definition at line 677 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(), and isc::dhcp::PgSqlLease6Exchange::convertFromDatabase().
|
protected |
Definition at line 664 of file pgsql_lease_mgr.cc.
|
protected |
Definition at line 665 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::PgSqlLease4Exchange(), isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(), and isc::dhcp::PgSqlLease6Exchange::convertFromDatabase().
|
protected |
Definition at line 663 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(), and isc::dhcp::PgSqlLease6Exchange::convertFromDatabase().
|
protected |
Definition at line 672 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(), and isc::dhcp::PgSqlLease6Exchange::convertFromDatabase().
|
protected |
Definition at line 673 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::createBindForSend(), and isc::dhcp::PgSqlLease6Exchange::createBindForSend().
|
protected |
Definition at line 678 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::createBindForSend(), and isc::dhcp::PgSqlLease6Exchange::createBindForSend().
|
protected |
Definition at line 670 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(), and isc::dhcp::PgSqlLease6Exchange::convertFromDatabase().
|
protected |
Definition at line 671 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::createBindForSend(), and isc::dhcp::PgSqlLease6Exchange::createBindForSend().
|
protected |
|
protected |
Definition at line 666 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(), and isc::dhcp::PgSqlLease6Exchange::convertFromDatabase().
|
protected |
Definition at line 667 of file pgsql_lease_mgr.cc.
Referenced by isc::dhcp::PgSqlLease4Exchange::createBindForSend(), and isc::dhcp::PgSqlLease6Exchange::createBindForSend().