Click or drag to resize

ScalarQueryExpression Class

Class which implements a scalar query which is usable inside an expression. This expression assumes the query formulated will result in a single value. If that's not the case, use the overload of the CTor which accepts a value for forceRowLimit or set its ForceRowLimit property to true (default: false). If forceRowLimit is set to true, a TOP 1 clause will be emitted into the query to force the query to result into a single value. Normally you don't need to do this as a scalar query has to be formulated as a single value anyway.
Inheritance Hierarchy
SystemObject
  SD.LLBLGen.Pro.ORMSupportClassesScalarQueryExpression

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.8.0.0 (5.8.21.0111)
Syntax
[SerializableAttribute]
public class ScalarQueryExpression : IScalarQueryExpression, 
	IExpression, IXmlSerializable

The ScalarQueryExpression type exposes the following members.

Constructors
  NameDescription
Public methodScalarQueryExpression
Initializes a new instance of the ScalarQueryExpression class. For deserialization purposes.
Public methodScalarQueryExpression(IEntityFieldCore)
Initializes a new instance of the ScalarQueryExpression class.
Public methodScalarQueryExpression(IEntityFieldCore, IPredicate)
Initializes a new instance of the ScalarQueryExpression class.
Public methodScalarQueryExpression(IEntityFieldCore, IPredicate, IRelationCollection)
Initializes a new instance of the ScalarQueryExpression class.
Public methodScalarQueryExpression(IEntityFieldCore, IPredicate, ISortExpression)
Initializes a new instance of the ScalarQueryExpression class.
Public methodScalarQueryExpression(IEntityFieldCore, IPredicate, IRelationCollection, ISortExpression)
Initializes a new instance of the ScalarQueryExpression class.
Public methodScalarQueryExpression(IEntityFieldCore, IPredicate, IRelationCollection, Boolean)
Initializes a new instance of the ScalarQueryExpression class.
Public methodScalarQueryExpression(IEntityFieldCore, IPredicate, IRelationCollection, ISortExpression, IGroupByCollection)
Initializes a new instance of the ScalarQueryExpression class.
Public methodScalarQueryExpression(IEntityFieldCore, IPredicate, IRelationCollection, ISortExpression, IGroupByCollection, Boolean)
Initializes a new instance of the ScalarQueryExpression class.
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 propertyFilterToUse
Gets / sets filterToUse
Public propertyForceRowLimit
Gets / sets ForceRowLimit. If set to true (default: false), it will force a TOP 1 clause to be emitted into the SQL (or equivalent if the db doesn't support TOP)
Public propertyGroupByClause
Gets / sets groupByClause
Public propertyParameters
The list of parameters created when the ScalarQueryExpression was translated to text usable in a query. Only valid after a succesful call to ToQueryText
Public propertyRelationsToUse
Gets / sets relationsToUse
Public propertySelectField
Gets / sets selectField
Public propertySelectFieldPersistenceInfo
Gets / sets selectFieldPersistenceInfo
Public propertySorterToUse
Gets / sets sorterToUse
Top
Methods
  NameDescription
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 methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToQueryText
Retrieves a ready to use text representation of the scalar query
Public methodToQueryText(Boolean)
Retrieves a ready to use text representation of the scalar query
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
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(String)Overloaded.
Specifies the specified alias on the expression specified.
(Defined by ExpressionExtensionMethods.)
Public Extension MethodAs(String)Overloaded.
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 MethodCastToTResultOverloaded.
Specifies the result type of the expression to be TResult
(Defined by ExpressionExtensionMethods.)
Public Extension MethodCastToTResultOverloaded.
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
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 MethodForceRowLimit
Forces the row limit on the scalar query expression specified. A row limit is only required if the query potentially returns more values and it's used in a scope where it's required to return 1 element at most.
(Defined by ScalarQueryExtensionMethods.)
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 MethodToValueTValueOverloaded.
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 MethodToValueTValueOverloaded.
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 scalar query.
(Defined by ScalarQueryExtensionMethods.)
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 propertyIExpressionDatabaseSpecificCreator
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.
Explicit interface implementationPrivate propertyIExpressionLeftOperand
Gets the left expression operand. Set by the constructor used.
Explicit interface implementationPrivate propertyIExpressionOperator
Gets the operator of the expression. Not valid (ExOp.None) if RightOperand is null. Set by the constructor used.
Explicit interface implementationPrivate propertyIExpressionParameters
The list of parameters created when the Expression was translated to text usable in a query. Only valid after a succesful call to ToQueryText
Explicit interface implementationPrivate methodIExpressionReadXml
Deserializes the data on the xml reader into an expression instance
Explicit interface implementationPrivate propertyIExpressionRightOperand
Gets the right expression operand. Set by the constructor used. Can be null
Explicit interface implementationPrivate methodIExpressionToQueryText
Retrieves a ready to use text representation of the contained expression.
Explicit interface implementationPrivate methodIExpressionToQueryText(Boolean)
Retrieves a ready to use text representation of the scalar query
Explicit interface implementationPrivate methodIExpressionWriteXml
Serializes object as xml to the writer specified.
Top
See Also