SourcePro® API Reference Guide

 
List of all members | Public Member Functions | Related Functions
RWDBJoinExpr Class Reference

Used to build outer join constructs. More...

#include <rw/db/expr.h>

Inheritance diagram for RWDBJoinExpr:
RWDBExpr

Public Member Functions

 RWDBJoinExpr ()
 
 RWDBJoinExpr (const RWDBJoinExpr &jexpr)
 
RWDBJoinExpron (const RWDBCriterion &criterion)
 
RWDBJoinExpron (const RWDBColumn &column)
 
RWDBJoinExproperator= (const RWDBJoinExpr &jexpr)
 
- Public Member Functions inherited from RWDBExpr
 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.)

RWDBJoinExpr rwdbCross (const RWDBTable &, const RWDBTable &)
 
RWDBJoinExpr rwdbInner (const RWDBTable &, const RWDBTable &)
 
RWDBJoinExpr rwdbInner (const RWDBTable &table, const RWDBJoinExpr &jexpr)
 
RWDBJoinExpr rwdbInner (const RWDBJoinExpr &jexpr, const RWDBTable &table)
 
RWDBJoinExpr rwdbInner (const RWDBJoinExpr &, const RWDBJoinExpr &)
 
RWDBJoinExpr rwdbLeftOuter (const RWDBTable &, const RWDBTable &)
 
RWDBJoinExpr rwdbLeftOuter (const RWDBTable &table, const RWDBJoinExpr &jexpr)
 
RWDBJoinExpr rwdbLeftOuter (const RWDBJoinExpr &, const RWDBTable &)
 
RWDBJoinExpr rwdbLeftOuter (const RWDBJoinExpr &, const RWDBJoinExpr &)
 
RWDBJoinExpr rwdbNaturalLeftOuter (const RWDBTable &, const RWDBTable &)
 
RWDBJoinExpr rwdbNaturalLeftOuter (const RWDBTable &table, const RWDBJoinExpr &jexpr)
 
RWDBJoinExpr rwdbNaturalLeftOuter (const RWDBJoinExpr &, const RWDBTable &)
 
RWDBJoinExpr rwdbNaturalLeftOuter (const RWDBJoinExpr &, const RWDBJoinExpr &)
 
RWDBJoinExpr rwdbNaturalOuter (const RWDBTable &, const RWDBTable &)
 
RWDBJoinExpr rwdbNaturalOuter (const RWDBTable &table, const RWDBJoinExpr &jexpr)
 
RWDBJoinExpr rwdbNaturalOuter (const RWDBJoinExpr &, const RWDBTable &)
 
RWDBJoinExpr rwdbNaturalOuter (const RWDBJoinExpr &, const RWDBJoinExpr &)
 
RWDBJoinExpr rwdbNaturalRightOuter (const RWDBTable &, const RWDBTable &)
 
RWDBJoinExpr rwdbNaturalRightOuter (const RWDBTable &table, const RWDBJoinExpr &jexpr)
 
RWDBJoinExpr rwdbNaturalRightOuter (const RWDBJoinExpr &, const RWDBTable &)
 
RWDBJoinExpr rwdbNaturalRightOuter (const RWDBJoinExpr &, const RWDBJoinExpr &)
 
RWDBJoinExpr rwdbOuter (const RWDBTable &, const RWDBTable &)
 
RWDBJoinExpr rwdbOuter (const RWDBTable &table, const RWDBJoinExpr &jexpr)
 
RWDBJoinExpr rwdbOuter (const RWDBJoinExpr &jexpr, const RWDBTable &table)
 
RWDBJoinExpr rwdbOuter (const RWDBJoinExpr &, const RWDBJoinExpr &)
 
RWDBJoinExpr rwdbRightOuter (const RWDBTable &, const RWDBTable &)
 
RWDBJoinExpr rwdbRightOuter (const RWDBTable &table, const RWDBJoinExpr &jexpr)
 
RWDBJoinExpr rwdbRightOuter (const RWDBJoinExpr &, const RWDBTable &)
 
RWDBJoinExpr rwdbRightOuter (const RWDBJoinExpr &, const RWDBJoinExpr &)
 

