Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

2.4 Expressions

Although all DBTools.h++ access libraries are implemented through a common interface, there are differences in the parameters which must be passed to certain expressions. The following section outlines the differences in the Oracle access library.

2.4.1 Global Functions

Table 4 lists restrictions on the global functions associated with RWDBExpr.

Table 4 -- Restrictions on the use of global functions 

 
FunctionRestrictions
rwdbAvg(const RWDBExpr&)
None. Corresponds to: AVG(expr)
rwdbCast(const RWDBExpr&,
const RWDBValue&)

See Section 2.4.2.
rwdbCast(const RWDBExpr&,
const RWDBValue&,
const RWDBExpr&)

See Section 2.4.2.
rwdbCast(const RWBDExpr&,
const RWDBValue&,
const RWDBExpr&,
const RWDBExpr&)

See Section 2.4.2.
rwdbCharLength(const RWDBExpr&)
None. Corresponds to: LENGTH(expr)
rwdbCount()
None. Corresponds to: COUNT(*)
rwdbCount(const RWDBExpr&)
None. Corresponds to: COUNT(expr)
rwdbCountDistinct(const RWDBExpr&)
None. Corresponds to:
COUNT(DISTINCT expr)
rwdbCurrentUser()
None. Corresponds to: USER
rwdbExists(const RWDBSelectorBase&)
None. Corresponds to: EXISTS sel
rwdbLower(const RWDBExpr&)
None. Corresponds to: LOWER(expr)
rwdbMax(const RWDBExpr&)
None. Corresponds to: MAX(expr)
rwdbMin(const RWDBExpr&)
None. Corresponds to: MIN(expr)
rwdbName(const RWCString&,
const RWDBExpr&)

None. Corresponds to: string1 = expr0
rwdbPosition(const RWDBExpr&,
const RWDBExpr&)

None. Corresponds to:
instr(expr1, expr0)
rwdbSessionUser()
None. Corresponds to: USER
rwdbSubString(const RWDBExpr&,
const RWDBExpr&)

None. Corresponds to:
substr(expr0, expr1)
rwdbSubString(const RWDBExpr&,
const RWDBExpr&,
const RWDBExpr&)

None. Corresponds to:
SUBSTR(expr0, expr1, expr2 )
rwdbSum(const RWDBExpr&)
None. Corresponds to: SUM(expr)
rwdbSystemDateTime()
None. Corresponds to: SYSDATE
rwdbSystemUser()
None. Corresponds to: USER
rwdbTrimLeading(const RWDBExpr&,
const RWDBExpr&)

None. Corresponds to:
LTRIM(expr1, expr0)
rwdbTrimTrailing(const RWDBExpr&,
const RWDBExpr&)

None. Corresponds to:
RTRIM(expr1, expr0)
rwdbTrimBoth(const RWDBExpr&,
const RWDBExpr&)

None. Corresponds to:
LTRIM(RTRIM(expr1, expr0), expr0)
rwdbUpper(const RWDBExpr&)
None. Corresponds to: UPPER(expr)

2.4.2 rwdbCast()

The predefined expression, rwdbCast(), allows an application to change the type of a value in the database to another type. For example, with rwdbCast() you can change a number to a character string. The parameters for rwdbCast() should be specified in the following ways:

As shown in Table 4, there are also three and four parameter versions of the rwdbCast() expression. These can also be used to provide optional format and language parameters for the TO_CHAR, TO_NUMBER, and TO_DATE conversion functions.


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.