SourcePro® API Reference Guide

 
List of all members | Public Types | Public Member Functions | Related Functions
RWDBExpr Class Reference

A C++ representation of expressions used in constructing SQL statements. More...

#include <rw/db/expr.h>

Inheritance diagram for RWDBExpr:
RWDBAssignment RWDBBoundExpr RWDBCollectableExpr RWDBCriterion RWDBJoinExpr RWDBSearchedCaseExpr RWDBSimpleCaseExpr

Public Types

enum  AsStringControlFlag { normal, suppressTagsOnColumns, noPlaceHolder, placeHolderNotRecommended }
 

Public Member Functions

 RWDBExpr ()
 
 RWDBExpr (const RWDBExpr &expr)
 
 RWDBExpr (char value)
 
 RWDBExpr (unsigned char value)
 
 RWDBExpr (short value)
 
 RWDBExpr (unsigned short value)
 
 RWDBExpr (int value)
 
 RWDBExpr (unsigned int value)
 
 RWDBExpr (long int value)
 
 RWDBExpr (unsigned long int value)
 
 RWDBExpr (long long value)
 
 RWDBExpr (unsigned long long value)
 
 RWDBExpr (float value)
 
 RWDBExpr (double value)
 
 RWDBExpr (long double value)
 
 RWDBExpr (const char *value)
 
 RWDBExpr (const wchar_t *value)
 
 RWDBExpr (const RWCString &value)
 
 RWDBExpr (const RWDecimalPortable &value)
 
 RWDBExpr (const RWDateTime &value)
 
 RWDBExpr (const RWDBDateTime &value)
 
 RWDBExpr (const RWDBDuration &value)
 
 RWDBExpr (const RWDate &value)
 
 RWDBExpr (const RWTime &value)
 
 RWDBExpr (const RWDBBlob &value)
 
 RWDBExpr (const RWBasicUString &value)
 
 RWDBExpr (const RWDBMBString &value)
 
 RWDBExpr (const RWWString &value)
 
 RWDBExpr (const RWDBValue &value, bool usePhraseBook=true)
 
 RWDBExpr (const RWDBColumn &column)
 
 RWDBExpr (const RWDBSelectorBase &subSelect)
 
 RWDBExpr (RWDBValueManip manip)
 
 RWDBExpr (const RWCollection &collection)
 
 RWDBExpr (const RWDBTable &)
 
 RWDBExpr (const RWDBColumn &left, const RWDBExpr &right)
 
 RWDBExpr (const RWDBColumn &left, const RWDBValue &right)
 
RWCString asString (const RWDBPhraseBook &phraseBook, AsStringControlFlag control=normal) const
 
RWDBCriterion between (const RWDBExpr &expression1, const RWDBExpr &expression2) const
 
RWDBCriterion in (const RWDBExpr &expression1) const
 
RWDBCriterion isNull (void) const
 
bool isValid (void) const
 
RWDBCriterion leftOuterJoin (const RWDBExpr &expression) const
 
RWDBCriterion like (const RWDBExpr &expression1) const
 
RWDBCriterion matchUnique (const RWDBExpr &expression1) const
 
RWDBExproperator= (const RWDBExpr &expr)
 
RWDBCriterion rightOuterJoin (const RWDBExpr &expression) const
 

Related Functions

(Note that these are not member functions.)

RWDBCriterion operator! (const RWDBCriterion &)
 
RWDBCriterion operator!= (const RWDBExpr &, const RWDBExpr &)
 
RWDBExpr operator% (const RWDBExpr &, const RWDBExpr &)
 
RWDBCriterion operator&& (const RWDBCriterion &, const RWDBCriterion &)
 
RWDBExpr operator* (const RWDBExpr &, const RWDBExpr &)
 
RWDBExpr operator+ (const RWDBExpr &, const RWDBExpr &)
 
RWDBExpr operator+ (const RWDBExpr &)
 
RWDBExpr operator- (const RWDBExpr &, const RWDBExpr &)
 
RWDBExpr operator- (const RWDBExpr &)
 
