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 |
|---|---|
| bool |
IsPrimaryKey
Is this field a primary key in the database
Declaration
public bool IsPrimaryKey { get; }
Property Value
| Type | Description |
|---|---|
| bool |
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 |
|---|---|
| int |
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 |
|---|---|
| bool |
Overrides
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 |
|---|---|
| int |
Overrides
GetMainField()
Information about a database field.
Declaration
public override FieldInfo GetMainField()
Returns
| Type | Description |
|---|---|
| FieldInfo | Information about the database field |
Overrides
IsSameField(FieldInfo)
Compare two FieldInfos
Declaration
public bool IsSameField(FieldInfo rhs)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldInfo | rhs | FieldInfo to check |
Returns
| Type | Description |
|---|---|
| bool | true if false, otherwise false |
ToString()
String output.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | table.fieldname |
Overrides
Operators
operator ==(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 |
|---|---|
| bool |
operator !=(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 |
|---|---|
| bool |