TDAWhere

From RemObjects Software

Jump to: navigation, search

This is a Data Abstract Architecture entry
Feel free to add your notes to this topic below.



Overview

The TDAWhere class is used to dynamically build WHERE statements.

File

uDAInterfaces

Declaration

TDAWhere = class;

Properties

Property
Type
Description
Changed Boolean Returns true if the WHERE clause has been changed. This property will not reset to false automatically, but code using the TDAWhere class may set it to false externally after reacting to changes, to keep track of whether the clause changes again. For example, the IDASQLCommand implementations will set this to false when preparing the command with the back-end database, and then use the Changed flag to determine if the command needs to be re-prepared at a later time.
Clause String Holds the text representation of the current WHERE clause.
ClientFields Boolean Indicates whether the field names used when adding condition to the WHERE clause are client side field names (ie field names as defined in the data table), or server side field names (ie field names from the back-end database). When set to true, markers will be stored in the where clause to notify the server side that field names need to be mapped over to the names in the physical database using the column mapping.
DefaultOperator TDADefaultOperator Specifies the default operator that should be used of two conditions are subsequently added to the clause without an explicit call to AddOperator.
Empty Boolean Returns true if the where clause is empty, i.e. does not contain any conditions.
OnChange TNotifyEvent Fires whenever the where clause has changed by adding new conditions to it.


Methods

Method
Description
AddCondition Adds a new condition to the WHERE clause. If no Operator was added previously, the new condition will be connected to the existing clause (if any) using the DefaultOperator.
AddConditions Adds a number of new conditions to the WHERE clause. If no Operator was added previously, the new condition will be connected to the existing clause (if any) using the DefaultOperator.
AddOperator Adds a new operator to the WHERE clause, to connect the previous condition with the next one.
AddText Adds a plain text SQL to the WHERE clause. If no Operator was added previously, the new condition will be connected to the existing clause (if any) using the DefaultOperator.
AddValueGroup Adds an SQL "IN" condition to the WHERE clause. If no Operator was added previously, the new condition will be connected to the existing clause (if any) using the DefaultOperator.
Clear Clears the WHERE clause and removes all previously added conditions.
CloseBracket Adds a closing bracket (parenthesis) to the WHERE clause, to close a group of conditions previously started with OpenBracket.
OpenBracket Adds an opening bracket (parenthesis) to the WHERE clause, to group the following conditions.


See Also


Product: RemObjects Data Abstract
Current version: Data Abstract 'Vinci' (5.0)

ListsGlossaryFeaturesHow ToDriversComponentsToolsSamplesArticlesArchitectureIssues

Personal tools