db = $db; $this->handle = $handle; $this->result = $result; } /** * Get the underlying result object or array * * @since 1.37 * @deprecated since 1.37 Only exists to support deprecated methods * @return resource */ public function getInternalResult() { return $this->result; } protected function doNumRows() { return pg_num_rows( $this->result ); } protected function doFetchObject() { AtEase::suppressWarnings(); $row = pg_fetch_object( $this->result ); AtEase::restoreWarnings(); return $row; } protected function doFetchRow() { AtEase::suppressWarnings(); $row = pg_fetch_array( $this->result ); AtEase::restoreWarnings(); return $row; } protected function doSeek( $pos ) { pg_result_seek( $this->result, $pos ); } protected function doFree() { return pg_free_result( $this->result ); } protected function doGetFieldNames() { $names = []; $n = pg_num_fields( $this->result ); for ( $i = 0; $i < $n; $i++ ) { $names[] = pg_field_name( $this->result, $i ); } return $names; } }