Chris@0
|
1 /* This file is part of ClioPatria.
|
Chris@0
|
2
|
Chris@0
|
3 Author:
|
Chris@0
|
4 HTTP: http://e-culture.multimedian.nl/
|
Chris@0
|
5 GITWEB: http://gollem.science.uva.nl/git/ClioPatria.git
|
Chris@0
|
6 GIT: git://gollem.science.uva.nl/home/git/ClioPatria.git
|
Chris@0
|
7 GIT: http://gollem.science.uva.nl/home/git/ClioPatria.git
|
Chris@0
|
8 Copyright: 2007, E-Culture/MultimediaN
|
Chris@0
|
9
|
Chris@0
|
10 ClioPatria is free software: you can redistribute it and/or modify
|
Chris@0
|
11 it under the terms of the GNU General Public License as published by
|
Chris@0
|
12 the Free Software Foundation, either version 2 of the License, or
|
Chris@0
|
13 (at your option) any later version.
|
Chris@0
|
14
|
Chris@0
|
15 ClioPatria is distributed in the hope that it will be useful,
|
Chris@0
|
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Chris@0
|
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
Chris@0
|
18 GNU General Public License for more details.
|
Chris@0
|
19
|
Chris@0
|
20 You should have received a copy of the GNU General Public License
|
Chris@0
|
21 along with ClioPatria. If not, see <http://www.gnu.org/licenses/>.
|
Chris@0
|
22 */
|
Chris@0
|
23
|
Chris@0
|
24 :- use_module(serql).
|
Chris@0
|
25
|
Chris@0
|
26 test :-
|
Chris@0
|
27 forall(e(N, _), test(N)).
|
Chris@0
|
28
|
Chris@0
|
29 test(N) :-
|
Chris@0
|
30 e(N, Query),
|
Chris@0
|
31 format('~`=t~72|~n'),
|
Chris@0
|
32 format('Query: ~w~n', [Query]),
|
Chris@0
|
33 format('~`=t~72|~n'),
|
Chris@0
|
34 catch(serql_compile(Query, _, []), E, print_message(error, E)).
|
Chris@0
|
35
|
Chris@0
|
36 e(1, 'select x y from').
|
Chris@0
|
37 e(2, 'select x from {x}').
|
Chris@0
|
38 e(3, 'select x from {x} <rdfs:label>').
|
Chris@0
|
39 e(4, 'select x from {x} <rdfs:label> {vp:Subject} using namespace vp <foo>').
|
Chris@0
|
40 e(5, 'select x from {x} <rdfs:label> {vp:Subject} using namespace vp = <foo').
|
Chris@0
|
41 e(6, 'select x from {x} <rdfs:label> {vp:Subject} using namespace vp = <http://foo').
|