Interface IMetadata<OrderItemsType>

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

interface IMetadata<OrderItemsType> {
    availableOrders?: QueryOperationOrder<OrderItemsType>[];
    cardinality: QueryResultCardinality;
    order?: TermsOrder<OrderItemsType>;
    pageSize?: number;
    requestTime?: number;
    state: IMetadataValidationState;
}

Type Parameters

  • OrderItemsType extends RDF.Variable | RDF.QuadTermName

Hierarchy

  • Record<string, any>
    • IMetadata

Properties

availableOrders?: QueryOperationOrder<OrderItemsType>[]

All available alternative orders.

An estimate of the number of bindings in the source.

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.