rdfql_util.pl
- select_results(+Distinct, +Offset, +Limit, +SortBy, -Result, :Goal)
- Calls select_results/8 using Group=[] and Having=true.
- select_results(+Distinct, +Group, +Having, +Aggregates, +Offset, +Limit, +SortBy, -Result, :Goal) is nondet
- Select results for the template Result on backtracking over Goal.
- group_order(+Cols, -GroupedCols) is det[private]
- Group ordering expressions by the same ordering direction. E.g.,
[
ascending(X)
,ascending(Y)
,descending(Z)
] becomes [ascending([X,Y])
,descending([Z])
] - order_by(+Cols, +Results0, -Results) is det[private]
- Order the results. Cols is a list of
ascending(Var)
ordescending(Var)
. Note that the sorting is done with the least importing (right most) order declaration first and relies on the fact that keysort/2 is stable wrt to ordering the values. - sort_key_goal(+ColGroup, -KeyGroup, -Translate)[private]
- sort_key(+Result, -Key) is det
- Determine the sort-key from a result according to the SPARQL
standard:
- undefined/null
- blank nodes
- IRIs
- RDF Literals
a. Numbers are mapped to their value space
b. Other literals are mapped to their plain literal.
Note that this works fine for some types:
- xsd:date and variants
- xsd:boolean
- select_results(+Distinct, +Offset, +Limit, -Result, :Goal)[private]
- Unsorted version. In this case we can avoid first collecting all results.
- apply_offset(+Offset, +AllSolutions, -OffsetSolutions) is det[private]
- apply_limit(+Limit, +AllSolutions, -LimitSolutions) is det[private]
- aggregate(+Group, +Aggregates)[private]
- aggregate_bind(+Aggregation, +State) is det[private]
- aggregate_distinct(+Operation, +Set, -Value)[private]
- aggregate_vars(+AggregateEval, -Aggregates, -Template, -Query) is det[private]
- entailment_module(+Entailment, -Module)
- Find the Prolog module implementing the entailment rules for a semantic web language.