system/Database/Postgre/PreparedQuery.php
public function _prepare(string $sql, array $options = [])
	{
		$this->name = random_int(1, 10000000000000000);

		$sql = $this->parameterize($sql);

		// Update the query object since the parameters are slightly different
		// than what was put in.
		$this->query->setQuery($sql);

		if (! $this->statement = pg_prepare($this->db->connID, $this->name, $sql))
		{
			$this->errorCode   = 0;
			$this->errorString = pg_last_error($this->db->connID);
		}

		return $this;
	}
public function _prepare(string $sql, array $options = [])
	{
		$this->name = random_int(1, 10000000000000000);

		$sql = $this->parameterize($sql);

		// Update the query object since the parameters are slightly different
		// than what was put in.
		$this->query->setQuery($sql);

		if (! $this->statement = pg_prepare($this->db->connID, $this->name, $sql))
		{
			$this->errorCode   = 0;
			$this->errorString = pg_last_error($this->db->connID);
		}

		return $this;
	}
Prepares the query against the database, and saves the connection
info necessary to execute the query later.

NOTE: This version is based on SQL code. Child classes should
override this method.

@param string $sql
@param array  $options Passed to the connection's prepare statement.
Unused in the MySQLi driver.

@return mixed
@throws \Exception