39 if ($this->resultFields ==
null)
41 $this->resultFields =
array();
45 && (is_resource($this->resource) || is_object($this->resource))
48 $fields = pg_num_fields($this->resource);
51 $helper = $this->connection->getSqlHelper();
54 $fieldName = mb_strtoupper(pg_field_name($this->resource,
$i));
55 $fieldType = pg_field_type($this->resource,
$i);
56 $this->resultFields[$fieldName] = $helper->getFieldByColumnType($fieldName, $fieldType);
62 return $this->resultFields;
74 $result = pg_fetch_assoc($this->resource);
77 if ($this->byteaFields ===
false)
79 $this->byteaFields = [];
81 foreach (
$result as $fieldName => $_)
83 $fieldType = pg_field_type($this->resource, $fieldNum);
84 if ($fieldType ===
'bytea')
86 $this->byteaFields[$fieldName] = $fieldType;
92 if ($this->byteaFields)
94 foreach ($this->byteaFields as $fieldName => $fieldType)
100 return array_change_key_case(
$result, \CASE_UPPER);