mix fathom.query (fathom v0.1.0)

Copy Markdown View Source

Queries the program database.

mix fathom.query "SELECT mfa, file, line FROM functions WHERE name = 'create_user'"

The connection is opened read-only, so a query that tries to modify the database fails at SQLite rather than being caught by inspecting the SQL. The database is a derived artefact in any case; the thing to change is the code.

This exists so that a project needs nothing beyond mix to use Fathom. If sqlite3 is installed, pointing it at .fathom/program.db works just as well and is usually what you want in a shell.

Options

  • --database, -d - path to the database. Defaults to .fathom/program.db.
  • --format, -f - table (default), tsv, or json.
  • --schema - print the schema and exit, ignoring any query.