Ql_res Class Reference

#include <Ql_result.hxx>

Inherits node.

Inheritance diagram for Ql_res:

[legend]
Collaboration diagram for Ql_res:
[legend]
List of all members.

Public Member Functions

 Ql_res (Ql_kind k)
 Ql_res ()
 ~Ql_res ()
void result (int val)
void result (long long val)
void result (double val)
void result (char val)
void result (char *val)
void result (ResultSet *val)
void result (Ql_res *r)
void cleanUpOldValue ()
Ql_res * duplicate ()
int equals (node *r)
char * toString (Ql_type *t)
long long string2date (char *date)
void fromString (Ql_kind k, char *val)
char is_union ()
void set_union ()

Public Attributes

char persistent
Ql_result res

Detailed Description

A class containing the value of this operation at each stage of the evaluation of a query, as a result of its evaluation

Author:
Grigoris Karvounarakis
Version:
1.0


Constructor & Destructor Documentation

Ql_res::Ql_res ( Ql_kind  k  ) 

Constuctor that sets the kind of this result object to k

Ql_res::Ql_res (  ) 

"Default" constructor

Ql_res::~Ql_res (  ) 

Destructor, also responsible to free the memory allocated for the value of the result, in case it was, e.g., a string


Member Function Documentation

void Ql_res::result ( int  val  ) 

Set the value of this object to the given integer

void Ql_res::result ( long long  val  ) 

Set the value of this object to the given long long (used to represent dates)

void Ql_res::result ( double  val  ) 

Set the value of this object to the given double

void Ql_res::result ( char  val  ) 

Set the value of this object to the given character

void Ql_res::result ( char *  val  ) 

Set the value of this object to the given string

void Ql_res::result ( ResultSet *  val  ) 

Set the value of this object to the given ResultSet

See also:
ResultSet

void Ql_res::result ( Ql_res *  r  ) 

Set the result of this operation according to the given result object and its kind

void Ql_res::cleanUpOldValue (  ) 

Free the memory allocated for the old value of this object before setting the new one, if necessary (e.g. if the old value was a string)

Ql_res * Ql_res::duplicate (  ) 

Create an exact copy of "this" result object

Returns:
the created copy

int Ql_res::equals ( node *  r  )  [virtual]

Returns:
always false ...

Implements node.

char * Ql_res::toString ( Ql_type *  t  ) 

Parameters:
t the type of the members of this complex type or NULL
Returns:
a string representation of the object's value

long long Ql_res::string2date ( char *  date  ) 

Parses a string, presumed to represent a date in the postgresql format

Parameters:
date the string representation of te date
Returns:
the internal representation of the date, as a long long

void Ql_res::fromString ( Ql_kind  k,
char *  val 
)

Set the value of this Ql_res from the given string value (val), so that this will be a correct result of the given kind (k)

char Ql_res::is_union (  )  [inline]

true, if this result corresponds to a union value (to be used only for results returned by FetchOneResult, FetchSeqValue, FetchEnumValue, for scans on query results)

void Ql_res::set_union (  )  [inline]

set union flag to true, if this result corresponds to a union value (used only for results returned by FetchOneResult, FetchSeqValue, FetchEnumValue, for scans on query results)


Member Data Documentation

char Ql_res::persistent

An indicator for operations of sequence types, used to determine whether the result is kept in main memory (as a ResultSet) or has been stored in the DB. In the latter case, the result contains an identifier that can be used to retrieve this value

Ql_result Ql_res::res

An union, with accessors for all different types, where values are stored


The documentation for this class was generated from the following files:
Generated on Thu Oct 26 16:42:11 2006 for rul by  doxygen 1.5.0