Class SoTable
Table description according to the deployed dictionary and friends. All relevant dictionary bits, naming convetions and preferences are collected and decoded here, to hide the ugly details of history...
Implements
Inherited Members
Namespace: SuperOffice.Data.Dictionary
Assembly: SoDataBase.dll
Syntax
public class SoTable : IEquatable<SoTable>
Remarks
The details around transaction logging are based on the code found DBDLL/DBAS.CPP around line 2800 in the C++ client.
Properties
AdditionalFields
This list contains SoField objects for those fields that are in the database, but were not known at the time the NetServer code was generated. See CodeGenerationState; all these fields are present in the main SoField collection, this list exists as an optimization.
Declaration
public List<SoField> AdditionalFields { get; }
Property Value
Type | Description |
---|---|
List<SoField> |
Remarks
Extra fields only.
AdditionalValues
Additional meta-data on the table key/value dictionary from the DatabaseModel. e.g. "SoftDelete" = "true"
Declaration
public Dictionary<string, string> AdditionalValues { get; }
Property Value
Type | Description |
---|---|
Dictionary<String, String> |
AutoGenerateGuid
Does this table have at least one field that needs to be auto-populated with a GUID on insert?
Declaration
public bool AutoGenerateGuid { get; }
Property Value
Type | Description |
---|---|
Boolean |
DbName
Name of the table in the database
Declaration
public string DbName { get; }
Property Value
Type | Description |
---|---|
String |
DoNotReplicate
Is this table marked with DoNotReplicate in the dictionary
Declaration
public bool DoNotReplicate { get; }
Property Value
Type | Description |
---|---|
Boolean |
FieldLevelLogging
Is this table marked for field-level logging
Declaration
public bool FieldLevelLogging { get; }
Property Value
Type | Description |
---|---|
Boolean |
Fields
Get a list of all the Fields in the deployed dictionary. Including the AdditionalFields
Declaration
public SoField[] Fields { get; }
Property Value
Type | Description |
---|---|
SoField[] |
FreetextIndex
Is this table marked for freetext indexing
Declaration
public bool FreetextIndex { get; }
Property Value
Type | Description |
---|---|
Boolean |
GenerationState
Relation between the generated code in NetServer and the actual database state, applies to both tables and fields
Declaration
public CodeGenerationState GenerationState { get; }
Property Value
Type | Description |
---|---|
CodeGenerationState |
HashCheckFields
Get an enumeration of all fields involved in hash checks, either as source or as the checksum
Declaration
public IEnumerable<SoField> HashCheckFields { get; }
Property Value
Type | Description |
---|---|
IEnumerable<SoField> |
HasSoftDelete
Is Soft Delete support enabled for this table
Declaration
public bool HasSoftDelete { get; }
Property Value
Type | Description |
---|---|
Boolean |
HasTextExtensions
Does this table have at least one field that overruns into the text table, currently active?
Declaration
public bool HasTextExtensions { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsMDOList
Is this table the base table of an MDO list? If true, the MDOListInfo property will tell you more.
Declaration
public bool IsMDOList { get; }
Property Value
Type | Description |
---|---|
Boolean |
Item[FieldInfo]
Get the SoField corresponding to the given FieldInfo object, by its name
Declaration
public SoField this[FieldInfo fieldInfo] { get; }
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo |
Property Value
Type | Description |
---|---|
SoField |
Item[Int32]
Get the SoField located at the given position in the table definition
Declaration
public SoField this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Property Value
Type | Description |
---|---|
SoField |
Item[String]
Get the SoField corresponding to the given field name (not case sensitive)
Declaration
public SoField this[string fieldName] { get; }
Parameters
Type | Name | Description |
---|---|---|
String | fieldName |
Property Value
Type | Description |
---|---|
SoField |
KeepInCache
Is this table marked with KeepInCache in the dictionary
Declaration
public bool KeepInCache { get; }
Property Value
Type | Description |
---|---|
Boolean |
Kind
Kind and origin of table - SuperOffice system; Partner-defined using the SoDictionary; or ExtraTable from Customer Service
Declaration
public SoTable.TableKind Kind { get; }
Property Value
Type | Description |
---|---|
SoTable.TableKind |
MDOListInfo
If IsMDOList is true, this property returns an object that contains a lot of information about the MDO list
Declaration
public ListInfo MDOListInfo { get; }
Property Value
Type | Description |
---|---|
ListInfo |
Name
Conceptual name of the table (the real name of the table, independent of database)
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
NumFields
Get the number of fields in this table
Declaration
public int NumFields { get; }
Property Value
Type | Description |
---|---|
Int32 |
PrivacyTags
Set of privacy tags on the table from the DatabaseModel
Declaration
public HashSet<string> PrivacyTags { get; }
Property Value
Type | Description |
---|---|
HashSet<String> |
ReplicateAreaManagement
Is this table marked with ReplicateAreaManagement in the dictionary
Declaration
public bool ReplicateAreaManagement { get; }
Property Value
Type | Description |
---|---|
Boolean |
ReplicateDown
Is this table marked with ReplicateDown in the dictionary
Declaration
public bool ReplicateDown { get; }
Property Value
Type | Description |
---|---|
Boolean |
ReplicatePrototype
Is this table marked with ReplicatePrototype in the dictionary
Declaration
public bool ReplicatePrototype { get; }
Property Value
Type | Description |
---|---|
Boolean |
ReplicateUp
Is this table marked with ReplicateUp in the dictionary
Declaration
public bool ReplicateUp { get; }
Property Value
Type | Description |
---|---|
Boolean |
SequenceId
ID used for the table in the sequence table. For ForeignKey and TravelTransactionLog entries, TableNumber.
Declaration
public int SequenceId { get; }
Property Value
Type | Description |
---|---|
Int32 |
SoftDeletedDate
Points to the field that is the delete date (soft) for this row
Declaration
public SoField SoftDeletedDate { get; }
Property Value
Type | Description |
---|---|
SoField |
SystemTable
Is this table marked with SystemTable in the dictionary
Declaration
public bool SystemTable { get; }
Property Value
Type | Description |
---|---|
Boolean |
TableNumber
Number used on the table in the database when it is referenced. Examples are TravelTransactionLog and ForeignKey. It is not the same as SequenceId.
Declaration
public int TableNumber { get; }
Property Value
Type | Description |
---|---|
Int32 |
TempTableCreationStamp
If != null, then this is the UTC creation time for this Temporary Table; otherwise, this is not a temporary table
Declaration
public DateTime TempTableCreationStamp { get; }
Property Value
Type | Description |
---|---|
DateTime |
TravelTransactionLog
Should this table be logged to the traveltransactionlog
Declaration
public bool TravelTransactionLog { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Note that replication to prototype does not imply traveltransaction logging, so this is not simply the inverse of the DoNotReplicate flag.
Methods
Equals(SoTable)
Overrided equals comparer that is valid accross database sessions
Declaration
public bool Equals(SoTable other)
Parameters
Type | Name | Description |
---|---|---|
SoTable | other | Object to compare too |
Returns
Type | Description |
---|---|
Boolean | True if equal |
Equals(Object)
Overrided equals comparer that is valid accross database sessions
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | Object to compare too |
Returns
Type | Description |
---|---|
Boolean | True if equal |
Overrides
GetHashCode()
Hash code valid accross database sessions.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | Hash code valid accross database sessions. |
Overrides
GetRelations()
Get all the relations the table is involved in.
Declaration
public IEnumerable<SoRelation> GetRelations()
Returns
Type | Description |
---|---|
IEnumerable<SoRelation> |
GetRelationsWithTable(SoTable)
Get all relations that the table is involved in towards the provided table.
Declaration
public IEnumerable<SoRelation> GetRelationsWithTable(SoTable table)
Parameters
Type | Name | Description |
---|---|---|
SoTable | table | Other table taking part of the relation. |
Returns
Type | Description |
---|---|
IEnumerable<SoRelation> | Relations with the other table. |
GetTableInfo()
Get a new instance of TableInfo representing the defenition of the table.
Declaration
public TableInfo GetTableInfo()
Returns
Type | Description |
---|---|
TableInfo | New instance of TableInfo representing the defenition of the table. |
IsTableRelated(SoTable)
Is this table related to the provided table.
Declaration
public bool IsTableRelated(SoTable table)
Parameters
Type | Name | Description |
---|---|---|
SoTable | table | Table to check if it has relations to. |
Returns
Type | Description |
---|---|
Boolean | True if the two tables are related. |
ToString()
Name of the table for debug purposes.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | Name of the table for debug purposes. |
Overrides
Operators
Equality(SoTable, SoTable)
Declaration
public static bool operator ==(SoTable x, SoTable y)
Parameters
Type | Name | Description |
---|---|---|
SoTable | x | |
SoTable | y |
Returns
Type | Description |
---|---|
Boolean |
Inequality(SoTable, SoTable)
Declaration
public static bool operator !=(SoTable x, SoTable y)
Parameters
Type | Name | Description |
---|---|---|
SoTable | x | |
SoTable | y |
Returns
Type | Description |
---|---|
Boolean |