mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
* Refactor CLI to mimic psql's meta-commands
This PR adds support for meta-commands (also known as "backslash
commands") like those in psql, Postgres's CLI. Only a few meta-commands
are currently implemented, but this was meant to demonstrate how we
could use something like `\i file.csv` to insert local files into SQL
statements.
* Meta-commands: \file and \include
The initial implementation used `\i` as a streaming file handle.
This commit changes that to `\file`, and then implements `\i` (or
`\include`) as handling multiple sql commands.
* Add meta-command "help" (\?)
This is basically a copy of the psql help output, but includes only
those options we currently support.
* Add support for \o [file], and \timing
The \o meta-command writes query output to a file.
The \timing meta-command turns on/off the timing display sent to stdout.
* Add meta-commands: \l (show databases) and \dt (show tables)
* Add meta-command: \watch [period]
* Update meta-command \connect to take database name instead of ID
* Add support for \echo, \qecho, and \warn
This commit contains an known issue in that the `-n` option will exclude
the line feed, but if the output is the terminal, the readline package
clobbers any content on the current line (i.e. anything without a line
feed). That will need to be addressed at some point.
* Add support for \w [FILE] (write query buffer to file)
* Add SchemaAPI no-op implementation
* Refactor query handler to align with /sql and /databases endpoints
We want to standardize on:
/sql
/databases/{databaseID}/sql
* Add CLI support for expanded, border, tuples_only (and pset)
* Add help text for \pset and \t
|
||
|---|---|---|
| .. | ||
| types | ||
| compilealterdatabase.go | ||
| compilealtertable.go | ||
| compilebulkinsert.go | ||
| compilecreatedatabase.go | ||
| compilecreatetable.go | ||
| compilecreateview.go | ||
| compiledelete.go | ||
| compiledropdatabase.go | ||
| compiledroptable.go | ||
| compiledropview.go | ||
| compileinsert.go | ||
| compileselect.go | ||
| compileshow.go | ||
| executionplanner.go | ||
| executionplannersystemtables.go | ||
| expression.go | ||
| expression_it_test.go | ||
| expressionagg.go | ||
| expressionanalyzer.go | ||
| expressionanalyzercall.go | ||
| expressionpql.go | ||
| expressiontypes.go | ||
| inbuiltfunctionsdate.go | ||
| inbuiltfunctionsset.go | ||
| inbuiltfunctionsstring.go | ||
| inbuiltfunctionstable.go | ||
| main_test.go | ||
| opalterdatabase.go | ||
| opaltertable.go | ||
| opalterview.go | ||
| opbulkinsert.go | ||
| opcreatedatabase.go | ||
| opcreatetable.go | ||
| opcreateview.go | ||
| opdistinct.go | ||
| opdropdatabase.go | ||
| opdroptable.go | ||
| opdropview.go | ||
| opfanout.go | ||
| opfeaturebasecolumns.go | ||
| opfeaturebasedatabases.go | ||
| opfeaturebasetables.go | ||
| opfilter.go | ||
| opgroupby.go | ||
| ophaving.go | ||
| opinsert.go | ||
| opnestedloops.go | ||
| opnulltable.go | ||
| oporderby.go | ||
| oppqlaggregate.go | ||
| oppqldelete.go | ||
| oppqldistinctscan.go | ||
| oppqlfiltereddelete.go | ||
| oppqlgroupby.go | ||
| oppqlmultiaggregate.go | ||
| oppqlmultigroupby.go | ||
| oppqltablescan.go | ||
| opprojection.go | ||
| opqltruncate.go | ||
| opquery.go | ||
| oprelalias.go | ||
| opsubquery.go | ||
| opsystemtable.go | ||
| optablevaluedfunction.go | ||
| optop.go | ||
| planoptimizer.go | ||
| planwalker.go | ||
| systemobjects.go | ||
| wireprotocol.go | ||