SourcePro® API Reference Guide

Product Documentation:
   SourcePro
Documentation Home
List of all members | Public Member Functions
RWDBAssignment Class Reference

Represents the result of applying the RWDBColumn::assign() method to an RWDBExpr. More...

#include <rw/db/expr.h>

Inheritance diagram for RWDBAssignment:
RWDBExpr RWCollectable

Public Member Functions

 RWDBAssignment (void)
 
 RWDBAssignment (const RWDBColumn &c, const RWDBExpr &e)
 
 RWDBAssignment (const RWDBColumn &c, const RWDBValue &v)
 
RWDBColumn column () const
 
RWDBExpr expression () const
 
RWDBValue value () const
 
- 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
 
- Public Member Functions inherited from RWCollectable
virtual ~RWCollectable ()
 
virtual RWspace binaryStoreSize () const
 
virtual int compareTo (const RWCollectable *) const
 
virtual RWCollectablecopy () const
 
virtual unsigned hash () const
 
virtual RWClassID isA () const
 
virtual bool isEqual (const RWCollectable *t) const
 
virtual RWCollectablenewSpecies () const
 
RWspace recursiveStoreSize () const
 
virtual void restoreGuts (RWFile &)
 
virtual void restoreGuts (RWvistream &)
 
virtual void saveGuts (RWFile &) const
 
virtual void saveGuts (RWvostream &) const
 
RWStringID stringID () const
 

Additional Inherited Members

- Public Types inherited from RWDBExpr
enum  AsStringControlFlag { normal, suppressTagsOnColumns, noPlaceHolder, placeHolderNotRecommended }
 
- Static Public Member Functions inherited from RWCollectable
static RWClassID classID (const RWStringID &name)
 
static RWClassID classIsA ()
 
static bool isAtom (RWClassID id)
 
static RWspace nilStoreSize ()
 

Detailed Description

RWDBAssignment is the result of applying the RWDBColumn::assign() method to an RWDBExpr. The result is an encapsulation of the SQL SET column = expression phrase, where column refers to the RWDBColumn instance whose assign() method produced the RWDBAssignment, and expression refers to its parameter. RWDBAssignment is used only to build instances of RWDBUpdater.

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

RWDBAssignment is a special case of RWDBExpr. See RWDBExpr for details.

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

Example

This example adds the phrase SET name = 'Joe' to an RWDBUpdater for the Names table. To do this, an RWDBAssignment instance is created anonymously:

RWDBTable Names = myDbase.table("Names");
RWDBUpdater update = Names.updater();
update << Names["name"].assign("Joe");

Constructor & Destructor Documentation

RWDBAssignment::RWDBAssignment ( void  )

Constructs a default RWDBAssignment. Provided for convenience only.

RWDBAssignment::RWDBAssignment ( const RWDBColumn c,
const RWDBExpr e 
)

Constructs an RWDBAssignment from an RWDBColumn and an RWDBExpr. Self then emulates the SQL construct SET c = e.

RWDBAssignment::RWDBAssignment ( const RWDBColumn c,
const RWDBValue v 
)

Constructs an RWDBAssignment from an RWDBColumn and an RWDBValue. Self then emulates the SQL construct SET c = v.

Member Function Documentation

RWDBColumn RWDBAssignment::column ( ) const

Returns the RWDBColumn associated with self.

RWDBExpr RWDBAssignment::expression ( ) const

Returns the RWDBExpr associated with self.

RWDBValue RWDBAssignment::value ( ) const

Returns the RWDBValue associated with self.

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