ECDbMeta Schema
Alias: meta
Version: 4.0.3
Table of contents
- Entity Classes
- Struct Classes
- Relationship Classes
- ClassHasAllBaseClasses
- ClassHasBaseClasses
- ClassHasCustomAttribute
- ClassOwnsLocalProperties
- CompositeUnitRefersToUnit
- CustomAttributeClassHasInstance
- CustomAttributeClassHasInstanceOnClass
- CustomAttributeClassHasInstanceOnProperty
- CustomAttributeClassHasInstanceOnSchema
- FormatOwnsCompositeUnits
- PhenomenonOwnsUnits
- PropertyHasCategory
- PropertyHasCustomAttribute
- PropertyHasEnumeration
- PropertyHasKindOfQuantity
- PropertyHasNavigationRelationshipClassId
- PropertyHasStructType
- RelationshipConstraintHasAbstractConstraintClass
- RelationshipConstraintHasClasses
- RelationshipHasConstraints
- SchemaHasCustomAttribute
- SchemaHasSchemaReferences
- SchemaOwnsClasses
- SchemaOwnsEnumerations
- SchemaOwnsFormats
- SchemaOwnsKindOfQuantities
- SchemaOwnsPhenomena
- SchemaOwnsPropertyCategories
- SchemaOwnsUnitSystems
- SchemaOwnsUnits
- UnitHasInvertedUnit
- UnitSystemHasUnits
- Enumerations
Entity Classes
ClassCustomAttribute Abstract EntityClass 
Can be used to obtain custom attributes which are applied to a class. Example: Obtaining values from inside a custom attribute using json_extract.
<ClassMap xmlns="ECDbMap.2.0.2">
<MapStrategy>TablePerHierarchy</MapStrategy>
</ClassMap>
SELECT ec_classname(ca.Class.Id) [Class], json_extract(ca.Instance, '$.ClassMap.MapStrategy') [MapStrategy]
FROM meta.ClassCustomAttribute ca
WHERE ca.CustomAttributeClass.Id IS (ecdbmap.ClassMap) AND ca.Class.Id IS (ONLY bis.Element) LIMIT 5;
Result
Class |MapStrategy
-----------------------------------------
BisCore:Element |TablePerHierarchy
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Class | navigation | ||
CustomAttributeClass | navigation | ||
Instance | string | Json |
CustomAttribute (CustomAttribute) Sealed EntityClass 
Returns all existing custom attributes, there are specialized versions of this for Property, Class and Schema.
Special class which returns a collection of all custom attributes however, unlike the specialized types e.g. ClassCustomAttribute this is the raw information not separated by container type and the Instance
property holds xml instead of json, which cannot be natively processed using SQLite functions. Use this for lower level queries against custom attributes where the contents of the attribute and the item it is applied to are not needed.
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
ContainerId | long | Id | |
ContainerType | CAContainerType | ||
Ordinal | int | ||
Instance | string | Xml | |
Class | navigation |
ECClassDef (ECClass) Sealed EntityClass 
ECClass
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Schema | navigation | ||
Name | string | ||
DisplayLabel | string | ||
Description | string | ||
Type | ECClassType | ||
Modifier | ECClassModifier | ||
CustomAttributeContainerType | ECClassType::CustomAttribute: Specifies on which containers the custom attribute ECClass can be applied to. | ECCustomAttributeContainerType | |
RelationshipStrength | Applies to ECClassType::Relationship only. | ECRelationshipStrength | |
RelationshipStrengthDirection | Applies to ECClassType::Relationship only. | ECRelationshipDirection |
ECEnumerationDef (ECEnumeration) Sealed EntityClass 
ECEnumeration
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Schema | navigation | ||
Name | string | ||
DisplayLabel | string | ||
Description | string | ||
Type | PrimitiveType | ||
IsStrict | boolean | ||
EnumValues | struct array |
ECPropertyDef (ECProperty) Sealed EntityClass 
ECProperty
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Class | navigation | ||
Name | string | ||
DisplayLabel | string | ||
Description | string | ||
IsReadonly | boolean | ||
Priority | int | ||
Ordinal | Position of the ECProperty in its ECClass | int | |
Kind | ECPropertyKind | ||
PrimitiveType | ECPropertyKind::Primitive: data type. ECPropertyKind::PrimitiveArray: data type of array elements. | PrimitiveType | |
PrimitiveTypeMinLength | Minimum length of strings or blobs. | int | |
PrimitiveTypeMaxLength | Maximum length of strings or blobs. | int | |
PrimitiveTypeMinValue | Minimum value of numeric primitives. | double | |
PrimitiveTypeMaxValue | Maximum value of numeric primitives. | double | |
Enumeration | ECPropertyKind::Primitive: Id of this property's ECEnumerationDef. | navigation | |
ExtendedTypeName | ECPropertyKind::Primitive or ECPropertyKind::PrimitiveArray: Extended type name further describing PrimitiveType. | string | |
StructClass | ECPropertyKind::Struct: ECClassId of property's struct type. ECPropertyKind::StructArray: ECClassId of array element struct type. | navigation | |
KindOfQuantity | ECPropertyKind::Primitive or ECPropertyKind::PrimitiveArray: Id of this property's KindOfQuantityDef. | navigation | |
Category | Id of this property's PropertyCategoryDef. | navigation | |
ArrayMinOccurs | ECPropertyKind::PrimitiveArray or ECPropertyKind::StructArray | int | |
ArrayMaxOccurs | ECPropertyKind::PrimitiveArray or ECPropertyKind::StructArray | int | |
NavigationRelationshipClass | ECPropertyKind::Navigation: ECClassId of property's relationship class. | navigation | |
NavigationDirection | ECPropertyKind::Navigation: Direction to follow the relationship defined in NonPrimitiveTypeClassId. | ECRelationshipDirection |
ECRelationshipConstraintDef Sealed EntityClass 
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
RelationshipClass | navigation | ||
RelationshipEnd | ECRelationshipEnd | ||
MultiplicityLowerLimit | int | ||
MultiplicityUpperLimit | int | ||
IsPolymorphic | boolean | ||
RoleLabel | string | ||
AbstractConstraintClass | ECClassId of base class for constraint classes of this constraint | navigation |
ECSchemaDef (ECSchema) Sealed EntityClass 
ECSchema
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Name | string | ||
DisplayLabel | string | ||
Description | string | ||
Alias | string | ||
VersionMajor | int | ||
VersionWrite | int | ||
VersionMinor | int | ||
OriginalECXmlVersionMajor | int | ||
OriginalECXmlVersionMinor | int |
FormatCompositeUnitDef (FormatCompositeUnit) Sealed EntityClass 
FormatCompositeUnit
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Format | navigation | ||
Label | string | ||
Unit | navigation | ||
Ordinal | Position of the Composite Unit in its Format | int |
FormatDef (Format) Sealed EntityClass 
Format
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Schema | navigation | ||
Name | string | ||
DisplayLabel | string | ||
Description | string | ||
NumericSpec | string | JSON | |
CompositeSpec | CompositeSpec without units. Composite units are held by FormatCompositeUnitDef | string | JSON |
KindOfQuantityDef (KindOfQuantity) Sealed EntityClass 
KindOfQuantity
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Schema | navigation | ||
Name | string | ||
DisplayLabel | string | ||
Description | string | ||
PersistenceUnit | string | ||
RelativeError | double | ||
PresentationUnits | string array |
PhenomenonDef (Phenomenon) Sealed EntityClass 
Phenomenon
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Schema | navigation | ||
Name | string | ||
DisplayLabel | string | ||
Description | string | ||
Definition | string |
PropertyCategoryDef (PropertyCategory) Sealed EntityClass 
PropertyCategory
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Schema | navigation | ||
Name | string | ||
DisplayLabel | string | ||
Description | string | ||
Priority | int |
PropertyCustomAttribute Abstract EntityClass 
Similar to ClassCustomAttribute but returns custom attributes applied to a property.
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Property | navigation | ||
CustomAttributeClass | navigation | ||
Instance | string | Json |
SchemaCustomAttribute Abstract EntityClass 
Similar to ClassCustomAttribute but returns custom attributes applied to a schema.
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Schema | navigation | ||
CustomAttributeClass | navigation | ||
Instance | string | Json |
UnitDef (Unit) Sealed EntityClass 
Unit
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Schema | navigation | ||
Name | string | ||
DisplayLabel | string | ||
Description | string | ||
UnitSystem | navigation | ||
Phenomenon | navigation | ||
Definition | string | ||
Numerator | double | ||
Denominator | double | ||
Offset | double | ||
IsConstant | boolean | ||
InvertingUnit | If this property is set, this UnitDef is an inverted unit. It inverts the unit specified by this property. | navigation |
UnitSystemDef (UnitSystem) Sealed EntityClass 
UnitSystem
Properties
Name | Description | Type | Extended Type |
---|---|---|---|
Schema | navigation | ||
Name | string | ||
DisplayLabel | string | ||
Description | string |
ECEnumeratorDef Sealed StructClass 
Properties
Name | Description | Label | Category | Read Only | Priority |
---|---|---|---|---|---|
Name | false | 0 | |||
DisplayLabel | false | 0 | |||
Description | false | 0 | |||
IntValue | false | 0 | |||
StringValue | false | 0 |
Relationship Classes
ClassHasAllBaseClasses Sealed RelationshipClass 
Relates a given ECClassId (Source) to all its base classes (recursively) (Target). For optimization reasons this ECRelationshipClass also holds a row for each ECClass that points to itself. Base class id order: class itself, then base classes in breadth first manner.
Strength: Referencing
Strength Direction: Forward
Source
Target
ClassHasBaseClasses Sealed RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
ClassHasCustomAttribute Abstract RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
ClassOwnsLocalProperties Sealed RelationshipClass 
Strength: Embedding
Strength Direction: Forward
Source
Target
CompositeUnitRefersToUnit Sealed RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
CustomAttributeClassHasInstance Sealed RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
CustomAttributeClassHasInstanceOnClass Abstract RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
CustomAttributeClassHasInstanceOnProperty Abstract RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
CustomAttributeClassHasInstanceOnSchema Abstract RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
FormatOwnsCompositeUnits Sealed RelationshipClass 
Strength: Embedding
Strength Direction: Forward
Source
Target
PhenomenonOwnsUnits Sealed RelationshipClass 
PropertyHasCategory Sealed RelationshipClass 
Relates the property to its PropertyCategory.
Strength: Referencing
Strength Direction: Forward
Source
Target
PropertyHasCustomAttribute Abstract RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
PropertyHasEnumeration Sealed RelationshipClass 
ECPropertyKind::Enumeration: relates the property to its ECEnumeration.
Strength: Referencing
Strength Direction: Forward
Source
Target
PropertyHasKindOfQuantity Sealed RelationshipClass 
ECPropertyKind::Primitive or ECPropertyKind::PrimitiveArray: relates the property to its KindOfQuantity.
Strength: Referencing
Strength Direction: Forward
Source
Target
PropertyHasNavigationRelationshipClassId Sealed RelationshipClass 
ECPropertyKind::Navigation: relates the navigation property to its backing RelationshipECClass.
Strength: Referencing
Strength Direction: Forward
Source
Target
PropertyHasStructType Sealed RelationshipClass 
ECPropertyKind::Struct: relates the struct property to its struct ECClass. ECPropertyKind::StructArray: relates the struct array property to its array element type.
Strength: Referencing
Strength Direction: Forward
Source
Target
RelationshipConstraintHasAbstractConstraintClass Sealed RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
RelationshipConstraintHasClasses Sealed RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
RelationshipHasConstraints Sealed RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
SchemaHasCustomAttribute Abstract RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
SchemaHasSchemaReferences Sealed RelationshipClass 
Strength: Referencing
Strength Direction: Forward
Source
Target
SchemaOwnsClasses Sealed RelationshipClass 
SchemaOwnsEnumerations Sealed RelationshipClass 
Strength: Embedding
Strength Direction: Forward
Source
Target
SchemaOwnsFormats Sealed RelationshipClass 
SchemaOwnsKindOfQuantities Sealed RelationshipClass 
Strength: Embedding
Strength Direction: Forward
Source
Target
SchemaOwnsPhenomena Sealed RelationshipClass 
Strength: Embedding
Strength Direction: Forward
Source
Target
SchemaOwnsPropertyCategories Sealed RelationshipClass 
Strength: Embedding
Strength Direction: Forward
Source
Target
SchemaOwnsUnitSystems Sealed RelationshipClass 
Strength: Embedding
Strength Direction: Forward
Source
Target
SchemaOwnsUnits Sealed RelationshipClass 
UnitHasInvertedUnit Sealed RelationshipClass 
UnitSystemHasUnits Sealed RelationshipClass 
Enumerations
CAContainerType Enumeration 
Backing Type: int
Strict: true
Label | Value | Description |
---|---|---|
Schema | 1 | |
Class | 30 | |
Property | 992 |
ECClassModifier Enumeration 
Backing Type: int
Strict: true
Label | Value | Description |
---|---|---|
None | 0 | |
Abstract | 1 | |
Sealed | 2 |
ECClassType Enumeration 
Backing Type: int
Strict: true
Label | Value | Description |
---|---|---|
Entity | 0 | |
Relationship | 1 | |
Struct | 2 | |
CustomAttribute | 3 |
ECCustomAttributeContainerType Enumeration 
Backing Type: int
Strict: true
Label | Value | Description |
---|---|---|
Schema | 1 | |
EntityClass | 2 | |
CustomAttributeClass | 4 | |
StructClass | 8 | |
RelationshipClass | 16 | |
AnyClass | 30 | |
PrimitiveProperty | 32 | |
StructProperty | 64 | |
PrimitiveArrayProperty | 128 | |
StructArrayProperty | 256 | |
NavigationProperty | 512 | |
AnyProperty | 992 | |
SourceRelationshipConstraint | 1024 | |
TargetRelationshipConstraint | 2048 | |
AnyRelationshipConstraint | 3072 | |
Any | 4095 |
ECPropertyKind Enumeration 
Backing Type: int
Strict: true
Label | Value | Description |
---|---|---|
Primitive | 0 | |
Struct | 1 | |
PrimitiveArray | 2 | |
StructArray | 3 | |
Navigation | 4 |
ECRelationshipDirection Enumeration 
Backing Type: int
Strict: true
Label | Value | Description |
---|---|---|
Forward | 1 | |
Backward | 2 |
ECRelationshipEnd Enumeration 
Backing Type: int
Strict: true
Label | Value | Description |
---|---|---|
Source | 0 | |
Target | 1 |
ECRelationshipStrength Enumeration 
Backing Type: int
Strict: true
Label | Value | Description |
---|---|---|
Referencing | 0 | |
Holding | 1 | |
Embedding | 2 |
PrimitiveType Enumeration 
Backing Type: int
Strict: true
Label | Value | Description |
---|---|---|
Binary | 257 | |
Boolean | 513 | |
DateTime | 769 | |
Double | 1025 | |
Integer | 1281 | |
Long | 1537 | |
Point2d | 1793 | |
Point3d | 2049 | |
String | 2305 | |
IGeometry | 2561 |
Last Updated: 13 May, 2024