SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 (const RWDBColumn &c, const RWDBExpr &e)
 
 RWDBAssignment (const RWDBColumn &c, const RWDBValue &v)
 
 RWDBAssignment (void)
 
RWDBColumn column () const
 
RWDBExpr expression () const
 
RWDBValue value () const
 
- 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
 
- 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");
Base class for a family of classes that represent the abstract notion of a database table in a number...
Definition table.h:89
RWDBUpdater updater() const
Encapsulates the SQL UPDATE statement.
Definition updater.h:122

Constructor & Destructor Documentation

◆ RWDBAssignment() [1/3]

RWDBAssignment::RWDBAssignment ( void )

Constructs a default RWDBAssignment. Provided for convenience only.

◆ RWDBAssignment() [2/3]

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() [3/3]

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

◆ column()

RWDBColumn RWDBAssignment::column ( ) const

Returns the RWDBColumn associated with self.

◆ expression()

RWDBExpr RWDBAssignment::expression ( ) const

Returns the RWDBExpr associated with self.

◆ value()

RWDBValue RWDBAssignment::value ( ) const

Returns the RWDBValue associated with self.

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