Represents the result of the set operators Union
, Intersection
, or Difference
applied to RWDBSelector.
More...
#include <rw/db/comsel.h>
Instances of this class are created as the result of the set operators Union
, Intersection
, or Difference
applied to RWDBSelector.
RWDBSelector and RWDBCompoundSelector share the common base class RWDBSelectorBase.
RWDBCompoundSelector::RWDBCompoundSelector | ( | const RWDBCompoundSelector & | csel | ) |
Copy constructor. The created RWDBCompoundSelector shares an implementation with csel.
|
inline |
Returns the SQL equivalent of:
This method returns an SQL statement that would be produced by executing self with an implicit RWDBConnection object. An implicit RWDBConnection object inherits the time zone setting from the producer RWDBDatabase instance. Hence, the time zone setting of the producer RWDBDatabase object will be used for creating the string representations of any RWDateTime instances in self.
The behavior of this method depends upon the RWDBDatabase::verboseAsString() setting in the producer RWDBDatabase instance.
false
, the SQL returned is the same as that passed to the database for execution. This is the default.true
, any placeholders in the returned SQL are replaced with their bound values.true
, the SQL returned by this method may not be a valid SQL statement. However, this method's return value is not necessarily the same SQL that is sent to the database for execution. For example, if an RWDBBlob object is bound, calling this method with RWDBDatabase::verboseAsString() set to true
results in a string with blob data returned as hex numbers, such as 0x0A32F5
.
|
inline |
Returns the SQL equivalent of:
This method returns an SQL statement that would be produced by executing self with conn. The time zone setting of conn will be used for creating string representations of any RWDateTime instances in self.
The behavior of this method depends upon the RWDBDatabase::verboseAsString() setting in the producer RWDBDatabase instance.
false
, the SQL returned is the same as that passed to the database for execution. This is the default.true
, any placeholders in the returned SQL are replaced with their bound values.true
, the SQL returned by this method may not be a valid SQL statement. However, this method's return value is not necessarily the same SQL that is sent to the database for execution. For example, if an RWDBBlob object is bound, calling this method with RWDBDatabase::verboseAsString() set to true
will result in a string with blob data returned as hex numbers, such as 0x0A32F5
.
|
inline |
Returns the SQL equivalent of:
This method returns an SQL statement that would be produced by executing self with an implicit RWDBConnection object. An implicit RWDBConnection object inherits the time zone setting from the producer RWDBDatabase instance. Hence, the time zone setting of the producer RWDBDatabase object will be used for creating the string representations of any RWDateTime instances in self.
The behavior of this method depends on the value of verbose, and is independent of the RWDBDatabase::verboseAsString() setting.
false
, the SQL returned is the same as that passed to the database for execution.true
, any placeholders in the returned SQL are replaced with their bound values although the SQL passed to the database for execution will not be affected.true
may not be a valid SQL statement. However, this is not necessarily the same SQL sent to the database for execution. For example, if an RWDBBlob object is bound, calling this method with verbose as true
will result in a string with blob data returned as hex numbers, such as 0x0A32F5
.
|
inline |
Returns the SQL equivalent of:
This method returns an SQL statement that would be produced by executing self with conn. The time zone setting of conn will be used for creating string representations of any RWDateTime instances in self.
The behavior of this method depends on the value of verbose, and is independent of the RWDBDatabase::verboseAsString() setting.
false
, the SQL returned is the same as that passed to the database for execution.true
, any placeholders in the returned SQL are replaced with their bound values although the SQL passed to the database for execution will not be affected.true
may not be a valid SQL statement. However, this is not necessarily the same SQL sent to the database for execution. For example, if an RWDBBlob object is bound, calling this method with verbose as true
will result in a string with blob data returned as hex numbers, such as 0x0A32F5
.
|
inline |
Returns the RWDBDatabase that produced this selector. If there is no such object, for example, if this RWDBCompoundSelector was produced using invalid RWDBSelector objects, returns an RWDBDatabase with a status of RWDBStatus::notInitialized.
|
inlinevirtual |
Returns an RWDBCompoundSelector that represents the SQL selector:
select-stmt DIFFERENCE
selector
where select-stmt is the SELECT
statement represented by self.
Reimplemented from RWDBSelectorBase.
|
inline |
Returns the error handler attached to self.
|
inline |
Uses a default database connection to submit the SQL SELECT
statement encapsulated by self for execution. There will always be one or more RWDBTable instances in the returned RWDBResult.
|
inline |
Uses the supplied connection to submit the SQL SELECT
statement encapsulated by self for execution. There will always be one or more RWDBTable instances in the returned RWDBResult. This function can behave asynchronously if executed using an asynchronous connection.
|
inlinevirtual |
Returns an RWDBCompoundSelector that represents the SQL selector:
select-stmt INTERSECTION
selector
where select-stmt is the SELECT
statement represented by self.
Reimplemented from RWDBSelectorBase.
|
inline |
Returns true
if self's status is RWDBStatus::ok, otherwise false
. Does not return false
if the previously executed statement failed. You must check the status of the RWDBResult returned from execute() instead of the status of the RWDBCompoundSelector object.
RWDBCompoundSelector& RWDBCompoundSelector::operator= | ( | const RWDBCompoundSelector & | csel | ) |
Assignment operator. Self shares an implementation with csel. Returns a reference to self.
|
inline |
Specifies column as an ORDER BY
column for self. A select statement may have multiple ORDER BY
columns; successive calls to orderBy() and orderByDescending() add ORDER BY
columns to self. The order of orderBy() and orderByDescending() calls is retained. Returns a reference to self.
|
inline |
Specifies columnNumber as an ORDER BY
column for self. A select statement may have multiple ORDER BY
columns; successive calls to orderBy() and orderByDescending() add ORDER BY
columns to self. The order of orderBy() and orderByDescending() calls is retained. Returns a reference to self.
|
inline |
Clears self's ORDER BY
clause. Returns a reference to self.
|
inline |
Specifies column as an ORDER BY DESCENDING
column for self. A select statement may have multiple ORDER BY
columns; successive calls to orderBy() and orderByDescending() add ORDER BY
columns to self. The order of orderBy() and orderByDescending() calls is retained. Returns a reference to self.
|
inline |
Specifies columnNumber as an ORDER BY DESCENDING
column for self. A select statement may have multiple ORDER BY
columns; successive calls to orderBy() and orderByDescending() add ORDER BY
columns to self. The order of orderBy() and orderByDescending() calls is retained. Returns a reference to self.
|
inline |
Produces an RWDBReader that can be used to read data from self one row at a time. Uses a default database connection which is held by the RWDBReader until the RWDBReader is destroyed.
0
, an acceptable default is selected by your Access Module. Please check your Access Module documentation for limitations on the cache size.
|
inline |
Produces an RWDBReader that can be used to read data from self one row at a time. Uses the supplied connection, which is held by the RWDBReader until the RWDBReader is destroyed. This function can behave asynchronously if executed using an asynchronous connection.
0
, an acceptable default is selected by your Access Module. Please check your Access Module documentation for limitations on the cache size.
|
inline |
Installs handler as self's error handler. The supplied handler is inherited by all objects produced by self. By default, an RWDBStatus::ErrorHandler is inherited from the object that produced self; this method overrides the default.
|
inline |
Returns the status of self.
|
inlinevirtual |
Returns an RWDBCompoundSelector that represents the SQL selector:
select-stmt UNION
selector
where select-stmt is the SELECT
statement represented by self. The trailing underscore avoids a conflict with the C++ union
keyword.
Reimplemented from RWDBSelectorBase.
|
inlinevirtual |
Returns an RWDBCompoundSelector that represents the SQL selector:
select-stmt UNION ALL
selector
where select-stmt is the SELECT
statement represented by self.
Reimplemented from RWDBSelectorBase.
Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |