Comunica
    Preparing search index...

    Interface IMetadata<OrderItemsType>

    A type-safe metadata object. This interface still allows other non-standard metadata entries to be added.

    interface IMetadata<OrderItemsType extends RDF.Variable | RDF.QuadTermName> {
        availableOrders?: QueryOperationOrder<OrderItemsType>[];
        canSeek?: boolean;
        cardinality: QueryResultCardinality;
        operationRequired?: boolean;
        order?: TermsOrder<OrderItemsType>;
        pageSize?: number;
        requestTime?: number;
        state: IMetadataValidationState;
        termOrder?: TermsOrder<OrderItemsType>;
        [key: string]: any;
    }

    Type Parameters

    • OrderItemsType extends RDF.Variable | RDF.QuadTermName

    Hierarchy

    • Record<string, any>
      • IMetadata

    Indexable

    • [key: string]: any
    Index

    Properties

    availableOrders?: QueryOperationOrder<OrderItemsType>[]

    All available alternative orders.

    canSeek?: boolean

    Whether the stream can skip ahead within its termOrder instead of being read one binding at a time.

    Only meaningful together with termOrder.

    ISeekableBindingsStream

    An estimate of the number of bindings in the source.

    operationRequired?: boolean

    If the operation that produced this stream must be pushed into a join. This achieves the same as IJoinEntry.operationRequired, but can be expressed in metadata. This is for example set for SERVICE clauses of which the target is still an unbound variable, which can only be evaluated once a bind-join has bound that target.

    The order of the bindings in the stream.

    For example, [{ variable: 'keyA', order: 'asc' }, { variable: 'keyB', order: 'desc' }] indicates that bindings are first sorted first by values of 'keyA' in ascending order, and then by 'keyB' in descending order.

    Order is defined according to the SPARQL order semantics. For ascending order, this corresponds to https./www.w3.org/TR/sparql11-query/#op_lt, otherwise the inverse. For those cases where SPARQL does not define order, the (ascending) order is defined as a lexicographical comparison on the string values of terms, which is defined by termToString from the "rdf-string" package.

    If order is undefined, then the order is unknown.

    pageSize?: number

    The number of bindings per page in the source. This may be undefined for sources that don't do paging.

    requestTime?: number

    The time it takes to request a page in milliseconds. This is the time until the first byte arrives.

    The validity state of this metadata object.

    The order of the bindings in the term order, rather than in the SPARQL order that order follows.

    The term order compares terms on term type, value, datatype, language, and base direction, as compareTerms from @comunica/utils-iterator does, without interpreting literals. Two terms are equal in it exactly if they are equal RDF terms. For example, "10"^^xsd:integer comes before "9"^^xsd:integer in this order.

    If termOrder is undefined, then the bindings are not known to be in the term order.