RWDBExpr operator/ (const RWDBExpr &, const RWDBExpr &)
 
RWDBCriterion operator< (const RWDBExpr &, const RWDBExpr &)
 
RWDBCriterion operator<= (const RWDBExpr &, const RWDBExpr &)
 
RWDBCriterion operator== (const RWDBExpr &, const RWDBExpr &)
 
RWDBCriterion operator> (const RWDBExpr &, const RWDBExpr &)
 
RWDBCriterion operator>= (const RWDBExpr &, const RWDBExpr &)
 
RWDBCriterion operator|| (const RWDBCriterion &, const RWDBCriterion &)
 
RWDBExpr rwdbAvg (const RWDBExpr &expr)
 
RWDBExpr rwdbCast (const RWDBExpr &expr, const RWDBValue &type)
 
RWDBExpr rwdbCast (const RWDBExpr &expr, const RWDBValue &typeName, const RWDBExpr &formatString)
 
RWDBExpr rwdbCast (const RWDBExpr &expr, const RWDBValue &typeName, const RWDBExpr &formatString, const RWDBExpr &secondaryFormat)
 
RWDBExpr rwdbCharLength (const RWDBExpr &expr)
 
RWDBExpr rwdbCount (const RWDBExpr &expr)
 
RWDBExpr rwdbCount ()
 
RWDBExpr rwdbCountDistinct (const RWDBExpr &expr)
 
RWDBExpr rwdbCurrentUser ()
 
RWDBCriterion rwdbExists (const RWDBSelectorBase &select)
 
RWDBExpr rwdbLower (const RWDBExpr &expr)
 
RWDBExpr rwdbMax (const RWDBExpr &expr)
 
RWDBExpr rwdbMin (const RWDBExpr &expr)
 
RWDBExpr rwdbName (const RWCString &name, const RWDBExpr &expr)
 
RWDBExpr rwdbPosition (const RWDBExpr &expr1, const RWDBExpr &expr2)
 
RWDBExpr rwdbSessionUser ()
 
RWDBExpr rwdbSubString (const RWDBExpr &expr1, const RWDBExpr &expr2)
 
RWDBExpr rwdbSubString (const RWDBExpr &expr1, const RWDBExpr &expr2, const RWDBExpr &expr3)
 
RWDBExpr rwdbSum (const RWDBExpr &expr)
 
RWDBExpr rwdbSystemDateTime ()
 
RWDBExpr rwdbSystemUser ()
 
RWDBExpr rwdbTrimBoth (const RWDBExpr &expr1, const RWDBExpr &expr2)
 
RWDBExpr rwdbTrimLeading (const RWDBExpr &expr1, const RWDBExpr &expr2)
 
RWDBExpr rwdbTrimTrailing (const RWDBExpr &expr1, const RWDBExpr &expr2)
 
RWDBExpr rwdbUpper (const RWDBExpr &expr)
 

Detailed Description

RWDBExpr represents expressions used in constructing SQL statements, allowing the SQL to be constructed using C++ syntax. Because there are several types of expressions, this class is simply an interface to a family of implementations that can represent numeric and string constants, columns from tables, or other expressions. By its nature, an RWDBExpr can actually represent a complete complex expression in the form of a parse tree.

Because instances of this class are typically created anonymously, it has constructors taking the various operands used in expressions. These include the C++ primitive types, as well as the structured types used by the DB Interface Module, such as RWCString and RWDBColumn.

RWDBExpr is designed around the Interface/Implementation paradigm. An RWDBExpr instance is an interface to a reference-counted implementation; copy constructors and assignment operators produce additional references to a shared implementation.

This class has a number of related global functions that may be applied to RWDBExpr instances to build RWDBExpr objects representing SQL functions. The SQL syntax for these functions typically varies among the various vendors' implementations. The DB Interface Module hides the variations by providing the database-specific syntax at runtime.

The DB Interface Module also provides an extensible mechanism for applications to define their own functional notation. See RWDBExprFormDefinition.

Synopsis
#include <rw/db/expr.h>
See also

RWDBAssignment is a special kind of expression used to encapsulate the SQL phrase:

