summaryrefslogtreecommitdiff
path: root/docs/manpages
diff options
context:
space:
mode:
authorMartyn Russell <martyn@lanedo.com>2014-10-04 16:34:22 +0100
committerMartyn Russell <martyn@lanedo.com>2014-12-10 15:51:35 +0000
commit56f1ae7310273284d32f305c442009e074463f00 (patch)
tree21daca48d47a61360652e9cd252a20df2b314b0a /docs/manpages
parentb193d8e7d8512845351796b7ee30491f50089704 (diff)
downloadtracker-56f1ae7310273284d32f305c442009e074463f00.tar.gz
tracker: Merged utils/tracker-sql/tracker-sql into 'tracker sql ...'
Diffstat (limited to 'docs/manpages')
-rw-r--r--docs/manpages/Makefile.am1
-rw-r--r--docs/manpages/tracker-sparql.11
-rw-r--r--docs/manpages/tracker-sql.148
3 files changed, 50 insertions, 0 deletions
diff --git a/docs/manpages/Makefile.am b/docs/manpages/Makefile.am
index e8006a63c..1651d7727 100644
--- a/docs/manpages/Makefile.am
+++ b/docs/manpages/Makefile.am
@@ -9,6 +9,7 @@ common = \
tracker-daemon.1 \
tracker-search.1 \
tracker-sparql.1 \
+ tracker-sql.1 \
tracker-status.1 \
tracker-store.1 \
tracker-tag.1 \
diff --git a/docs/manpages/tracker-sparql.1 b/docs/manpages/tracker-sparql.1
index 2e5df8cde..f696e86f9 100644
--- a/docs/manpages/tracker-sparql.1
+++ b/docs/manpages/tracker-sparql.1
@@ -356,6 +356,7 @@ $ tracker sparql -q "SELECT ?image ?date WHERE {
.fi
.SH SEE ALSO
+.BR tracker-sql (1),
.BR tracker-store (1),
.BR tracker-info (1).
.TP
diff --git a/docs/manpages/tracker-sql.1 b/docs/manpages/tracker-sql.1
new file mode 100644
index 000000000..9fda4d522
--- /dev/null
+++ b/docs/manpages/tracker-sql.1
@@ -0,0 +1,48 @@
+.TH tracker-sql 1 "October 2014" GNU "User Commands"
+
+.SH NAME
+tracker-sql \- Use SQL to query the Tracker databases.
+
+.SH SYNOPSIS
+.nf
+\fBtracker sql\fR \-q <\fIsql\fR> | \-f <\fIfile\fR>
+.fi
+
+.SH DESCRIPTION
+This command allows probing of the current database. When using
+commands like \fBtracker sparql\fR, the SPARQL used is translated into
+SQL before being run on the database. This allows direct use of the
+database using SQL avoiding the SPARQL engine entirely.
+
+The caller can run a query two ways, either by providing a \fIfile\fR
+with the query or by providing a string with the \fIsql\fR query.
+
+The \fIfile\fR argument can be either a local path or a URI. It also
+does not have to be an absolute path.
+
+.SH OPTIONS
+.TP
+.B \-f, \-\-file\fR=<\fIfile\fR>
+Use a \fIfile\fR with SPARQL content to query. Don't forget to end all
+queries with a semicolon (;) and also to use quotes around table
+names. The quotes are important because most tables are named after
+ontology classes like "nfo:Document" and queries will fail without the
+quotes.
+.TP
+.B \-q, \-\-query\fR=<\fIsql\fR>
+Use a \fIsql\fR string to query the database with.
+
+.SH EXAMPLES
+.TP
+Show first 10 "nfo:Document" entries where the TOC is not NULL:
+.BR
+.nf
+$ tracker sql -q 'SELECT * FROM "nfo:Document" WHERE "nfo:tableOfContents" NOT NULL LIMIT 10;'
+.fi
+
+.SH SEE ALSO
+.BR tracker-sparql (1),
+.BR tracker-store (1),
+.BR tracker-info (1).
+.TP
+.BR http://en.wikipedia.org/wiki/SQL