Class EntitySchemaIndex
Schema index.
Inherited Members
Namespace: Terrasoft.Core.Entities
Assembly: Terrasoft.Core.dll
Syntax
[MetaType("{50F857F9-0AAB-43f1-B83B-25C09A03EC5F}")]
[DesignModeClass(DefNamePrefix = "Index")]
[DesignModeGroup(Name = "General", Position = 1)]
[DesignModeGroup(Name = "Behaviour", Position = 2)]
[DesignModeProperty(Name = "Name", UsageType = DesignModeUsageType.General, OverrideResources = true, Group = "General", Position = 1, IsRequired = true)]
[DesignModeProperty(Name = "IsAutoName", Group = "General", Position = 2, UsageType = DesignModeUsageType.General, MetaPropertyName = "F1")]
[DesignModeProperty(Name = "IsUnique", Group = "Behaviour", Position = 3, UsageType = DesignModeUsageType.General, MetaPropertyName = "F2")]
[DesignModeProperty(Name = "IsClustered", Group = "Behaviour", Position = 4, UsageType = DesignModeUsageType.None, MetaPropertyName = "F3")]
[DesignModeProperty(Name = "Columns", MetaPropertyName = "F4", UsageType = DesignModeUsageType.None)]
public class EntitySchemaIndex : MetaItem, IMetaItem, IMetaDataSerializable, ICloneable
Constructors
EntitySchemaIndex()
Initializes a new EntitySchemaIndex instance.
Declaration
public EntitySchemaIndex()
EntitySchemaIndex(EntitySchemaIndex, Boolean)
Initializes a clone instance of the EntitySchemaIndex.
Declaration
public EntitySchemaIndex(EntitySchemaIndex source, bool isSchemaExtendParent = false)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaIndex | source | The EntitySchemaIndex object, which will be cloned. |
System.Boolean | isSchemaExtendParent | Flag that indicates whether index will be created in the extended or inherited schemes. |
Properties
Columns
Collection of index columns.
Declaration
[MetaTypeProperty("{63B80D74-A95A-4c7f-AC6F-A1E62D1C9A34}")]
public EntitySchemaIndexColumnCollection Columns { get; }
Property Value
Type | Description |
---|---|
EntitySchemaIndexColumnCollection |
GetIndexPrefix
Declaration
public static Func<EntitySchemaColumn, string> GetIndexPrefix { get; set; }
Property Value
Type | Description |
---|---|
System.Func<EntitySchemaColumn, System.String> |
IsAutoName
Indicates that the name is automatically assigned to the index.
Declaration
[MetaTypeProperty("{F3BA1C56-CBAC-4a2d-A295-0FEC1997245A}")]
public bool IsAutoName { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsClustered
Determines whether the index is clustered; that is, it contains values of the indexed columns.
Declaration
[MetaTypeProperty("{BFE98DC4-5462-4d7a-8547-5B1D3EC49AB8}")]
public bool IsClustered { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInherited
Specifies whether the index is inherited.
Declaration
public bool IsInherited { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsUnique
Determines whether the index is unique.
Declaration
[MetaTypeProperty("{4C56168C-83B0-407c-902A-8C28ED1C1AF0}")]
public bool IsUnique { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Name of the schema index.
Declaration
public override string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
NamePrefix
The prefix.
Declaration
public override string NamePrefix { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
ParentCollection
The parent collection.
Declaration
public EntitySchemaIndexCollection ParentCollection { get; }
Property Value
Type | Description |
---|---|
EntitySchemaIndexCollection |
ParentMetaSchema
The parent entity containing the index.
Declaration
public override IMetaSchema ParentMetaSchema { get; set; }
Property Value
Type | Description |
---|---|
IMetaSchema |
Overrides
UId
Identifier of the schema index.
Declaration
[DBMetaTypeProperty(DBMetaInfoItemType.Index, typeof(GuidDBMetaTypeConverter))]
public override Guid UId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
Overrides
Methods
ApplyMetaDataValue(DataReader)
Proofreading the values of the schema index properties from the metadata using the specified DataReader.
Declaration
protected override void ApplyMetaDataValue(DataReader reader)
Parameters
Type | Name | Description |
---|---|---|
DataReader | reader | The DataReader instance that provides metadata proofreading. |
Overrides
Clone()
Returns the clone of the current schema index.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | The clone of the current schema index. |
Overrides
GetIndexName(EntitySchema, EntitySchemaColumn)
Gets generated unique index name by the column of the database table that includes prefix, schema id, and object id.
Declaration
public static string GetIndexName(EntitySchema schema, EntitySchemaColumn column)
Parameters
Type | Name | Description |
---|---|---|
EntitySchema | schema | The EntitySchema instance by which the schema identifier participating in the index name generation is defined. |
EntitySchemaColumn | column | The EntitySchemaColumn instance by which additional parameters are defined to generate an index name. |
Returns
Type | Description |
---|---|
System.String | A string representing the unique name of the index of the database table. |
WriteMetaData(DataWriter)
Records schema index metadata using the DataWriter instance.
Declaration
public override void WriteMetaData(DataWriter writer)
Parameters
Type | Name | Description |
---|---|---|
DataWriter | writer | The DataWriter instance that writes index metadata. |