PostgreSQL-For-Wordpress / postgresql-for-wordpress

A maintained fork of https://wordpress.org/plugins/postgresql-for-wordpress/
GNU General Public License v2.0
220 stars 71 forks source link

implement wpsqli_connect_errno #62

Open mattbucci opened 10 months ago

mattbucci commented 10 months ago

https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress/blob/bf2ef7f4185d5327543ded7df42efb16ff79fa7c/pg4wp/driver_pgsql.php#L342

/**
 * Returns the error code from the last connection attempt.
 *
 * This function is a wrapper for the pg_connect_errno function. It returns the error code from
 * the last call to pg_connect() or pg_real_connect(). It is useful for error handling after
 * attempting to establish a connection to a PostgreSQL server, allowing the script to respond appropriately
 * to specific error conditions. The function does not take any parameters and returns an integer error
 * code. If no error occurred during the last connection attempt, it will return zero.
 *
 * @return int The error code from the last connection attempt.
 */
function wpsqli_connect_errno()
{
    throw new \Exception("PG4WP: Not Yet Implemented");
}