Additional Inherited Members

- Public Types inherited from RWDBExpr
enum  AsStringControlFlag { normal, suppressTagsOnColumns, noPlaceHolder, placeHolderNotRecommended }
 

Detailed Description

RWDBJoinExpr is created by a set of global functions that generate ANSI SQL outer join syntax. It represents a specialized type of RWDBExpr that is used only for building outer join constructs.

Synopsis
#include <rw/db/expr.h>
See also
RWDBJoinExpr is a special case of RWDBExpr. See RWDBExpr for more details. Also see RWDBColumn.
Example

In this example, an RWDBJoinExpr is created anonymously by the related global function rwdbOuter(), and set as part of the FROM clause.

// Instantiate a table object to represent the first table.
RWDBTable t1 = aDatabase.table("table1");
// Instantiate a table object to represent the second table.
RWDBTable t2 = aDatabase.table("table2");
// Instantiate a selector to represent a join query.
RWDBSelector aSelector = aDB.selector();
// Construct an isolated full outer join expression
// using the global method rwdbOuter().
RWDBJoinExpr join = rwdbOuter(t1, t2);
// Specify the join criterion and attach it to the
// join expression using the on method.
join.on(t1["c1"] == t2["c2"]);
// Explicitly attach the join to the FROM clause
// of the selector.
aSelector.from( join );

Constructor & Destructor Documentation

RWDBJoinExpr::RWDBJoinExpr ( )

The default constructor is provided for convenience. Typically, RWDBJoinExpr instances are obtained through outer join global functions.

RWDBJoinExpr::RWDBJoinExpr ( const RWDBJoinExpr jexpr)

Copy constructor. The created RWDBJoinExpr shares an implementation with jexpr.

Member Function Documentation

RWDBJoinExpr& RWDBJoinExpr::on ( const RWDBCriterion criterion)

Specifies the join condition as self's SQL ON clause. If self already has an ON clause, this method replaces it. Returns a reference to self.

RWDBJoinExpr& RWDBJoinExpr::on ( const RWDBColumn column)

Adds the column to self's SQL USING clause, which specifies the join columns for the join. Returns a reference to self.

RWDBJoinExpr& RWDBJoinExpr::operator= ( const RWDBJoinExpr jexpr)

Assignment operator. Self shares an implementation with jexpr. Returns a reference to self.

Friends And Related Function Documentation

