Click or drag to resize

RecordRestriction Class

Defines a parameterized record restriction that can be applied to queries.
Inheritance Hierarchy
SystemObject
  GSF.Data.ModelRecordRestriction

Namespace: GSF.Data.Model
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.181-beta
Syntax
public class RecordRestriction : IEquatable<RecordRestriction>
View Source

The RecordRestriction type exposes the following members.

Constructors
 NameDescription
Public methodRecordRestriction Creates a new parameterized RecordRestriction with the specified SQL filter expression and parameters.
Top
Properties
 NameDescription
Public propertyItem Gets or sets Parameters field value for the specified index.
Top
Methods
 NameDescription
Public methodClone Creates a deep copy of this record restriction.
Public methodStatic memberClone(RecordRestriction) Creates a deep copy of the source record restriction.
Public methodStatic memberCombineAnd Combines two record restrictions with an AND condition.
Public methodStatic memberCombineOr Combines two record restrictions with an OR condition.
Public methodEquals(Object) Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object))
Public methodEquals(RecordRestriction) Indicates whether the current object is equal to another object of the same type.
Protected methodFinalizeAllows 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.
(Overrides ObjectGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Operators
 NameDescription
Public operatorStatic memberAddition(RecordRestriction, RecordRestriction) Combines two record restrictions with an AND condition.
Public operatorStatic memberBitwiseAnd(RecordRestriction, RecordRestriction) Combines two record restrictions with an AND condition.
Public operatorStatic memberBitwiseOr(RecordRestriction, RecordRestriction) Combines two record restrictions with an OR condition.
Public operatorStatic memberEquality(RecordRestriction, RecordRestriction) Compares to record restrictions for equality.
Public operatorStatic member(String to RecordRestriction) Implicitly converts a String based filter expression into a RecordRestriction.
Public operatorStatic memberInequality(RecordRestriction, RecordRestriction) Compares to record restrictions for inequality.
Top
Fields
 NameDescription
Public fieldFilterExpression Defines filter SQL expression for restriction as a composite format string - does not include WHERE. When escaping is needed for field names, use standard ANSI quotes.
Public fieldParameters Defines restriction parameter values.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
For versatility, values in the Parameters array are mutable, however, this makes the array vulnerable to unintended updates for long-lived instances. Consequently, the normal use-case of record restriction instances should be considered temporal. If an instance needs to be cached, consider use of the Clone function to reduce risk of unintended array updates.
See Also