TRACKER3-SQL(1)

πŸ“¦
version 3.7.3 Β· 5 versions
, in centos-stream 10

okay so bestie πŸ’– this is the tracker3-sql page from the Tracker manual (section 1), and it’s giving direct-database access realness. no SPARQL middleman required, no cap. ✨

✨ NAME ✨

tracker3-sql β€” use SQL to query the Tracker databases. that’s the whole vibe: SQL goes in, database answers come out. πŸ’…

🌸 SYNOPSIS 🌸

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

πŸ’… DESCRIPTION πŸ’…

This command lets you probe the current database. when you use commands like tracker3 sparql, the SPARQL used gets translated into SQL before it runs on the database. this command lets you use the database directly with SQL, avoiding the SPARQL engine entirely. iconic behavior. πŸ‘‘

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. both are valid, bestie. 🫢

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

πŸŽ€ 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. simple as that. πŸ“

πŸ”₯ EXAMPLES πŸ”₯

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

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

πŸ¦‹ SEE ALSO πŸ¦‹


catch you later, bestie πŸ’– this was the Tracker manual page for tracker3-sql, version 3.7.3, dated 10/29/2024. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from