Class Row.

Inherits Garbage

Represents a single row of data retrieved from the Database.

The Database creates Row objects for every row of data received, and populates them with the appropriate Column objects before appending them to the originating Query.

Users of Query can retrieve each row in turn with Query::nextRow(), and use the getInt()/getEString()/etc. accessor functions, each of which takes a column name, to retrieve the values of each column in the Row.

Row::Row( const PgRowDescription * desc, Column * c )

Creates a row of data based on the columns c, named as in desc.

EStringList * Row::columnNames() const

Returns a pointer to a list of this Row's columns. The list may be empty, but the pointer is never null.

Column::Type Row::columnType( const char * f ) const

Returns the type of f, or Column::Unknown if f is not a valid column name.

const Column * Row::fetch( const char * f, Column::Type type, bool warn ) const

This private helper returns the column named f, or a null pointer if f does not exist.

If warn is true and f does not exist or has a type other than type, then fetch() logs a warning.

int64 Row::getBigint( const char * f ) const

Returns the 64-bit integer (i.e. Postgres bigint) value of the column named f if it exists and is NOT NULL; 0 otherwise.

bool Row::getBoolean( const char * f ) const

Returns the boolean value of the column named f if it exists and is NOT NULL, and false otherwise.

EString Row::getEString( const char * f ) const

Returns the string value of the column named f i if it exists and is NOT NULL, and an empty string otherwise.

int Row::getInt( const char * f ) const

Returns the integer value of the column named f if it exists and is NOT NULL, and 0 otherwise.

UString Row::getUString( const char * f ) const

Returns the string value of the column named f if it exists and is NOT NULL, and an empty string otherwise.

bool Row::hasColumn( const char * f ) const

Returns true if this Row contains a column named f, and false otherwise.

bool Row::isNull( const char * f ) const

Returns true if the column named f is NULL or does not exist, and false in all other cases.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.