SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 RWDBColumn &column)
 
RWDBJoinExpron (const RWDBCriterion &criterion)
 
RWDBJoinExproperator= (const RWDBJoinExpr &jexpr)
 
- Public Member Functions inherited from RWDBExpr
 RWDBExpr ()
 
 RWDBExpr (char value)
 
 RWDBExpr (const char *value)
 
 RWDBExpr (const RWBasicUString &value)
 
 RWDBExpr (const RWCollection &collection)
 
 RWDBExpr (const RWCString &value)
 
 RWDBExpr (const RWDate &value)
 
 RWDBExpr (const RWDateTime &value)
 
 RWDBExpr (const RWDBBlob &value)
 
 RWDBExpr (const RWDBColumn &column)
 
 RWDBExpr (const RWDBColumn &left, const RWDBExpr &right)
 
 RWDBExpr (const RWDBColumn &left, const RWDBValue &right)
 
 RWDBExpr (const RWDBDateTime &value)
 
 RWDBExpr (const RWDBDuration &value)
 
 RWDBExpr (const RWDBExpr &expr)
 
 RWDBExpr (const RWDBMBString &value)
 
 RWDBExpr (const RWDBSelectorBase &subSelect)
 
 RWDBExpr (const RWDBTable &)
 
 RWDBExpr (const RWDBValue &value, bool usePhraseBook=true)
 
 RWDBExpr (const RWDecimalPortable &value)
 
 RWDBExpr (const RWTime &value)
 
 RWDBExpr (const RWWString &value)
 
 RWDBExpr (const wchar_t *value)
 
 RWDBExpr (double value)
 
 RWDBExpr (float value)
 
 RWDBExpr (int value)
 
 RWDBExpr (long double value)
 
 RWDBExpr (long int value)
 
 RWDBExpr (long long value)
 
 RWDBExpr (RWDBValueManip manip)
 
 RWDBExpr (short value)
 
 RWDBExpr (unsigned char value)
 
 RWDBExpr (unsigned int value)
 
 RWDBExpr (unsigned long int value)
 
 RWDBExpr (unsigned long long value)
 
 RWDBExpr (unsigned short value)
 
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 Symbols

(Note that these are not member symbols.)

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

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);
Used to build outer join constructs.
Definition expr.h:1146
RWDBJoinExpr rwdbOuter(const RWDBTable &, const RWDBTable &)
RWDBJoinExpr & on(const RWDBCriterion &criterion)
Encapsulates the SQL SELECT statement.
Definition select.h:369
RWDBSelector & from(const RWCString &tableName)
Base class for a family of classes that represent the abstract notion of a database table in a number...
Definition table.h:89

Constructor & Destructor Documentation

◆ RWDBJoinExpr() [1/2]

RWDBJoinExpr::RWDBJoinExpr ( )

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

◆ RWDBJoinExpr() [2/2]

RWDBJoinExpr::RWDBJoinExpr ( const RWDBJoinExpr & jexpr)

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

Member Function Documentation

◆ on() [1/2]

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.

◆ on() [2/2]

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.

◆ operator=()

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

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

Friends And Related Symbol Documentation

◆ rwdbCross()

RWDBJoinExpr rwdbCross ( const RWDBTable & ,
const RWDBTable &  )
related

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

◆ rwdbInner() [1/4]

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.

◆ rwdbInner() [2/4]

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.

◆ rwdbInner() [3/4]

RWDBJoinExpr rwdbInner ( const RWDBTable & ,
const RWDBTable &  )
related

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

◆ rwdbInner() [4/4]

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.

◆ rwdbLeftOuter() [1/4]

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.

◆ rwdbLeftOuter() [2/4]

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.

◆ rwdbLeftOuter() [3/4]

RWDBJoinExpr rwdbLeftOuter ( const RWDBTable & ,
const RWDBTable &  )
related

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

◆ rwdbLeftOuter() [4/4]

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.

◆ rwdbNaturalLeftOuter() [1/4]

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.

◆ rwdbNaturalLeftOuter() [2/4]

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.

◆ rwdbNaturalLeftOuter() [3/4]

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.

◆ rwdbNaturalLeftOuter() [4/4]

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.

◆ rwdbNaturalOuter() [1/4]

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.

◆ rwdbNaturalOuter() [2/4]

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.

◆ rwdbNaturalOuter() [3/4]

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.

◆ rwdbNaturalOuter() [4/4]

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.

◆ rwdbNaturalRightOuter() [1/4]

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.

◆ rwdbNaturalRightOuter() [2/4]

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.

◆ rwdbNaturalRightOuter() [3/4]

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.

◆ rwdbNaturalRightOuter() [4/4]

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.

◆ rwdbOuter() [1/4]

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.

◆ rwdbOuter() [2/4]

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.

◆ rwdbOuter() [3/4]

RWDBJoinExpr rwdbOuter ( const RWDBTable & ,
const RWDBTable &  )
related

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

◆ rwdbOuter() [4/4]

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.

◆ rwdbRightOuter() [1/4]

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.

◆ rwdbRightOuter() [2/4]

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.

◆ rwdbRightOuter() [3/4]

RWDBJoinExpr rwdbRightOuter ( const RWDBTable & ,
const RWDBTable &  )
related

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

◆ rwdbRightOuter() [4/4]

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.

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