@coasys/ad4m / Exports / PropertyMetadataEntry
Interface: PropertyMetadataEntry
Metadata stored for each property via
Property
/
Optional
/
Read Only
/
Flag
Hierarchy
-
↳
PropertyMetadataEntry
Table of contents
Properties
- flag
- getter
- initial
- local
- prologGetter
- prologSetter
- readOnly
- required
- resolveLanguage
- through
- transform
- writable
Properties
flag
• Optional flag: boolean
Defined in
model/decorators.ts:19 (opens in a new tab)
getter
• Optional getter: string
Custom SurrealQL getter to resolve the property value. Use this for custom graph traversals. The expression can reference 'Base' which will be replaced with the instance's base expression. Example: "(<-link[WHERE predicate = 'flux://has_reply'].in.uri)[0]"
Inherited from
Defined in
model/decorators.ts:240 (opens in a new tab)
initial
• Optional initial: string
The initial value of the property. Required if the property is marked as required.
Inherited from
Defined in
model/decorators.ts:207 (opens in a new tab)
local
• Optional local: boolean
Indicates whether the property is stored locally in the perspective and not in the network. Useful for properties that are not meant to be shared with the network.
Inherited from
Defined in
model/decorators.ts:245 (opens in a new tab)
prologGetter
• Optional prologGetter: string
Custom Prolog getter to get the value of the property. If not provided, the default getter will be used.
Inherited from
Defined in
model/decorators.ts:228 (opens in a new tab)
prologSetter
• Optional prologSetter: string
Custom Prolog setter to set the value of the property. Only available if the property is writable.
Inherited from
Defined in
model/decorators.ts:233 (opens in a new tab)
readOnly
• Optional readOnly: boolean
Indicates whether the property is read-only. If true, no setter will be generated. Defaults to false (property is writable).
Inherited from
Defined in
model/decorators.ts:218 (opens in a new tab)
required
• Optional required: boolean
Indicates whether the property is required. If true, an initial value must be provided.
Inherited from
Defined in
model/decorators.ts:212 (opens in a new tab)
resolveLanguage
• Optional resolveLanguage: string
The language used to store the property. Can be the default Literal Language or a custom language address.
Inherited from
PropertyOptions.resolveLanguage
Defined in
model/decorators.ts:223 (opens in a new tab)
through
• Optional through: string
The predicate of the property. All properties must have this option.
Inherited from
Defined in
model/decorators.ts:202 (opens in a new tab)
transform
• Optional transform: (value: any) => any
Type declaration
▸ (value): any
Optional transform function to modify the property value after it is retrieved. This is useful for transforming raw data into a more usable format. The function takes the raw value as input and returns the transformed value.
Parameters
| Name | Type |
|---|---|
value | any |
Returns
any
Inherited from
Defined in
model/decorators.ts:252 (opens in a new tab)
writable
• Optional writable: boolean
Internal computed writable flag (inverse of readOnly) for SDNA/SHACL compatibility