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_options #61

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#L322C1-L340C2

/**
 * Sets extra connect options and affect behavior for a connection.
 *
 * This function is a wrapper for the pg_options function. It is used to set extra options
 * for a connection resource before establishing a connection using pg_real_connect(). These
 * options can be used to control various aspects of the connection's behavior. The function should
 * be called after pg_init() and before pg_real_connect(). It returns TRUE on success or
 * FALSE on failure.
 *
 * @param PgSql\Connection $connection The pg connection resource.
 * @param int $option The specific option that is to be set.
 * @param mixed $value The value for the specified option.
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function wpsqli_options(&$connection, $option, $value)
{
    throw new \Exception("PG4WP: Not Yet Implemented");
    // mysqli_options => No direct equivalent. Options are set in the connection string or via set_config in PostgreSQL.
}