Show / Hide Table of Contents

Class FieldInfo

Information about a database field. This class is mainly used as a base class for the strongly typed subclasses, corresponding to the different field types in use.

Inheritance
Object
QueryElement
Argument
FieldInfo
TypedFieldInfoBase<FieldType>
Implements
ICloneable
IEquatable<FieldInfo>
Inherited Members
Argument.Equal(Argument)
Argument.UnEqual(Argument)
Argument.LessThan(Argument)
Argument.LessThanOrEqual(Argument)
Argument.GreaterThan(Argument)
Argument.GreaterThanOrEqual(Argument)
Argument.Like(Argument)
Argument.Like(String)
Argument.NotLike(Argument)
Argument.NotBetween(Argument, Argument)
Argument.Between(Argument, Argument)
Argument.In(Argument[])
Argument.HasAny(Argument[])
Argument.HasAll(Argument[])
Argument.MissingAny(Argument[])
Argument.MissingAll(Argument[])
Argument.IsNull()
Argument.IsNotNull()
Argument.NotIn(Argument[])
Argument.ToArgumentArray<T>(T[])
Argument.ToArgumentArray<T>(T[], Boolean)
Argument.GetSubElements()
Argument.Alias
Argument.DataType
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public class FieldInfo : Argument, ICloneable, IEquatable<FieldInfo>

Constructors

FieldInfo(TableInfo, FieldDataType, String)

Constructor for class FieldInfo.

Declaration
public FieldInfo(TableInfo parent, FieldDataType dataType, string name)
Parameters
Type Name Description
TableInfo parent

Instance of TableInfo representing the table this field is a member of.

FieldDataType dataType

Datatype of the field.

String name

The name of the field in the database.

Fields

_name

Declaration
protected string _name
Field Value
Type Description
String

_parent

Declaration
protected TableInfo _parent
Field Value
Type Description
TableInfo

Properties

DbName

The name of the field in the database.

Declaration
public string DbName { get; }
Property Value
Type Description
String

The name of the db.

Definition

Return the deployed dictionary information for the field

Declaration
public SoField Definition { get; }
Property Value
Type Description
SoField
Remarks

Dictionary information is not available for dictionary tables, and for HasNoDefinition=true fields.

HasNoDefinition

If this property is set, then this FieldInfo object does NOT have any corresponding SoField, and properties referring to the definition will fail. This property is true only for fields that represent not-in-dictionary database columns.

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

IsPrimaryKey

Is this field a primary key in the database

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

Name

The name of the field in the database.

Declaration
public string Name { get; }
Property Value
Type Description
String

The name.

Parent

Instance of TableInfo representing the table this field is a member of.

Declaration
public TableInfo Parent { get; }
Property Value
Type Description
TableInfo

The parent tableinfo

Size

Length of the field in the database.

Declaration
public override int Size { get; }
Property Value
Type Description
Int32
Overrides
Argument.Size

Methods

Clone()

Memberwise Clone of this object

Declaration
public override object Clone()
Returns
Type Description
Object

Copy of the fieldinfo that points to the same parent table.

Overrides
QueryElement.Clone()

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
Object.Equals(Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
Object.GetHashCode()

GetMainField()

Declaration
public override FieldInfo GetMainField()
Returns
Type Description
FieldInfo
Overrides
Argument.GetMainField()

IsSameField(FieldInfo)

Compare two FieldInfos

Declaration
public bool IsSameField(FieldInfo rhs)
Parameters
Type Name Description
FieldInfo rhs

FieldInfo to check

Returns
Type Description
Boolean

true if false, otherwise false

ToString()

String output.

Declaration
public override string ToString()
Returns
Type Description
String

table.fieldname

Overrides
Object.ToString()

Operators

Equality(FieldInfo, FieldInfo)

Declaration
public static bool operator ==(FieldInfo a, FieldInfo b)
Parameters
Type Name Description
FieldInfo a
FieldInfo b
Returns
Type Description
Boolean

Inequality(FieldInfo, FieldInfo)

Declaration
public static bool operator !=(FieldInfo a, FieldInfo b)
Parameters
Type Name Description
FieldInfo a
FieldInfo b
Returns
Type Description
Boolean

Explicit Interface Implementations

IEquatable<FieldInfo>.Equals(FieldInfo)

Declaration
bool IEquatable<FieldInfo>.Equals(FieldInfo other)
Parameters
Type Name Description
FieldInfo other
Returns
Type Description
Boolean

Implements

System.ICloneable
System.IEquatable<T>

Extension Methods

EnumUtil.MapEnums<From, To>(From)
SoDuplicateChecker.CheckIfFieldHasValue(FieldInfo, Object, Int32[])
SoDuplicateChecker.TryGetPrimaryKey(FieldInfo, Object, out Int32, Int32[])
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top