rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWDBAssignment Class Reference
[Expressions]

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

#include <rw/db/expr.h>

Inheritance diagram for RWDBAssignment:
RWDBExpr RWCollectable

List of all members.

Public Member Functions

 RWDBAssignment (void)
 RWDBAssignment (const RWDBColumn &c, const RWDBExpr &e)
 RWDBAssignment (const RWDBColumn &c, const RWDBValue &v)
RWDBColumn column () const
RWDBValue value () const
RWDBExpr expression () const

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>

Related Classes

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

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

Examples

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.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.