KYUA-DB-EXEC(1)

πŸ“¦
version 0.14.1 Β· 5 versions
, in alpine 3.23, alpine 3.24, debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– KYUA-DB-EXEC πŸ’–

okay bestie, so this is kyua-db-exec, a General Commands Manual page from section 1 β€” the user commands girlies. it lives in the kyua family and it is literally the "let me just talk to the database directly" command. no cap.


✨ SYNOPSIS ✨

kyua db-exec [--no-headers] [--results-file file] statement

🌸 DESCRIPTION 🌸

so the kyua db-exec command is your little backstage pass: it gives you a way to execute an arbitrary SQL statement right inside the database. it's mostly here to help with debugging, but you can also use it to pull info out of the database when the current interfaces just aren't giving what you need. the way that current interfaces simply do not serve. πŸ’…

⚠️ the input database must exist. using kyua db-exec on a nonexistent or empty database makes no sense at all. it's giving zero thoughts, zero vibes, zero data. don't do it. πŸ™ˆ

the kyua db-exec command takes one or more arguments, and all of them get concatenated to form a single SQL statement. once that statement runs, kyua db-exec prints the resulting table on the screen, if there is any. that's it, that's the whole moment. ✨

The following subcommand options are recognized:

  • --no-headers β€” skips printing the headers of the table in the command's output. just the rows, no labels. slay.
  • --results-file path, -s path β€” tells it which results file to operate on. defaults to LATEST, which makes kyua db-exec automatically load the latest results file from the current test suite. so convenient, obsessed. 🫢

The following values are accepted:

  • LATEST β€” asks for the load of the latest results file available for the test suite rooted at the current directory.
  • Directory β€” asks for the load of the latest results file available for the test suite rooted at the given directory.
  • Test suite name β€” asks for the load of the latest results file available for the given test suite.
  • Results identifier β€” asks for the load of a specific results file. main character behaviour, picking one on purpose. πŸ‘‘
  • Explicit file name (aka everything else) β€” loads the specified results file.

See "Results files" for more details. πŸ‘‡


πŸŽ€ Results files πŸŽ€

Results files contain, as their name implies, the results of the execution of a test suite. every test suite executed by kyua-test(1) generates a new results file, and those results files can be loaded later on by inspection commands such as kyua-report(1) so you can analyze their contents. it's a whole archive situation. πŸ’–

Results files support identifier-based lookups and also path name lookups. the differences between the two are described below. 🌈

The default naming scheme for the results files provides simple support for identifier-based lookups and historical recording of test suite runs. each results file is given an identifier derived from the test suite that generated it and the time the test suite was run. Kyua can later look up results files by these fields. history? recorded. ✨

The identifier follows this pattern:

<test_suite>.<YYYYMMDD>-<HHMMSS>-<uuuuuu>

where test_suite is the path to the root of the test suite that was run with all slashes replaced by underscores, and YYYYMMDD-HHMMSS-uuuuuu is a timestamp with microsecond resolution. precise. down to the microsecond. 😭

When using the default naming scheme, results files are stored in the ~/.kyua/store/ subdirectory and each file holds a name of the form:

~/.kyua/store/results.<identifier>.db

Results files are simple SQLite databases with the schema described in the /usr/share/kyua/store/schema_v?.sql files. for details on the schema, please refer to the heavily commented SQL file β€” it's basically the annotated director's cut of the schema. πŸ¦‹


πŸ’€ EXIT STATUS πŸ’€

The kyua db-exec command returns 0 on success, or 1 if the SQL statement is invalid or fails to run. simple as that, bestie.

Additional exit codes may be returned as described in kyua(1). so if you get something weird, go check that page. iykyk. πŸ™ˆ


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page, fr fr πŸ’œ this one came from Debian, dated October 13, 2014 β€” so yeah, vintage but still iconic. go query responsibly, bestie. πŸŽ€βœ¨