1tracker-sql(1)                   User Commands                  tracker-sql(1)
2
3
4

NAME

6       tracker-sql - Use SQL to query the Tracker databases.
7
8

SYNOPSIS

10       tracker sql -q <sql> | -f <file>
11
12

DESCRIPTION

14       This  command  allows  probing of the current database. When using com‐
15       mands like tracker sparql, the  SPARQL  used  is  translated  into  SQL
16       before  being  run on the database. This allows direct use of the data‐
17       base using SQL avoiding the SPARQL engine entirely.
18
19       The caller can run a query two ways, either by providing  a  file  with
20       the query or by providing a string with the sql query.
21
22       The file argument can be either a local path or a URI. It also does not
23       have to be an absolute path.
24
25

OPTIONS

27       -f, --file=<file>
28              Use a file with SPARQL content to query. Don't forget to end all
29              queries with a semicolon (;) and also to use quotes around table
30              names. The quotes are important because most  tables  are  named
31              after ontology classes like "nfo:Document" and queries will fail
32              without the quotes.
33
34       -q, --query=<sql>
35              Use a sql string to query the database with.
36
37

EXAMPLES

39       Show first 10 "nfo:Document" entries where the TOC is not NULL:
40
41              $ tracker sql -q 'SELECT * FROM "nfo:Document" WHERE "nfo:tableOfContents" NOT NULL LIMIT 10;'
42
43

SEE ALSO

45       tracker-sparql(1), tracker-store(1), tracker-info(1).
46
47       http://en.wikipedia.org/wiki/SQL
48
49
50
51GNU                              October 2014                   tracker-sql(1)
Impressum