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.
Inherited Members
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
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.
Declaration
protected string _name
Field Value
Type | Description |
---|---|
String |
_parent
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.
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
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
Equals(Object)
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.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
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.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
GetMainField()
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.
Declaration
public override FieldInfo GetMainField()
Returns
Type | Description |
---|---|
FieldInfo |
Overrides
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 |
Operators
Equality(FieldInfo, 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.
Declaration
public static bool operator ==(FieldInfo a, FieldInfo b)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | a | |
FieldInfo | b |
Returns
Type | Description |
---|---|
Boolean |
Inequality(FieldInfo, 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.
Declaration
public static bool operator !=(FieldInfo a, FieldInfo b)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | a | |
FieldInfo | b |
Returns
Type | Description |
---|---|
Boolean |