sparnatural
Version:
Visual client-side SPARQL query builder and knowledge graph exploration tool
62 lines (61 loc) • 1.28 kB
TypeScript
export interface SparnaturalQueryIfc {
distinct?: boolean;
variables: Array<VariableTerm | VariableExpression>;
order?: Order;
branches: Array<Branch>;
limit?: number;
metadata?: {
id?: string;
lang?: string;
label?: {
[key: string]: string;
};
description?: {
[key: string]: string;
};
[key: string]: any;
};
}
export interface Branch {
line: CriteriaLine;
children: Array<Branch> | [];
optional?: boolean;
notExists?: boolean;
}
export interface VariableTerm {
termType: "Variable";
value: string;
}
export interface VariableExpression {
expression: {
type: "aggregate";
aggregation: string;
distinct: boolean;
expression: VariableTerm;
};
variable: VariableTerm;
}
export interface CriteriaLine {
s: string;
p: string;
o: string;
sType: string;
oType: string;
values: {
label: string;
}[];
}
export declare enum Order {
ASC = "asc",
DESC = "desc",
NOORDER = "noord"
}
export declare enum AggregateFunction {
COUNT = "count",
MAX = "max",
MIN = "min",
SUM = "sum",
GROUP_CONCAT = "group_concat",
SAMPLE = "sample",
AVG = "avg"
}