ECDbMeta Schema

Alias: meta

Version: 4.0.3

Table of contents

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

Is Polymorphic: false

Role Label: is a

Multiplicity: (0..*)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is ancestor of

Multiplicity: (0..*)

Constraint Classes:

ClassHasBaseClasses Sealed RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: is subclass of

Multiplicity: (0..*)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is base class of

Multiplicity: (0..*)

Constraint Classes:

ClassHasCustomAttribute Abstract RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: has custom attribute

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is set on

Multiplicity: (0..*)

Constraint Classes:

ClassOwnsLocalProperties Sealed RelationshipClass

Strength: Embedding

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: locally defines

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined in

Multiplicity: (0..*)

Constraint Classes:

CompositeUnitRefersToUnit Sealed RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: refers to

Multiplicity: (0..*)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is referred to by

Multiplicity: (0..1)

Constraint Classes:

CustomAttributeClassHasInstance Sealed RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: has instance

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is instance of

Multiplicity: (0..*)

Constraint Classes:

CustomAttributeClassHasInstanceOnClass Abstract RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: has instance on

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is instance of

Multiplicity: (0..*)

Constraint Classes:

CustomAttributeClassHasInstanceOnProperty Abstract RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: has instance on

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is instance of

Multiplicity: (0..*)

Constraint Classes:

CustomAttributeClassHasInstanceOnSchema Abstract RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: has instance on

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is instance of

Multiplicity: (0..*)

Constraint Classes:

FormatOwnsCompositeUnits Sealed RelationshipClass

Strength: Embedding

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: contains

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined in

Multiplicity: (0..*)

Constraint Classes:

PhenomenonOwnsUnits Sealed RelationshipClass

Strength: Embedding

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: has

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is of

Multiplicity: (0..*)

Constraint Classes:

PropertyHasCategory Sealed RelationshipClass

Relates the property to its PropertyCategory.

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: is in

Multiplicity: (0..*)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is used by

Multiplicity: (0..1)

Constraint Classes:

PropertyHasCustomAttribute Abstract RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: has custom attribute

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is set on

Multiplicity: (0..*)

Constraint Classes:

PropertyHasEnumeration Sealed RelationshipClass

ECPropertyKind::Enumeration: relates the property to its ECEnumeration.

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: is of type

Multiplicity: (0..*)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is type of

Multiplicity: (0..1)

Constraint Classes:

PropertyHasKindOfQuantity Sealed RelationshipClass

ECPropertyKind::Primitive or ECPropertyKind::PrimitiveArray: relates the property to its KindOfQuantity.

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: has

Multiplicity: (0..*)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is used by

Multiplicity: (0..1)

Constraint Classes:

PropertyHasNavigationRelationshipClassId Sealed RelationshipClass

ECPropertyKind::Navigation: relates the navigation property to its backing RelationshipECClass.

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: is backed by

Multiplicity: (0..*)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is ECRelationshipClass of

Multiplicity: (0..1)

Constraint Classes:

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

Is Polymorphic: false

Role Label: is of type

Multiplicity: (0..*)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is type of

Multiplicity: (0..1)

Constraint Classes:

RelationshipConstraintHasAbstractConstraintClass Sealed RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: defines

Multiplicity: (0..*)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is abstract constraint class of

Multiplicity: (0..1)

Constraint Classes:

RelationshipConstraintHasClasses Sealed RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: contains

Multiplicity: (0..*)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is constraint class of

Multiplicity: (0..*)

Constraint Classes:

RelationshipHasConstraints Sealed RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: defines

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined by

Multiplicity: (2..2)

Constraint Classes:

SchemaHasCustomAttribute Abstract RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: has custom attribute

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is set on

Multiplicity: (0..*)

Constraint Classes:

SchemaHasSchemaReferences Sealed RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: references

Multiplicity: (0..*)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is referenced by

Multiplicity: (0..*)

Constraint Classes:

SchemaOwnsClasses Sealed RelationshipClass

Strength: Embedding

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: contains

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined in

Multiplicity: (0..*)

Constraint Classes:

SchemaOwnsEnumerations Sealed RelationshipClass

Strength: Embedding

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: contains

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined in

Multiplicity: (0..*)

Constraint Classes:

SchemaOwnsFormats Sealed RelationshipClass

Strength: Embedding

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: contains

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined in

Multiplicity: (0..*)

Constraint Classes:

SchemaOwnsKindOfQuantities Sealed RelationshipClass

Strength: Embedding

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: contains

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined in

Multiplicity: (0..*)

Constraint Classes:

SchemaOwnsPhenomena Sealed RelationshipClass

Strength: Embedding

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: contains

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined in

Multiplicity: (0..*)

Constraint Classes:

SchemaOwnsPropertyCategories Sealed RelationshipClass

Strength: Embedding

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: contains

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined in

Multiplicity: (0..*)

Constraint Classes:

SchemaOwnsUnitSystems Sealed RelationshipClass

Strength: Embedding

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: contains

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined in

Multiplicity: (0..*)

Constraint Classes:

SchemaOwnsUnits Sealed RelationshipClass

Strength: Embedding

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: contains

Multiplicity: (1..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined in

Multiplicity: (0..*)

Constraint Classes:

UnitHasInvertedUnit Sealed RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: is inverted by

Multiplicity: (0..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: inverts

Multiplicity: (0..1)

Constraint Classes:

UnitSystemHasUnits Sealed RelationshipClass

Strength: Referencing

Strength Direction: Forward

Source

Is Polymorphic: false

Role Label: has

Multiplicity: (0..1)

Constraint Classes:

Target

Is Polymorphic: false

Role Label: is defined in

Multiplicity: (0..*)

Constraint Classes:

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: 15 May, 2024