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_info #68

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#L1222

/**
 * Retrieves information about the most recently executed query.
 *
 * This function is a wrapper for the pg_info function. It provides a string containing
 * information about the most recently executed query on the given connection resource. This
 * can include information such as the number of rows affected by an INSERT, UPDATE, REPLACE,
 * or DELETE query, as well as the number of rows matched and changed. It is valuable for
 * obtaining detailed insights into the execution of database operations.
 *
 * @param PgSql\Connection $connection The pg connection resource.
 * @return string|null A string representing information about the last query executed,
 *                     or NULL if no information is available.
 */
function wpsqli_info(&$connection)
{
    throw new \Exception("PG4WP: Not Yet Implemented");
    // mysqli_info => No direct equivalent in PostgreSQL.
    // This function retrieves information about the most recently executed query, which is not provided by PostgreSQL's PHP functions.
}