kyua-db-exec man page

db-exec — Executes a SQL statement in a results file

Synopsis

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

Description

The db-exec command provides a way to execute an arbitrary SQL statement within the database. This command is mostly intended to aid in debugging, but can also be used to extract information from the database when the current interfaces do not provide the desired functionality.

The input database must exist. It makes no sense to use db-exec on an non-existent or empty database.

The db-exec command takes one or more arguments, all of which are concatenated to form a single SQL statement. Once the statement is executed, db-exec prints the resulting table on the screen, if any.

The following subcommand options are recognized:

--no-headers
Avoids printing the headers of the table in the output of the command.
--results-file path, -s path
Specifies the results file to operate on. Defaults to ‘LATEST’, which causes db-exec to automatically load the latest results file for the current test suite. See kyua-results-files(7) for more information.

Exit Status

The db-exec command returns 0 on success or 1 if the SQL statement is invalid or fails to run.

Additional exit codes may be returned as described in kyua(1).

See Also

kyua(1), kyua-test(1)

Referenced By

kyua(1).

July 28, 2014