This class defines an expression that can be used in building a predicate, either alone or in conjunction with other expressions. Each expression consists of a variable name, which is the source of the data to be compared (ie: column name, property name, whatever), an operator (>, <, etc), and a comparison value.
More...
|
object | Tag [get, set] |
| Arbitrary value useful to consumers that might need to track an individual expression for later identification. More...
|
|
int | PrecedenceLevel [get, set] |
| Gets or sets (internal only) the precedence level. More...
|
|
string | Variable [get, set] |
| The name of the variable being tested. The value must be alphanumeric and cannot be null or empty. More...
|
|
string | VariableDisplay [get, set] |
| The user friendly name of the variable being tested. More...
|
|
PredicateOperators | Operator [get, set] |
| The operator used against the variable and the qualifier. More...
|
|
string | Qualifier [get, set] |
| The qualifier used to test the variable. For some operators this value may be ignored. More...
|
|
System.Data.DbType | VariableType [get, set] |
| The data type of the variable. More...
|
|
bool | IsAnd [get] |
| A helper used to determine if this expression is the And constant. More...
|
|
bool | IsOr [get] |
| A helper used to determine if this expression is the Or constant. More...
|
|
bool | IsBeginPrecedence [get] |
| A helper used to determine if this expression is the BeginPredence constant. More...
|
|
bool | IsEndPrecedence [get] |
| A helper used to determine if this expression is the EndPredence constant. More...
|
|
This class defines an expression that can be used in building a predicate, either alone or in conjunction with other expressions. Each expression consists of a variable name, which is the source of the data to be compared (ie: column name, property name, whatever), an operator (>, <, etc), and a comparison value.
◆ PredicateExpression() [1/3]
Apac.Logic.PredicateExpression.PredicateExpression |
( |
| ) |
|
|
inline |
Creates an empty expression. Use the properties to set it up.
◆ PredicateExpression() [2/3]
Apac.Logic.PredicateExpression.PredicateExpression |
( |
SerializationInfo |
info, |
|
|
StreamingContext |
context |
|
) |
| |
|
inlineprotected |
Deserializes a predicate expression.
- Parameters
-
info | See SerializationInfo. |
context | See StreamingContext. |
◆ PredicateExpression() [3/3]
Apac.Logic.PredicateExpression.PredicateExpression |
( |
string |
variable, |
|
|
PredicateOperators |
op, |
|
|
string |
qualifier, |
|
|
System.Data.DbType |
variableType |
|
) |
| |
|
inline |
Creates a new predicate expression.
- Parameters
-
◆ GetObjectData()
void Apac.Logic.PredicateExpression.GetObjectData |
( |
SerializationInfo |
info, |
|
|
StreamingContext |
context |
|
) |
| |
|
inline |
Serializes (binary) a predicate set.
- Parameters
-
info | See SerializationInfo. |
context | See StreamingContext. |
◆ GetOperators()
static PredicateOperators [] Apac.Logic.PredicateExpression.GetOperators |
( |
System.Data.DbType |
dataType | ) |
|
|
inlinestatic |
Gets the operators that can be used with the data types that define the system's fields.
- Parameters
-
dataType | The type of data for which operators are needed. |
- Returns
- Returns an array of PredicateOperators that can be used against the give data type.
◆ GetSchema()
System.Xml.Schema.XmlSchema Apac.Logic.PredicateExpression.GetSchema |
( |
| ) |
|
|
inline |
Returns null.
- Returns
- Returns null.
◆ IsExpressionValid()
Allows a caller to validate the qualifier value with the variable type.
- Parameters
-
expression | The expression to be checked. |
- Returns
- Returns
true
if the qualifier works with the variable type, false
if it doesn't.
◆ ReadXml()
void Apac.Logic.PredicateExpression.ReadXml |
( |
System.Xml.XmlReader |
reader | ) |
|
|
inline |
Deserializes the expression from the XmlReader.
- Parameters
-
reader | The reader from which the data is read. |
◆ ToString()
override string Apac.Logic.PredicateExpression.ToString |
( |
| ) |
|
|
inline |
Returns a string reprentation of the expression in a form similar to that used for T-SQL. For a standard binary operator the format is 'variable operator qualifier'.
- Returns
◆ WriteXml()
void Apac.Logic.PredicateExpression.WriteXml |
( |
System.Xml.XmlWriter |
writer | ) |
|
|
inline |
Serializes the expression into the XmlWriter.
- Parameters
-
writer | The writer into which the data will be serialized. |
◆ And
The instance of predicate expression representing a logical AND for conjunctive sets.
◆ BeginPrecedence
The instance of predicate expression representing the beginning of a precedence block (parentheses in SQL).
◆ EndPrecedence
The instance of predicate expression representing the ending of a precedence block (parentheses in SQL).
◆ Or
The instance of predicate expression representing a logical OR for conjunctive sets.
◆ IsAnd
bool Apac.Logic.PredicateExpression.IsAnd |
|
get |
A helper used to determine if this expression is the And constant.
◆ IsBeginPrecedence
bool Apac.Logic.PredicateExpression.IsBeginPrecedence |
|
get |
A helper used to determine if this expression is the BeginPredence constant.
◆ IsEndPrecedence
bool Apac.Logic.PredicateExpression.IsEndPrecedence |
|
get |
A helper used to determine if this expression is the EndPredence constant.
◆ IsOr
bool Apac.Logic.PredicateExpression.IsOr |
|
get |
A helper used to determine if this expression is the Or constant.
◆ Operator
The operator used against the variable and the qualifier.
◆ PrecedenceLevel
int Apac.Logic.PredicateExpression.PrecedenceLevel |
|
getset |
Gets or sets (internal only) the precedence level.
The precedence level.
◆ Qualifier
string Apac.Logic.PredicateExpression.Qualifier |
|
getset |
The qualifier used to test the variable. For some operators this value may be ignored.
◆ Tag
object Apac.Logic.PredicateExpression.Tag |
|
getset |
Arbitrary value useful to consumers that might need to track an individual expression for later identification.
◆ Variable
string Apac.Logic.PredicateExpression.Variable |
|
getset |
The name of the variable being tested. The value must be alphanumeric and cannot be null or empty.
◆ VariableDisplay
string Apac.Logic.PredicateExpression.VariableDisplay |
|
getset |
The user friendly name of the variable being tested.
◆ VariableType
System.Data.DbType Apac.Logic.PredicateExpression.VariableType |
|
getset |
The data type of the variable.
The documentation for this class was generated from the following file:
- /var/lib/jenkins/workspace/apac/APAC/APACCore/Logic/PredicateExpression.cs