@comunica/types
Advanced tools
Comparing version 2.0.1-alpha.8.0 to 2.0.1-alpha.9.0
@@ -6,2 +6,3 @@ export * from './Bindings'; | ||
export * from './IDataSource'; | ||
export * from './IJoinEntry'; | ||
export * from './IMetadata'; | ||
@@ -8,0 +9,0 @@ export * from './IPhysicalQueryPlanLogger'; |
@@ -18,2 +18,3 @@ "use strict"; | ||
__exportStar(require("./IDataSource"), exports); | ||
__exportStar(require("./IJoinEntry"), exports); | ||
__exportStar(require("./IMetadata"), exports); | ||
@@ -20,0 +21,0 @@ __exportStar(require("./IPhysicalQueryPlanLogger"), exports); |
@@ -11,7 +11,7 @@ import type { Logger } from '@comunica/core'; | ||
*/ | ||
export declare type QueryStringContext = RDF.QueryStringContext<SourceType> & IQueryContextCommon; | ||
export declare type QueryStringContext = RDF.QueryStringContext & RDF.QuerySourceContext<SourceType> & IQueryContextCommon; | ||
/** | ||
* Query context when an algebra-based query was passed. | ||
*/ | ||
export declare type QueryAlgebraContext = RDF.QueryAlgebraContext<SourceType> & IQueryContextCommon; | ||
export declare type QueryAlgebraContext = RDF.QueryAlgebraContext & RDF.QuerySourceContext<SourceType> & IQueryContextCommon; | ||
/** | ||
@@ -18,0 +18,0 @@ * Common query context interface |
import type * as RDF from '@rdfjs/types'; | ||
import type { AsyncIterator } from 'asynciterator'; | ||
import type { Algebra } from 'sparqlalgebrajs'; | ||
import type { BindingsStream } from './Bindings'; | ||
import type { IActionContext } from './IActionContext'; | ||
@@ -15,4 +17,40 @@ import type { IDataSource } from './IDataSource'; | ||
*/ | ||
export interface IQueryEngine extends RDF.Queryable<QueryFormatType, SourceType, RDF.AllMetadataSupport, QueryType, QueryStringContext, QueryAlgebraContext>, RDF.SparqlQueryable<QueryFormatType, SourceType, QueryStringContext, QueryAlgebraContext, RDF.SparqlResultSupport> { | ||
export interface IQueryEngine extends RDF.StringQueryable<RDF.AllMetadataSupport, QueryStringContext>, RDF.AlgebraQueryable<Algebra.Operation, RDF.AllMetadataSupport, QueryAlgebraContext>, RDF.StringSparqlQueryable<RDF.SparqlResultSupport, QueryStringContext>, RDF.AlgebraSparqlQueryable<Algebra.Operation, RDF.SparqlResultSupport, QueryAlgebraContext> { | ||
/** | ||
* Query the bindings results of a SELECT query. | ||
* @param query A query string or algebra object. | ||
* @param context A context. | ||
*/ | ||
queryBindings: <QueryFormatTypeInner extends QueryFormatType>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext) => Promise<BindingsStream>; | ||
/** | ||
* Query the quad results of a CONSTRUCT or DESCRIBE query. | ||
* @param query A query string or algebra object. | ||
* @param context A context. | ||
*/ | ||
queryQuads: <QueryFormatTypeInner extends QueryFormatType>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext) => Promise<AsyncIterator<RDF.Quad> & RDF.ResultStream<RDF.Quad>>; | ||
/** | ||
* Query the boolean result of an ASK query. | ||
* @param query A query string or algebra object. | ||
* @param context A context. | ||
*/ | ||
queryBoolean: <QueryFormatTypeInner extends QueryFormatType>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext) => Promise<boolean>; | ||
/** | ||
* Execute an UPDATE query. | ||
* @param query A query string or algebra object. | ||
* @param context A context. | ||
*/ | ||
queryVoid: <QueryFormatTypeInner extends QueryFormatType>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext) => Promise<void>; | ||
/** | ||
* Initiate a given query. | ||
* This will produce a future to a query result, which has to be executed to obtain the query results. | ||
* This can reject given an unsupported or invalid query. | ||
* | ||
* This method is prefered in case you don't know beforehand what type of query will be executed, | ||
* or if you require access to the metadata of the results. | ||
* | ||
* @param query A query string or algebra object. | ||
* @param context A context. | ||
*/ | ||
query: <QueryFormatTypeInner extends QueryFormatType>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext) => Promise<QueryType>; | ||
/** | ||
* Explain the given query | ||
@@ -30,3 +68,3 @@ * @param {string | Algebra.Operation} query A query string or algebra. | ||
*/ | ||
getResultMediaTypes: (context: IActionContext) => Promise<Record<string, number>>; | ||
getResultMediaTypes: (context?: IActionContext) => Promise<Record<string, number>>; | ||
/** | ||
@@ -36,3 +74,3 @@ * @param context An optional context. | ||
*/ | ||
getResultMediaTypeFormats: (context: IActionContext) => Promise<Record<string, string>>; | ||
getResultMediaTypeFormats: (context?: IActionContext) => Promise<Record<string, string>>; | ||
/** | ||
@@ -39,0 +77,0 @@ * Convert a query result to a string stream based on a certain media type. |
{ | ||
"name": "@comunica/types", | ||
"version": "2.0.1-alpha.8.0", | ||
"version": "2.0.1-alpha.9.0", | ||
"description": "Typings module for Comunica", | ||
@@ -44,3 +44,3 @@ "lsd:module": true, | ||
}, | ||
"gitHead": "aaf5b7bb8d67de3364618454ed2976fd08052b61" | ||
"gitHead": "a6642f00830bd9ea3f2f39a10b07362b9f518610" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56855
46
530