@coasys/ad4m / Exports / PropertyOptions
Interface: PropertyOptions
Hierarchy
-
PropertyOptions
Table of contents
Properties
Properties
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]"
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.
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.
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.
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.
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).
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.
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.
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.
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