-
-
Notifications
You must be signed in to change notification settings - Fork 426
Open
Description
I have installed q through Arch Linux's AUR. Apologies if this is an Arch packaging issue -- kick it back to me if so.
For me, the man page RUNTIME OPTIONS section looks as follows:
QUERY
q gets one parameter - An SQL-like query.
Any standard SQL expression, condition (both WHERE and HAVING), GROUP BY, ORDER BY etc. are allowed.
JOINs are supported and Subqueries are supported in the WHERE clause, but unfortunately not in the FROM
clause for now. Use table aliases when performing JOINs.
The SQL syntax itself is sqlite´s syntax. For details look at http://www.sqlite.org/lang.html or search the
net for examples.
NOTE: Full type detection is implemented, so there is no need for any casting or anything.
NOTE2: When using the -O output header option, use column name aliases if you want to control the output
column names. For example, q -O -H "select count(*) cnt,sum(*) as mysum from -" would output cnt and mysum
as the output header column names.
RUNTIME OPTIONS
q can also get some runtime flags. The following parameters can be used, all optional:
‘‘‘‘ Options: -h, --help show this help message and exit -v, --version Print version -V, --verbose Print
debug info in case of problems -S SAVE_DB_TO_DISK_FILENAME, --save-db-to-disk=SAVE_DB_TO_DISK_FILENAME Save
database to an sqlite database file -C CACHING_MODE, --caching-mode=CACHING_MODE Choose the autocaching
mode (none/read/readwrite). Autocaches files to disk db so further queries will be faster. Caching is done
to a side-file with the same name of the table, but with an added extension .qsql --dump-defaults Dump all
default values for parameters and exit. Can be used in order to make sure .qrc file content is being read
properly. --max-attached-sqlite-databases=MAX_ATTACHED_SQLITE_DATABASES Set the maximum number of concur‐
rently-attached sqlite dbs. This is a compile time definition of sqlite. q´s performance will slow down
once this limit is reached for a query, since it will perform table copies in order to avoid that limit.
--overwrite-qsql=OVERWRITE_QSQL When used, qsql files (both caches and store-to-db) will be overwritten if
they already exist. Use with care.
[...]
Edit: Version is 3.1.6
Metadata
Metadata
Assignees
Labels
No labels