Click or drag to resize

Expression Class

Expression class which defines field expressions which are applied to fields in a select list, in update queries or in field predicates.
Valid expressions: FieldField ExOp FieldField ExOp ValueField ExOp ExpressionValue ExOp FieldValue ExOp ExpressionExpression ExOp FieldExpression ExOp Value Use one of the constructors to create the particular expression object.
Inheritance Hierarchy
SystemObject
  SD.LLBLGen.Pro.ORMSupportClassesExpression

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.9.0.0 (5.9.0)
Syntax
[SerializableAttribute]
public class Expression : IExpression, IExpressionInterpret, 
	IXmlSerializable, ISerializable

The Expression type exposes the following members.

Constructors
  NameDescription
Public methodExpression
CTor
Public methodExpression(IEntityFieldCore)
CTor for single field expressions.
Protected methodExpression(SerializationInfo, StreamingContext)
Initializes a new instance of the Expression class.
Public methodExpression(Object, ExOp, IEntityFieldCore)
CTor for value operator field expressions.
Public methodExpression(Object, ExOp, IExpression)
CTor for value operator (expression) expressions
Public methodExpression(IEntityFieldCore, ExOp, IEntityFieldCore)
CTor for field operator field expressions.
Public methodExpression(IEntityFieldCore, ExOp, IExpression)
CTor for field operator (expression) expressions.
Public methodExpression(IEntityFieldCore, ExOp, Object)
CTor for field operator value expressions.
Public methodExpression(IExpression, ExOp, IEntityFieldCore)
CTor for (expression) operator field expressions.
Public methodExpression(IExpression, ExOp, IExpression)
CTor for (expression) operator (expression) expressions.
Public methodExpression(IExpression, ExOp, Object)
CTor for (expression) operator value expressions.
Top
Properties
  NameDescription
Public propertyDatabaseSpecificCreator
Object which will be used to create valid parameter objects, field names, including prefix/postfix characters, and conversion routines, and field names, including prefix/postfix characters. Uses the strategy pattern so the generic code can work with more than one target database.
Public propertyLeftOperand
Gets the left expression operand. Set by the constructor used.
Public propertyOperator
Gets the operator of the expression. Not valid (ExOp.None) if RightOperand is null. Set by the constructor used.
Public propertyParameters
The list of parameters created when the Expression was translated to text usable in a query. Only valid after a succesful call to ToQueryText
Public propertyRightOperand
Gets the right expression operand. Set by the constructor used. Can be null
Top
Methods
  NameDescription
Protected methodConvertObjectOperandToExpressionElement
Converts the object operand to expression element.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetObjectData
Populates a SerializationInfo with the data needed to serialize the target object.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOperandToValue
Resolves the passed in operand to its value at runtime.
Protected methodPerformGetValue
Produces the value for this expression for the entity passed in. This routine is used by IExpressionInterpret.GetValue and is used to evaluate an expression at runtime for in-memory filtering/sorting.
Public methodToQueryText
Retrieves a ready to use text representation of the contained expression.
Public methodToQueryText(Boolean)
Retrieves a ready to use text representation of the contained expression.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Operators
  NameDescription
Public operatorStatic memberAddition(Object, Expression)
Operator overload for the '+' operator to produce an Expression which represents value + expression
Public operatorStatic memberAddition(Expression, Expression)
Operator overload for the '+' operator to produce an Expression which represents expression + expression
Public operatorStatic memberAddition(Expression, Object)
Operator overload for the '+' operator to produce an Expression which represents expression + value
Public operatorStatic memberDivision(Object, Expression)
Operator overload for the '/' operator to produce an Expression which represents value / expression
Public operatorStatic memberDivision(Expression, Expression)
Operator overload for the '/' operator to produce an Expression which represents expression / expression
Public operatorStatic memberDivision(Expression, Object)
Operator overload for the '/' operator to produce an Expression which represents expression / value
Public operatorStatic memberMultiply(Object, Expression)
Operator overload for the '*' operator to produce an Expression which represents value * expression
Public operatorStatic memberMultiply(Expression, Expression)
Operator overload for the '*' operator to produce an Expression which represents expression * expression
Public operatorStatic memberMultiply(Expression, Object)
Operator overload for the '*' operator to produce an Expression which represents expression * value
Public operatorStatic memberSubtraction(Object, Expression)
Operator overload for the '-' operator to produce an Expression which represents value - expression
Public operatorStatic memberSubtraction(Expression, Expression)
Operator overload for the '-' operator to produce an Expression which represents expression - expression
Public operatorStatic memberSubtraction(Expression, Object)
Operator overload for the '-' operator to produce an Expression which represents expression - value
Top
Extension Methods
  NameDescription
