File: 4s-query.1

package info (click to toggle)
4store 1.1.6%2B20151109-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 82,388 kB
  • sloc: ansic: 65,689; sh: 2,916; perl: 2,245; makefile: 281; python: 213
file content (85 lines) | stat: -rw-r--r-- 2,264 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
.Dd 2009-07-08
.Dt 4S-QUERY 1J 4store
.Os 4store
.Sh NAME
.Nm 4s-query
.Nd Run SPARQL queries on a 4store storage backend
.Sh SYNOPSIS
.Nm
kb-name
.Op Fl f Ar format
.Op Fl O Ar optimisation-level
.Op Fl I Ar insert-mode
.Op Fl r
.Op Fl s Ar soft-limit
.Op Fl b Ar base-URI
.Op Fl e
.Op Fl P 
.Op query
.Bl -tag -width indent
.It Fl f
Set the format to output results it, options are "sparql", "text", "json", and "testcase"
.It Fl "O, \-\-opt-level"
Set the optimisation level of the query engine, in the range 0-3.
.It Fl "I, \-\-insert"
Treat CONSTRUCT statements as INSERT statements. This feature is highly experimental and largely untested.
.It Fl "r, \-\-restricted"
Enable query complexity restriction mode
.It Fl "s, \-\-soft-limit"
Override default soft limit on search breadth
.It Fl "d, \-\-default-graph"
Enable SPARQL default graph support
.It Fl "b, \-\-base"
Set base URI for queries
.It Fl "e, \-\-explain"
Return an explanation of the query planner's decisions
.It Fl "P"
Enable programatic IO mode
.El
.Sh INTERACTIVE MODE
If
.Op query
is omitted then
.Nm
goes into interactive mode, suitable for trying queries from the command line.
.sp
.Fl P
enables programmatic interactive mode, suitable for interfacing with processes via
stdin and stdout. Queries are sent as UTF-8 bytes, terminated with
"#EOQ" on a line of it's own, results are returned, ending with "#EOR".
Interacting with 4store in this way is more efficient than using the SPARQL
protocol, but non-standard.
.Sh SEE ALSO
.Xr 4s-import 1 ,
.Xr 4s-httpd 1 ,
.Xr 4s-backend 1 ,
.Xr 4s-delete-model 1
.Sh STANDARDS
.Nm
implements the SPARQL Query Language specification (aka. SPARQL/Query 1.0) and the SPARQL Result Format specification (aka. SPARQL/Results 1.0).
.sp
Default graph support is no normally enabled, the \-\-default\-graph turns it on, as does specifying FROM <default:> in the query. Data loaded with
.sp
$ 4s-import
.Ar kb
.Fl -add
.Fl m
default:
.Ar uri/filename
.sp
will be added to the default graph.
.Sh EXAMPLES
$
.Nm
.Fl f Ar sparql 
demo 'SELECT * WHERE { ?s ?p ?s } LIMIT 10'
.sp
Return 10 random triples from the knowledgebase "demo" in the SPARQL XML result
format.
.sp
$
.Nm
.Fl P
demo < query.rq
.sp
Run the query in query.rq and output the result to stdout