

Public Member Functions | |
| num_rows () | |
| Number of rows in the result set. | |
| num_fields () | |
| Number of fields in the result set. | |
| list_fields () | |
| Fetch Field Names. | |
| field_data () | |
| Field data. | |
| free_result () | |
| Free the result. | |
| _data_seek ($n=0) | |
| Data Seek. | |
| _fetch_assoc () | |
| Result - associative array. | |
| _fetch_object () | |
| Result - object. | |
Definition at line 27 of file postgre_result.php.
| CI_DB_postgre_result::_data_seek | ( | $ | n = 0 |
) |
Data Seek.
Moves the internal pointer to the desired offset. We call this internally before fetching results to make sure the result set starts at zero
private
Definition at line 130 of file postgre_result.php.
| CI_DB_postgre_result::_fetch_assoc | ( | ) |
Result - associative array.
Returns the result set as an array
private
Reimplemented from CI_DB_result.
Definition at line 145 of file postgre_result.php.
| CI_DB_postgre_result::_fetch_object | ( | ) |
Result - object.
Returns the result set as an object
private
Reimplemented from CI_DB_result.
Definition at line 160 of file postgre_result.php.
| CI_DB_postgre_result::field_data | ( | ) |
Field data.
Generates an array of objects containing field meta-data
public
Reimplemented from CI_DB_result.
Definition at line 84 of file postgre_result.php.
References num_fields().
00085 { 00086 $retval = array(); 00087 for ($i = 0; $i < $this->num_fields(); $i++) 00088 { 00089 $F = new stdClass(); 00090 $F->name = pg_field_name($this->result_id, $i); 00091 $F->type = pg_field_type($this->result_id, $i); 00092 $F->max_length = pg_field_size($this->result_id, $i); 00093 $F->primary_key = 0; 00094 $F->default = ''; 00095 00096 $retval[] = $F; 00097 } 00098 00099 return $retval; 00100 }

| CI_DB_postgre_result::free_result | ( | ) |
Free the result.
Reimplemented from CI_DB_result.
Definition at line 109 of file postgre_result.php.
00110 { 00111 if (is_resource($this->result_id)) 00112 { 00113 pg_free_result($this->result_id); 00114 $this->result_id = FALSE; 00115 } 00116 }
| CI_DB_postgre_result::list_fields | ( | ) |
Fetch Field Names.
Generates an array of column names
public
Reimplemented from CI_DB_result.
Definition at line 63 of file postgre_result.php.
References num_fields().
00064 { 00065 $field_names = array(); 00066 for ($i = 0; $i < $this->num_fields(); $i++) 00067 { 00068 $field_names[] = pg_field_name($this->result_id, $i); 00069 } 00070 00071 return $field_names; 00072 }

| CI_DB_postgre_result::num_fields | ( | ) |
Number of fields in the result set.
public
Reimplemented from CI_DB_result.
Definition at line 48 of file postgre_result.php.
Referenced by field_data(), and list_fields().

| CI_DB_postgre_result::num_rows | ( | ) |
Number of rows in the result set.
public
Reimplemented from CI_DB_result.
Definition at line 35 of file postgre_result.php.