SET column = expression.

RWDBAssignment instances are produced by the method RWDBColumn::assign().

RWDBBoundExpr is used to bind application variables to an SQL statement.

RWDBCollectableExpr derives from RWDBExpr and RWCollectable.

RWDBPhraseBook stores database-specific SQL syntax.

RWDBCriterion is a special kind of expression used to encapsulate an SQL WHERE clause. It is formed from RWDBExpr instances connected with logical operators.

RWDBExprFormDefinition provides an extensible mechanism that allows application programmers to define their own functional SQL notation.

RWDBJoinExpr constructs ANSI SQL join syntax.

RWDBSimpleCaseExpr constructs simple CASE expressions.

RWDBSearchedCaseExpr constructs searched CASE expressions.

Example

In this example, an RWDBExpr is created anonymously to be used as part of an SQL SELECT statement. The intent is to create a selector that adds the value of the program variable x to each value selected.

int x = somevalue;
RWDBTable myTable = myDbase.table("myTable");
RWDBSelector select = myDbase.selector();
select << myTable["integerColumn"] + x;

Member Enumeration Documentation

This enum holds values to format asString() output.

Enumerator
normal 

Normal formatting

suppressTagsOnColumns 

Suppress usage of table tags to qualify table columns

noPlaceHolder 

Prevent usage of placeholders

placeHolderNotRecommended 

Placeholder usage is not recommended

Constructor & Destructor Documentation

RWDBExpr::RWDBExpr ( )

The default constructor builds an empty RWDBExpr, that is, one whose asString() method returns an SQL NULL keyword, as specified in its parameter phraseBook. Since an empty expression cannot hold a value, RWDBExpr() cannot be used as NULL value.

RWDBExpr::RWDBExpr ( const RWDBExpr expr)

Copy constructor. Self shares an implementation with expr.

