Class Compare
The Compare class
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public abstract class Compare : Restriction, ICloneable
Constructors
Compare(Argument, Argument)
The Compare class
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 |
---|---|
bool |
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, params SoTable[])
The Compare class
Declaration
public bool AreAllTablesInvolved(TableInfo mainTable, params SoTable[] tables)
Parameters
Type | Name | Description |
---|---|---|
TableInfo | mainTable | |
SoTable[] | tables |
Returns
Type | Description |
---|---|
bool |
GetInvolvedTables(ref Dictionary<TableInfo, object>)
The Compare class
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
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 |
---|---|
bool | True if the table is involved in the operation. |