Public Extension MethodAdd
Creates a new expression: leftoperand + rightoperand
(Defined by ExpressionExtensionMethods.)
Public Extension MethodAddDays
Defines the mapping for the expression.AddDays(numberOfDays) method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodAddHours
Defines the mapping for the expression.AddHours(numberOfHours) method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodAddMilliseconds
Defines the mapping for the expression.AddMilliseconds(numberOfMilliseconds) method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodAddMinutes
Defines the mapping for the expression.AddMinutes(numberOfMinutes) method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodAddMonths
Defines the mapping for the expression.AddMonths(numberOfMonths) method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodAddSeconds
Defines the mapping for the expression.AddSeconds(numberOfSeconds) method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodAddYears
Defines the mapping for the expression.AddYears(numberOfYears) method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodAnd
Creates a new expression: leftoperand AND rightoperand
(Defined by ExpressionExtensionMethods.)
Public Extension MethodAs
Specifies the specified alias on the expression specified.
(Defined by ExpressionExtensionMethods.)
Public Extension MethodAscending
Creates an ascending sort clause for the expression specified
(Defined by SortClauseProducers.)
Public Extension MethodAvg
Places the Avg aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodAvgDistinct
Places the Avg(Distinct) aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodBetween
Creates a Between predicate which is true if the result of the expression specified is between valueBegin and valueEnd, valueBegin and valueEnd included.
(Defined by BetweenPredicateProducers.)
Public Extension MethodBitwiseAnd
Creates a new expression: leftoperand BitwiseAnd rightoperand
(Defined by ExpressionExtensionMethods.)
Public Extension MethodBitwiseOr
Creates a new expression: leftoperand BitwiseOr rightoperand
(Defined by ExpressionExtensionMethods.)
Public Extension MethodBitwiseXor
Creates a new expression: leftoperand BitwiseXor rightoperand
(Defined by ExpressionExtensionMethods.)
Public Extension MethodCastToTResult
Specifies the result type of the expression to be TResult
(Defined by ExpressionExtensionMethods.)
Public Extension MethodChar
Defines the mapping for the expression.Char[index] property to method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodContains(String)Overloaded.
Creates a Like predicate using the pattern: '%pattern%' for the expression specified.
(Defined by StringMethodPredicateProducers.)
Public Extension MethodContains(String, NullableChar)Overloaded.
Creates a Like predicate using the pattern: '%pattern%' for the expression specified.
(Defined by StringMethodPredicateProducers.)
Public Extension MethodCount
Places the Count aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodCountBig
Places the CountBig aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodCountBigDistinct
Places the CountBig(Distinct) aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodCountDistinct
Places the Count(Distinct) aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodDate
Defines the mapping for the expression.Date property to method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodDay
Defines the mapping for the expression.Day property to method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodDescending
Creates a descending sort clause for the expression specified
(Defined by SortClauseProducers.)
Public Extension MethodDiv
Creates a new expression: leftoperand / rightoperand
(Defined by ExpressionExtensionMethods.)
Public Extension MethodEndsWith
Creates a Like predicate using the pattern: '%pattern' for the expression specified.
(Defined by StringMethodPredicateProducers.)
Public Extension MethodEqual(Object)Overloaded.
Creates an equality comparison predicate between the expression and the value specified. If the value is null or DBNull.Value a null comparison predicate is created
(Defined by EqualOpPredicateProducers.)
Public Extension MethodEqual(IEntityFieldCore)Overloaded.
Creates an equality comparison predicate between the expression and the field specified.
(Defined by EqualOpPredicateProducers.)
Public Extension MethodEqual(IExpression)Overloaded.
Creates an equality comparison predicate between the two expressions specified.
(Defined by EqualOpPredicateProducers.)
Public Extension MethodGreaterEqual(Object)Overloaded.
Creates a greater or equal comparison predicate between the expression and the value specified. If the value is null or DBNull.Value a null comparison predicate is created
(Defined by GreaterEqualOpPredicateProducers.)
Public Extension MethodGreaterEqual(IEntityFieldCore)Overloaded.
Creates a greater or equal comparison predicate between the expression and the field specified.
(Defined by GreaterEqualOpPredicateProducers.)
Public Extension MethodGreaterEqual(IExpression)Overloaded.
Creates a greater or equal comparison predicate between the two expressions specified.
(Defined by GreaterEqualOpPredicateProducers.)
Public Extension MethodGreaterThan(Object)Overloaded.
Creates a greater than comparison predicate between the expression and the value specified. If the value is null or DBNull.Value a null comparison predicate is created
(Defined by GreaterThanOpPredicateProducers.)
Public Extension MethodGreaterThan(IEntityFieldCore)Overloaded.
Creates a greater than comparison predicate between the expression and the field specified.
(Defined by GreaterThanOpPredicateProducers.)
Public Extension MethodGreaterThan(IExpression)Overloaded.
Creates a greater than comparison predicate between the two expressions specified.
(Defined by GreaterThanOpPredicateProducers.)
Public Extension MethodHour
Defines the mapping for the expression.Hour property to method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodIn(Object)Overloaded.
Creates a Field IN (values) predicate
(Defined by InPredicateProducers.)
Public Extension MethodIn(DynamicQuery)Overloaded.
Creates a Field IN (query) predicate
(Defined by InPredicateProducers.)
Public Extension MethodIndexOf
Defines the mapping for the expression.IndexOf(value) method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodIsNotNull
Generates a negated FieldCompareNull predicate on the expression specified.
(Defined by IsNullPredicateProducers.)
Public Extension MethodIsNull
Generates a FieldCompareNull predicate on the expression specified.
(Defined by IsNullPredicateProducers.)
Public Extension MethodLength
Defines the mapping for the expression.Length property to method mapping, if expression represents a string value.
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodLesserEqual(Object)Overloaded.
Creates a lesser or equal comparison predicate between the expression and the value specified. If the value is null or DBNull.Value a null comparison predicate is created
(Defined by LesserEqualOpPredicateProducers.)
Public Extension MethodLesserEqual(IEntityFieldCore)Overloaded.
Creates a lesser or equal comparison predicate between the expression and the field specified.
(Defined by LesserEqualOpPredicateProducers.)
Public Extension MethodLesserEqual(IExpression)Overloaded.
Creates a lesser or equal comparison predicate between the two expressions specified.
(Defined by LesserEqualOpPredicateProducers.)
Public Extension MethodLesserThan(Object)Overloaded.
Creates a lesser than comparison predicate between the expression and the value specified. If the value is null or DBNull.Value a null comparison predicate is created
(Defined by LesserThanOpPredicateProducers.)
Public Extension MethodLesserThan(IEntityFieldCore)Overloaded.
Creates a lesser than comparison predicate between the expression and the field specified.
(Defined by LesserThanOpPredicateProducers.)
Public Extension MethodLesserThan(IExpression)Overloaded.
Creates a lesser than comparison predicate between the two expressions specified.
(Defined by LesserThanOpPredicateProducers.)
Public Extension MethodLike
Creates a Like predicate for the expression specified using the pattern specified. The pattern has to contain the wildcards required.
(Defined by StringMethodPredicateProducers.)
Public Extension MethodMax
Places the Max aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodMillisecond
Defines the mapping for the expression.Millisecond property to method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodMin
Places the Min aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodMinute
Defines the mapping for the expression.Minute property to method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodMod
Creates a new expression: leftoperand MOD rightoperand
(Defined by ExpressionExtensionMethods.)
Public Extension MethodMonth
Defines the mapping for the expression.Month property to method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodMul
Creates a new expression: leftoperand * rightoperand
(Defined by ExpressionExtensionMethods.)
Public Extension MethodNotBetween
Creates a Between predicate which is true if the result of the expression specified is not between valueBegin and valueEnd, valueBegin and valueEnd included.
(Defined by BetweenPredicateProducers.)
Public Extension MethodNotEqual(Object)Overloaded.
Creates a negated equality comparison predicate between the expression and the value specified. If the value is null or DBNull.Value a null comparison predicate is created
(Defined by NotEqualOpPredicateProducers.)
Public Extension MethodNotEqual(IEntityFieldCore)Overloaded.
Creates a negated equality comparison predicate between the expression and the field specified.
(Defined by NotEqualOpPredicateProducers.)
Public Extension MethodNotEqual(IExpression)Overloaded.
Creates a negated equality comparison predicate between the two expressions specified.
(Defined by NotEqualOpPredicateProducers.)
Public Extension MethodNotIn(Object)Overloaded.
Creates a NOT (Field IN (values)) predicate
(Defined by InPredicateProducers.)
Public Extension MethodNotIn(DynamicQuery)Overloaded.
Creates a NOT (Field IN (query)) predicate
(Defined by InPredicateProducers.)
Public Extension MethodOr
Creates a new expression: leftoperand Or rightoperand
(Defined by ExpressionExtensionMethods.)
Public Extension MethodReplace
Defines the mapping for the expression.Replace(oldValue, newValue) method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodSecond
Defines the mapping for the expression.Second property to method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodStartsWith
Creates a Like predicate using the pattern: 'pattern%' for the expression specified.
(Defined by StringMethodPredicateProducers.)
Public Extension MethodStDev
Places the StDev aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodStDevDistinct
Places the StDev(Distinct) aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodSub
Creates a new expression: leftoperand - rightoperand
(Defined by ExpressionExtensionMethods.)
Public Extension MethodSubstring(Int32)Overloaded.
Defines the mapping for the expression.Substring(startIndex) method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodSubstring(Int32, Int32)Overloaded.
Defines the mapping for the expression.Substring(startIndex, length) method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodSum
Places the Sum aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodSumDistinct
Places the Sum(Distinct) aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodToLower
Defines the mapping for the expression.ToLower() method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodToUnicode
Defines the mapping for the expression.ToUnicode() method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodToUpper
Defines the mapping for the expression.ToUpper() method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodToValueTValue
Placeholder method which is used in a Select(lambda func) projection inside the lambda to specify the type of the result of the passed in expression.
(Defined by ExpressionExtensionMethods.)
Public Extension MethodTrim
Defines the mapping for the expression.Trim() method mapping
(Defined by FunctionMappingExtensionMethods.)
Public Extension MethodVariance
Places the Variance aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodVarianceDistinct
Places the Variance(Distinct) aggregate function on the expression specified and returns a wrapping field with the expression.
(Defined by AggregateRelatedExtensionMethods.)
Public Extension MethodYear
Defines the mapping for the expression.Year property to method mapping
(Defined by FunctionMappingExtensionMethods.)
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodIXmlSerializableGetSchema
This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the XmlSchemaProviderAttribute to the class.
Explicit interface implementationPrivate methodIXmlSerializableReadXml
Generates an object from its XML representation.
Explicit interface implementationPrivate methodIXmlSerializableWriteXml
Converts an object into its XML representation.
Explicit interface implementationPrivate methodIExpressionReadXml
Deserializes the data on the xml reader into an expression instance
Explicit interface implementationPrivate methodIExpressionWriteXml
Serializes object as xml to the writer specified.
Explicit interface implementationPrivate methodIExpressionInterpretGetValue
Interprets the implementing expression class on the passed in entity.
Top
Remarks
Values are transformed into parameters. The type of the parameter is determined of the field in the expression.
You can also use EntityProperty instances instead of EntityField(2) instances, though the Expression instance then has to be used solely for in-memory actions.
See Also