@jahed/sparql-engine
Version:
SPARQL query engine for servers and web browsers.
60 lines (59 loc) • 1.82 kB
TypeScript
import type { EngineTriple } from "../../types.ts";
/**
* Build an URI under the <http://www.bigdata.com/queryHints#> namespace
* @param suffix - Suffix append to the HINT namespace
* @return A new URI under the HINT namespace
*/
export declare function HINT(suffix: string): string;
/**
* Scopes of a query hint, i.e., Query or Basic Graph pattern
*/
type QueryHintScope = number;
export declare const QUERY_HINT_SCOPE: {
QUERY: number;
BGP: number;
};
/**
* Types of query hints
*/
type QueryHint = number;
export declare const QUERY_HINT: {
USE_HASH_JOIN: number;
USE_SYMMETRIC_HASH_JOIN: number;
SORTED_TRIPLES: number;
};
export declare class QueryHints {
protected _bgpHints: Map<QueryHint, boolean>;
constructor();
/**
* Clone the set of query hints
* @return The cloned set of query hints
*/
clone(): QueryHints;
/**
* Merge the current hints with another set of hints
* @param other - Query hints to merge with
* @return The merged set of query hints
*/
merge(other: QueryHints): QueryHints;
/**
* Add a query hint to the set
* @param scope - Scope of the hint (Query, BGP, etc)
* @param hint - Type of hint
*/
add(scope: QueryHintScope, hint: QueryHint): void;
/**
* Test if a hint exists
* @param scope - Scope of the hint (Query, BGP, etc)
* @param hint - Type of hint
* @return True if the hint exists, False otherwise
*/
has(scope: QueryHintScope, hint: QueryHint): boolean;
/**
* Serialize the set of query hints into a string
* @return A string which represents the set of query hints
*/
toString(): string;
}
export declare function parseHints(bgp: EngineTriple[], previous?: QueryHints): [EngineTriple[], QueryHints];
export {};