Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

uesqlc::TDate Class Reference

SQL date handler. More...

#include <date.hh>

Inheritance diagram for uesqlc::TDate:

mpcl::text::TLocalDate uesqlc::IType mpcl::text::IDate List of all members.

Public Methods

 TDate (void)
 Builds a new instance.

 TDate (const TDate &rktDATE)
 Builds a new instance from another instance.

void set (const char *pkcVALUE)
void set (const string &rkyVALUE)
mpcl::text::TString get (void) const
mpcl::text::TString get (const char *pkcDATE_FORMAT) const

Detailed Description

SQL date handler.

Definition at line 41 of file date.hh.


Member Function Documentation

mpcl::text::TString uesqlc::TDate::get const char *    pkcDATE_FORMAT const [inline, virtual]
 

Returns date in SQL format.

Parameters:
pkcDATE_FORMAT  Date format in strftime-like format. It defaults to ANSI SQL date format. A valid date can be '1970-12-31'.
Returns:
Date in readable format.
Warning:
pkcDATE_FORMAT must include the enclosing quotes (').

Reimplemented from mpcl::text::TLocalDate.

Definition at line 142 of file date.hh.

References uesqlc::IType::isNull().

mpcl::text::TString uesqlc::TDate::get void    const [inline, virtual]
 

Returns a string with the value of the instance. If the instance holds a null value, then the string 'NULL' will be printed.

Returns:
The result of converting this instance to string.

Implements uesqlc::IType.

Definition at line 119 of file date.hh.

References uesqlc::IType::isNull().

void uesqlc::TDate::set const string &    rkyVALUE [inline, virtual]
 

Assigns value rkyVALUE. If rkyVALUE is empty, then the instance is null.

Precondition:
( rkyVALUE.empty() ) => isNull()
Parameters:
rkyVALUE  Source value.

Implements uesqlc::IType.

Definition at line 107 of file date.hh.

References set().

void uesqlc::TDate::set const char *    pkcVALUE [virtual]
 

Assigns value pkcVALUE. If pkcVALUE is null or points to a zero length string, then the instance is null.

Precondition:
( !pkcVALUE || !*pkcVALUE ) => isNull()
Parameters:
pkcVALUE  Source value.

Implements uesqlc::IType.

Definition at line 33 of file date.cc.

References uesqlc::IType::isNull(), and uesqlc::IType::setNull().

Referenced by set().


The documentation for this class was generated from the following files:
Generated on Mon Oct 13 02:40:12 2003 for UESQLC by doxygen1.2.18