Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

tracker-sql (1)

Name

tracker-sql - Use SQL to query the Tracker databases.

Synopsis

tracker sql -q <sql> | -f <file>

Description

tracker-sql(1)                   User Commands                  tracker-sql(1)



NAME
       tracker-sql - Use SQL to query the Tracker databases.


SYNOPSIS
       tracker sql -q <sql> | -f <file>


DESCRIPTION
       This  command  allows  probing of the current database. When using com-
       mands like tracker sparql, the  SPARQL  used  is  translated  into  SQL
       before  being  run on the database. This allows direct use of the data-
       base using SQL avoiding the SPARQL engine entirely.

       The caller can run a query two ways, either by providing  a  file  with
       the query or by providing a string with the sql query.

       The file argument can be either a local path or a URI. It also does not
       have to be an absolute path.


OPTIONS
       -f, --file=<file>
              Use a file 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.

       -q, --query=<sql>
              Use a sql string to query the database with.


EXAMPLES
       Show first 10 "nfo:Document" entries where the TOC is not NULL:

              $ tracker sql -q 'SELECT * FROM "nfo:Document" WHERE "nfo:tableOfContents" NOT NULL LIMIT 10;'



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+--------------------------------+
       |ATTRIBUTE TYPE |        ATTRIBUTE VALUE         |
       +---------------+--------------------------------+
       |Availability   | library/desktop/search/tracker |
       +---------------+--------------------------------+
       |Stability      | Pass-through volatile          |
       +---------------+--------------------------------+

SEE ALSO
       tracker-sparql(1), tracker-store(1), tracker-info(1).

       http://en.wikipedia.org/wiki/SQL



NOTES
       Source code for open source software components in Oracle  Solaris  can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source        was        downloaded         from          https://down-
       load.gnome.org/sources/tracker/2.3/tracker-2.3.6.tar.xz.

       Further information about this software can be found on the open source
       community website at https://www.gnome.org/.



GNU                              October 2014                   tracker-sql(1)