FDO SDK API Reference
    Preparing search index...

    Interface ReadOnlyFDOGraph<RecordType>

    Represents a graph of FDO records, where each node is a record and each edge is a reference from one record to another. Read-only.

    interface ReadOnlyFDOGraph<RecordType extends ReadOnlyFDORecord = FDORecord> {
        findRecord(
            predicate: (r: RecordType) => boolean,
        ): RecordType | undefined;
        getRecord(id: string): RecordType | undefined;
        getRecords(): RecordType[];
        toJSON(): Record<string, Record<string, RecordValue>>[];
        toString(): string;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index
    • Find a record within the graph based on the predicate function. Returns the first match with arbitrary ordering.

      Parameters

      • predicate: (r: RecordType) => boolean

        Function that should evaluate to true for the record that should be returned.

      Returns RecordType | undefined

      the first record that matches the predicate, or undefined if no record matches the predicate

    • Get a record by its local ID or globally unique and registered PID

      Parameters

      • id: string

        local identifier or global PID of the record to retrieve

      Returns RecordType | undefined

      the record when it exists in this graph, or undefined it not