Show / Hide Table of Contents

Class Compare

The Compare class

Inheritance
Object
QueryElement
Restriction
Compare
ArrayCompare
Equal
GreaterThan
GreaterThanOrEqual
LessThan
LessThanOrEqual
Like
NotLike
UnEqual
Implements
ICloneable
Inherited Members
Restriction.And(Restriction)
Restriction.Or(Restriction)
Restriction.RestrictionAnd(Restriction, Restriction)
Restriction.RestrictionOr(Restriction, Restriction)
QueryElement.Clone()
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public abstract class Compare : Restriction, ICloneable

Constructors

Compare(Argument, Argument)

Declaration
protected Compare(Argument left, Argument right)
Parameters
Type Name Description
Argument left

left side of the compare

Argument right

right side of the compare

Remarks

The most important function performed here is the patching and transfer of DataType on the left and right elements. The incoming argument generally has a type derived from the .NET type; this is fine but sometimes not fine-grained enough (does the DateTime actually just represent a Time?). To handle that, we look at the FieldInfo, and transfer its type onto the argument; possibly with some last-minute patching to handle Oracle CLOB storage of what are normal VARCHAR's on all the other databases.

Properties

IsRelationDescription

Does this Equal operation describe a relation where there is a FieldInfo on both sides and one of the sides include a primary key.

Declaration
public bool IsRelationDescription { get; }
Property Value
Type Description
Boolean

Left

Get/Set value for left side of the Compare

Declaration
public Argument Left { get; }
Property Value
Type Description
Argument

Right

Get/Set value for right side of the Compare

Declaration
public Argument Right { get; }
Property Value
Type Description
Argument

Methods

AreAllTablesInvolved(TableInfo, SoTable[])

Declaration
public bool AreAllTablesInvolved(TableInfo mainTable, params SoTable[] tables)
Parameters
Type Name Description
TableInfo mainTable
SoTable[] tables
Returns
Type Description
Boolean

GetInvolvedTables(ref Dictionary<TableInfo, Object>)

Declaration
public void GetInvolvedTables(ref Dictionary<TableInfo, object> tables)
Parameters
Type Name Description
Dictionary<TableInfo, Object> tables

GetSubElements()

Part of visitor pattern defined in abstract class QueryElement

Declaration
protected override QueryElement[] GetSubElements()
Returns
Type Description
QueryElement[]
Overrides
QueryElement.GetSubElements()

GetTypedSubElement<T>()

Return either the Left or Right subelement as a given type, if possible

Declaration
public T GetTypedSubElement<T>()
    where T : class
Returns
Type Description
T
Type Parameters
Name Description
T

IsTableInvolved(TableInfo)

Is the given table involved in the compare operation?

Declaration
public bool IsTableInvolved(TableInfo tableInfo)
Parameters
Type Name Description
TableInfo tableInfo

Table to check if it is involved in the operation.

Returns
Type Description
Boolean

True if the table is involved in the operation.

Implements

System.ICloneable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top