RWDBJoinExpr rwdbCross ( const RWDBTable ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the CROSS JOIN SQL phrase between two tables.

RWDBJoinExpr rwdbInner ( const RWDBTable ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the INNER JOIN SQL phrase between two tables.

RWDBJoinExpr rwdbInner ( const RWDBTable table,
const RWDBJoinExpr jexpr 
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the INNER JOIN SQL phrase between a table and an inner join expression. For databases that support precedence in inner joins, the generated SQL adds precedence to jexpr, such that jexpr is evaluated first before the table is joined.

RWDBJoinExpr rwdbInner ( const RWDBJoinExpr jexpr,
const RWDBTable table 
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the INNER JOIN SQL phrase between an inner join expression and a table. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbInner ( const RWDBJoinExpr ,
const RWDBJoinExpr  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the INNER JOIN SQL phrase between two inner join expressions. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbLeftOuter ( const RWDBTable ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the LEFT OUTER JOIN SQL phrase between two tables.

RWDBJoinExpr rwdbLeftOuter ( const RWDBTable table,
const RWDBJoinExpr jexpr 
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the LEFT OUTER JOIN SQL phrase between a table and an outer join expression. For databases that support precedence in outer joins, the generated SQL adds precedence to jexpr such that jexpr is evaluated first before the table is joined.

RWDBJoinExpr rwdbLeftOuter ( const RWDBJoinExpr ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the LEFT OUTER JOIN SQL phrase between an outer join expression and a table. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbLeftOuter ( const RWDBJoinExpr ,
const RWDBJoinExpr  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the LEFT OUTER JOIN SQL phrase between two outer join expressions. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbNaturalLeftOuter ( const RWDBTable ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL LEFT OUTER JOIN SQL phrase between two tables.

RWDBJoinExpr rwdbNaturalLeftOuter ( const RWDBTable table,
const RWDBJoinExpr jexpr 
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL LEFT OUTER JOIN SQL phrase between a table and an outer join expression. For databases that support precedence in outer joins, the generated SQL adds precedence to jexpr, such that jexpr is evaluated first before the table is joined.

RWDBJoinExpr rwdbNaturalLeftOuter ( const RWDBJoinExpr ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL LEFT OUTER JOIN SQL phrase between an outer join expression and a table. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbNaturalLeftOuter ( const RWDBJoinExpr ,
const RWDBJoinExpr  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL LEFT OUTER JOIN SQL phrase between two outer join expressions. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbNaturalOuter ( const RWDBTable ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL FULL OUTER JOIN SQL phrase between two tables.

RWDBJoinExpr rwdbNaturalOuter ( const RWDBTable table,
const RWDBJoinExpr jexpr 
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL FULL OUTER JOIN SQL phrase between a table and an outer join expression. For databases that support precedence in outer joins, the generated SQL adds precedence to jexpr, such that jexpr is evaluated first before the table is joined.

RWDBJoinExpr rwdbNaturalOuter ( const RWDBJoinExpr ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL FULL OUTER JOIN SQL phrase between an outer join expression and a table. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbNaturalOuter ( const RWDBJoinExpr ,
const RWDBJoinExpr  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL FULL OUTER JOIN SQL phrase between two outer join expressions. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbNaturalRightOuter ( const RWDBTable ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL RIGHT OUTER JOIN SQL phrase between two tables.

RWDBJoinExpr rwdbNaturalRightOuter ( const RWDBTable table,
const RWDBJoinExpr jexpr 
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL RIGHT OUTER JOIN SQL phrase between a table and an outer join expression. For databases that support precedence in outer joins, the generated SQL adds precedence to jexpr, such that jexpr is evaluated first before the table is joined.

RWDBJoinExpr rwdbNaturalRightOuter ( const RWDBJoinExpr ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL RIGHT OUTER JOIN SQL phrase between an outer join expression and a table. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbNaturalRightOuter ( const RWDBJoinExpr ,
const RWDBJoinExpr  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the NATURAL RIGHT OUTER JOIN SQL phrase between two outer join expressions. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbOuter ( const RWDBTable ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the FULL OUTER JOIN SQL phrase between two tables.

RWDBJoinExpr rwdbOuter ( const RWDBTable table,
const RWDBJoinExpr jexpr 
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the FULL OUTER JOIN SQL phrase between a table and an outer join expression. For databases that support precedence in outer joins, the generated SQL adds precedence to jexpr, such that jexpr is evaluated first before the table is joined.

RWDBJoinExpr rwdbOuter ( const RWDBJoinExpr jexpr,
const RWDBTable table 
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the FULL OUTER JOIN SQL phrase between an outer join expression and a table. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbOuter ( const RWDBJoinExpr ,
const RWDBJoinExpr  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the FULL OUTER JOIN SQL phrase between two outer join expressions. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbRightOuter ( const RWDBTable ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the RIGHT OUTER JOIN SQL phrase between two tables.

RWDBJoinExpr rwdbRightOuter ( const RWDBTable table,
const RWDBJoinExpr jexpr 
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the RIGHT OUTER JOIN SQL phrase between a table and an outer join expression. For databases that support precedence in outer joins, the generated SQL adds precedence to jexpr, such that jexpr is evaluated first before the table is joined.

RWDBJoinExpr rwdbRightOuter ( const RWDBJoinExpr ,
const RWDBTable  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the RIGHT OUTER JOIN SQL phrase between an outer join expression and a table. This does not add any precedence to the constructs.

RWDBJoinExpr rwdbRightOuter ( const RWDBJoinExpr ,
const RWDBJoinExpr  
)
related

Returns an RWDBJoinExpr that represents an encapsulation of the RIGHT OUTER JOIN SQL phrase between two outer join expressions. This does not add any precedence to the constructs.

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