import { AttributeType } from "../type/AttributeType"; import { Stream } from "../../../common/util/Stream"; import { Thing } from "./Thing"; import { ThingType } from "../type/ThingType"; import { TypeDBTransaction } from "../../connection/TypeDBTransaction"; import { Concept } from "../Concept"; import ValueType = Concept.ValueType; /** * Attribute is an instance of the attribute type and has a value. This value is fixed and unique for every given instance of the attribute type. * Attributes can be uniquely addressed by their type and value. */ export interface Attribute extends Thing { /** * The type which this Attribute belongs to. */ readonly type: AttributeType; /** * The type of the value which the Attribute instance holds. */ readonly valueType: ValueType; /** * The value which the Attribute instance holds. */ readonly value: boolean | number | string | Date; /** * Retrieves the instances that own this Attribute. * * ### Examples * * ```ts * attribute.getOwners(transaction) * attribute.getOwners(transaction, ownerType) * ``` * * @param transaction - The current transaction * @param ownerType - If specified, filter results for only owners of the given type */ getOwners(transaction: TypeDBTransaction, ownerType?: ThingType): Stream; } export declare namespace Attribute { function proto(relation: Attribute): import("typedb-protocol/proto/concept").Attribute; }