RWDBExpr::RWDBExpr ( char  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( unsigned char  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( short  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( unsigned short  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( int  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( unsigned int  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( long int  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( unsigned long int  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( long long  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( unsigned long long  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( float  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( double  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( long double  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const char *  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const wchar_t *  value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWCString value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWDecimalPortable value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWDateTime value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWDBDateTime value)
Deprecated:
As of SourcePro 12.5, use RWDBExpr(const RWDateTime&) instead.

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWDBDuration value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWDate value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWTime value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWDBBlob value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWBasicUString value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWDBMBString value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWWString value)

Creates an RWDBExpr from the given value.

RWDBExpr::RWDBExpr ( const RWDBValue value,
bool  usePhraseBook = true 
)

Creates an RWDBExpr from an RWDBValue. When the asString() function is applied to this RWDBExpr, it passes its phraseBook parameter on to the RWDBValue for interpretation. Passing false for the usePhraseBook parameter suppresses this behavior. The effect of suppressing the use of the phraseBook is to prevent strings from being quoted and RWDateTime instances from using the database's designated format.

RWDBExpr::RWDBExpr ( const RWDBColumn column)

Creates an RWDBExpr from the column reference.

RWDBExpr::RWDBExpr ( const RWDBSelectorBase subSelect)

Creates an RWDBExpr from an RWDBSelector or RWDBCompoundSelector. This constructor supports the SQL subquery construct.

RWDBExpr::RWDBExpr ( RWDBValueManip  manip)

Creates an RWDBExpr according to the semantics of manip. In particular, an expression representing a literal NULL may be constructed from rwdbNull.

RWDBExpr::RWDBExpr ( const RWCollection collection)

Creates an RWDBExpr that represents a delimited list of the items in collection. The parameter collection must be a collection of RWDBCollectableExpr instances. collection must remain in scope for the entire period that the RWDBExpr can be referenced, since the expression is not expanded into a string until the asString() method is called, which can happen long after you assign the collectable to the expression.

RWDBExpr::RWDBExpr ( const RWDBTable )

Creates an RWDBExpr that represents a table.

RWDBExpr::RWDBExpr ( const RWDBColumn left,
const RWDBExpr right 
)

Creates an RWDBExpr that represents an encapsulation of the SQL expression:

left = right

where left is the name of the column and right is the expression against which to compare.

RWDBExpr::RWDBExpr ( const RWDBColumn left,
const RWDBValue right 
)

Creates an RWDBExpr that represents an encapsulation of the SQL expression:

left = right

where left is the name of the column and right is the value against which to compare.

Member Function Documentation

RWCString RWDBExpr::asString ( const RWDBPhraseBook phraseBook,
AsStringControlFlag  control = normal 
) const

Returns an RWCString representing self as a string based on the format found in phraseBook. Normally, references to columns in self are represented in the string with table tags attached. Setting the value of control with RWDBExpr::suppressTagsOnColumns prevents the tags from being included in the string.

RWDBCriterion RWDBExpr::between ( const RWDBExpr expression1,
const RWDBExpr expression2 
) const

Returns an RWDBCriterion that represents an encapsulation of the SQL clause:

expression BETWEEN expression1 AND expression2

where expression refers to self. RWDBCriterion encapsulates SQL WHERE clauses.

RWDBCriterion RWDBExpr::in ( const RWDBExpr expression1) const

Returns an RWDBCriterion that represents an encapsulation of the SQL phrase:

expression IN expression1

where expression refers to self. An RWDBCriterion is an encapsulation of an SQL WHERE clause. For example, to produce the SQL clause (shown using Oracle placeholder syntax):

(col1 + 'bye') in (:ph0, :ph1)

we could write:

RWDBExpr anExpression(col1 + "bye");
RWOrdered aCollection;
RWCString hello("hello");
RWCString goodbye("goodbye");
RWDBBoundExpr expr1(&hello);
RWDBBoundExpr expr2(&goodbye);
RWDBCollectableExpr colExpr1(expr1);
RWDBCollectableExpr colExpr2(expr2);
aCollection.insert(&colExpr1);
aCollection.insert(&colExpr2);
anExpression.in(aCollection);

To produce the SQL clause:

(col1 + 'bye') in ('hello','goodbye')

we could write:

RWDBExpr anExpression(col1 + "bye");
RWOrdered aCollection;
RWDBExpr expr1("hello");
RWDBExpr expr2("goodbye");
aCollection.insert(&expr1);
aCollection.insert(&expr2);
anExpression.in(aCollection);

Alternatively, we could write:

RWDBExpr anExpression(col1 + "bye");
anExpression.in(RWDBExpr("('hello', 'good-bye')", false));
Note
The parameter false in the constructor for the RWDBExpr above is required in order to suppress quotation marks in the resultant SQL string.
RWDBCriterion RWDBExpr::isNull ( void  ) const

Returns an RWDBCriterion that represents an encapsulation of the SQL clause:

expression IS NULL

where expression refers to self. An RWDBCriterion is an encapsulation of an SQL WHERE clause.

bool RWDBExpr::isValid ( void  ) const

Returns true if self is not an empty (null) expression.

RWDBCriterion RWDBExpr::leftOuterJoin ( const RWDBExpr expression) const

Returns an RWDBCriterion that represents an encapsulation of the LEFT OUTER JOIN SQL phrase. An RWDBCriterion is an encapsulation of an SQL WHERE clause.

RWDBCriterion RWDBExpr::like ( const RWDBExpr expression1) const

Returns an RWDBCriterion that represents an encapsulation of the SQL clause:

expression LIKE expression1

where expression refers to self. For example, to produce the SQL clause:

col1 LIKE `%object%'

we would write:

table["col1"].like("%object%");
RWDBCriterion RWDBExpr::matchUnique ( const RWDBExpr expression1) const

Returns an RWDBCriterion that represents an encapsulation of the SQL clause:

expression MATCH UNIQUE expression1

where expression refers to self.

RWDBExpr& RWDBExpr::operator= ( const RWDBExpr expr)

Assignment operator. Self shares an implementation with expr.

RWDBCriterion RWDBExpr::rightOuterJoin ( const RWDBExpr expression) const

Returns an RWDBCriterion that represents an encapsulation of the RIGHT OUTER JOIN SQL phrase. An RWDBCriterion is an encapsulation of an SQL WHERE clause.

Friends And Related Function Documentation

RWDBCriterion operator! ( const RWDBCriterion )
related

Returns an RWDBCriterion representing a monadic expression with the operator ! (not).

RWDBCriterion operator!= ( const RWDBExpr ,
const RWDBExpr  
)
related

Returns an RWDBCriterion representing a dyadic expression between two subexpressions with the != (inequality) operator.

RWDBExpr operator% ( const RWDBExpr ,
const RWDBExpr  
)
related

Returns an RWDBExpr representing a dyadic expression between two subexpressions with the % (modulo) operator.

RWDBCriterion operator&& ( const RWDBCriterion ,
const RWDBCriterion  
)
related

Returns an RWDBCriterion representing a dyadic expression between two subexpressions with && (and) as the operator, if both operands are initialized. If only one operand is initialized, returns an RWDBCriterion representing a monadic expression.

RWDBExpr operator* ( const RWDBExpr ,
const RWDBExpr  
)
related

Returns an RWDBExpr representing a dyadic expression between two subexpressions with * (multiply) as the operator.

RWDBExpr operator+ ( const RWDBExpr ,
const RWDBExpr  
)
related

Returns an RWDBExpr representing a dyadic expression between two subexpressions with + (plus) as the operator.

RWDBExpr operator+ ( const RWDBExpr )
related

Returns an RWDBExpr representing a monadic expression with + (plus) as the operator.

RWDBExpr operator- ( const RWDBExpr ,
const RWDBExpr  
)
related

Returns an RWDBExpr representing a dyadic expression between two subexpressions with - (minus) as the operator.

RWDBExpr operator- ( const RWDBExpr )
related

Returns an RWDBExpr representing a monadic expression with - (minus) as the operator.

RWDBExpr operator/ ( const RWDBExpr ,
const RWDBExpr  
)
related

Returns an RWDBExpr representing a dyadic expression between two sub-expressions with / (divide) as the operator.

RWDBCriterion operator< ( const RWDBExpr ,
const RWDBExpr  
)
related

Returns an RWDBCriterion representing a dyadic expression between two subexpressions with the < (less than) operator.

RWDBCriterion operator<= ( const RWDBExpr ,
const RWDBExpr  
)
related

Returns an RWDBCriterion representing a dyadic expression between two subexpressions with the <= (less than or equal to) operator.

RWDBCriterion operator== ( const RWDBExpr ,
const RWDBExpr  
)
related

Returns an RWDBCriterion representing a dyadic expression between two subexpressions with the == (equality) operator.

RWDBCriterion operator> ( const RWDBExpr ,
const RWDBExpr  
)
related

Returns an RWDBCriterion representing a dyadic expression between two subexpressions with the > (greater than) operator.

RWDBCriterion operator>= ( const RWDBExpr ,
const RWDBExpr  
)
related

Returns an RWDBCriterion representing a dyadic expression between two subexpressions with the >= (greater than or equal to) operator.

RWDBCriterion operator|| ( const RWDBCriterion ,
const RWDBCriterion  
)
related

Returns an RWDBCriterion representing a dyadic expression between two subexpressions with || (or) as the operator, if both operands are initialized. If only one operand is initialized, returns an RWDBCriterion representing a monadic expression.

RWDBExpr rwdbAvg ( const RWDBExpr expr)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

AVERAGE(expr)

RWDBExpr rwdbCast ( const RWDBExpr expr,
const RWDBValue type 
)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

CAST(expr, type)

For example, to produce the SQL phrase:

CAST(Col1 + 7, STRING)

we would write:

RWDBExpr anExpression = rwdbCast(col1 + 7, "STRING");
RWDBExpr rwdbCast ( const RWDBExpr expr,
const RWDBValue typeName,
const RWDBExpr formatString 
)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

CAST(expr, typeName, formatString)

For example, to produce the SQL phrase:

CAST(dateCol, STRING, `MM-DD-YY')

we would write:

RWDBExpr anExpression = rwdbCast(dateCol,"STRING","'MM-DD-YY'");
RWDBExpr rwdbCast ( const RWDBExpr expr,
const RWDBValue typeName,
const RWDBExpr formatString,
const RWDBExpr secondaryFormat 
)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

CAST(expr, typeName, formatString, secondaryFormat)

For example, to produce the SQL phrase:

CAST(dateCol, STRING, `MM-DD-YY', French_France.WE8ISO88591')

where the last parameter is a database-specific directive to use French style formatting, write:

RWDBExpr anExpression =
rwdbCast(dateCol,"STRING","'MM-DD-YY'", "'French_France.WE8ISO88591'");
RWDBExpr rwdbCharLength ( const RWDBExpr expr)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

CHARACTER_LENGTH(expr)

RWDBExpr rwdbCount ( const RWDBExpr expr)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

COUNT(expr)

RWDBExpr rwdbCount ( )
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

COUNT(*)

RWDBExpr rwdbCountDistinct ( const RWDBExpr expr)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

COUNT DISTINCT (expr)

RWDBExpr rwdbCurrentUser ( )
related

Returns an RWDBExpr representing the database-specific function that returns the name of the current user.

RWDBCriterion rwdbExists ( const RWDBSelectorBase select)
related

Returns an RWDBCriterion representing the database-specific equivalent of the SQL expression

EXISTS(<select-statement>).

In this expression, <select-statement> is the SQL select statement encapsulated by select.

RWDBExpr rwdbLower ( const RWDBExpr expr)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

TOLOWER(expr)

RWDBExpr rwdbMax ( const RWDBExpr expr)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

MAX(expr)

RWDBExpr rwdbMin ( const RWDBExpr expr)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

MIN(expr)

RWDBExpr rwdbName ( const RWCString name,
const RWDBExpr expr 
)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL phrase:

expr AS name.

For example, to encapsulate the SQL statement:

SELECT name AS employeeName from employees

write:

mySelector << rwdbName("employeeName", employees["name"]);
RWDBExpr rwdbPosition ( const RWDBExpr expr1,
const RWDBExpr expr2 
)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

POSITION(expr1, expr2)

The goal is to produce an SQL statement that gives the index of the string expr1 in expr2.

RWDBExpr rwdbSessionUser ( )
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

SESSION_USER()

The details of the SESSION_USER() function are vendor-specific.

RWDBExpr rwdbSubString ( const RWDBExpr expr1,
const RWDBExpr expr2 
)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

SUBSTRING(expr1, expr2)

The goal is to produce an SQL statement that gives the substring of expr1 starting at the index given by expr2.

RWDBExpr rwdbSubString ( const RWDBExpr expr1,
const RWDBExpr expr2,
const RWDBExpr expr3 
)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

SUBSTRING(expr1, expr2, expr3)

The goal is to produce an SQL statement that gives the substring of expr1 starting at the index given by expr2, with length given by expr3.

RWDBExpr rwdbSum ( const RWDBExpr expr)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

SUM(expr)

RWDBExpr rwdbSystemDateTime ( )
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

SYSTEM_DATETIME()

RWDBExpr rwdbSystemUser ( )
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

SYSTEM_USER()

RWDBExpr rwdbTrimBoth ( const RWDBExpr expr1,
const RWDBExpr expr2 
)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

TRIM_BOTH(expr1, expr2)

where expr1 represents the character to trim and expr2 represents the string expression to be trimmed.

RWDBExpr rwdbTrimLeading ( const RWDBExpr expr1,
const RWDBExpr expr2 
)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

TRIM_LEADING(expr1, expr2)

where expr1 represents the character to trim and expr2 represents the string expression to be trimmed.

RWDBExpr rwdbTrimTrailing ( const RWDBExpr expr1,
const RWDBExpr expr2 
)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

TRIM_TRAILING(exp1, expr2)

where expr1 represents the character to trim and expr2 represents the string expression to be trimmed.

RWDBExpr rwdbUpper ( const RWDBExpr expr)
related

Returns an RWDBExpr representing the database-specific equivalent of the SQL function:

UPPER(expr)

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.