Jimexist opened a new issue #1216:
URL: https://github.com/apache/arrow-datafusion/issues/1216


   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   
   A discussion on what command formats to adopt for datafusion-cli
   
   **Describe the solution you'd like**
   
   1. psql style
   1. sqlite style
   
   ### `psql` style
   
   ```
   [postgres] # \?
   General
     \copyright             show PostgreSQL usage and distribution terms
     \crosstabview [COLUMNS] execute query and display results in crosstab
     \errverbose            show most recent error message at maximum verbosity
     \g [(OPTIONS)] [FILE]  execute query (and send results to file or |pipe);
                            \g with no arguments is equivalent to a semicolon
     \gdesc                 describe result of query, without executing it
     \gexec                 execute query, then execute each value in its result
     \gset [PREFIX]         execute query and store results in psql variables
     \gx [(OPTIONS)] [FILE] as \g, but forces expanded output mode
     \q                     quit psql
     \watch [SEC]           execute query every SEC seconds
   
   Help
     \? [commands]          show help on backslash commands
     \? options             show help on psql command-line options
     \? variables           show help on special variables
     \h [NAME]              help on syntax of SQL commands, * for all commands
   
   Query Buffer
     \e [FILE] [LINE]       edit the query buffer (or file) with external editor
     \ef [FUNCNAME [LINE]]  edit function definition with external editor
     \ev [VIEWNAME [LINE]]  edit view definition with external editor
     \p                     show the contents of the query buffer
     \r                     reset (clear) the query buffer
     \s [FILE]              display history or save it to file
     \w FILE                write query buffer to file
   ```
   
   ### `sqlite3` style
   
   ```
   sqlite> .help
   .auth ON|OFF             Show authorizer callbacks
   .backup ?DB? FILE        Backup DB (default "main") to FILE
   .bail on|off             Stop after hitting an error.  Default OFF
   .binary on|off           Turn binary output on or off.  Default OFF
   .cd DIRECTORY            Change the working directory to DIRECTORY
   .changes on|off          Show number of rows changed by SQL
   .check GLOB              Fail if output since .testcase does not match
   .clone NEWDB             Clone data into NEWDB from the existing database
   .databases               List names and files of attached databases
   .dbconfig ?op? ?val?     List or change sqlite3_db_config() options
   .dbinfo ?DB?             Show status information about the database
   .dump ?TABLE?            Render database content as SQL
   .echo on|off             Turn command echo on or off
   .eqp on|off|full|...     Enable or disable automatic EXPLAIN QUERY PLAN
   .excel                   Display the output of next command in spreadsheet
   .exit ?CODE?             Exit this program with return-code CODE
   .expert                  EXPERIMENTAL. Suggest indexes for queries
   .explain ?on|off|auto?   Change the EXPLAIN formatting mode.  Default: auto
   .filectrl CMD ...        Run various sqlite3_file_control() operations
   .fullschema ?--indent?   Show schema and the content of sqlite_stat tables
   .headers on|off          Turn display of headers on or off
   .help ?-all? ?PATTERN?   Show help text for PATTERN
   .import FILE TABLE       Import data from FILE into TABLE
   .imposter INDEX TABLE    Create imposter table TABLE on index INDEX
   .indexes ?TABLE?         Show names of indexes
   .limit ?LIMIT? ?VAL?     Display or change the value of an SQLITE_LIMIT
   .lint OPTIONS            Report potential schema issues.
   .log FILE|off            Turn logging on or off.  FILE can be stderr/stdout
   .mode MODE ?TABLE?       Set output mode
   .nullvalue STRING        Use STRING in place of NULL values
   .once ?OPTIONS? ?FILE?   Output for the next SQL command only to FILE
   .open ?OPTIONS? ?FILE?   Close existing database and reopen FILE
   .output ?FILE?           Send output to FILE or stdout if FILE is omitted
   .parameter CMD ...       Manage SQL parameter bindings
   .print STRING...         Print literal STRING
   .progress N              Invoke progress handler after every N opcodes
   .prompt MAIN CONTINUE    Replace the standard prompts
   .quit                    Exit this program
   .read FILE               Read input from FILE
   .recover                 Recover as much data as possible from corrupt db.
   .restore ?DB? FILE       Restore content of DB (default "main") from FILE
   .save FILE               Write in-memory database into FILE
   .scanstats on|off        Turn sqlite3_stmt_scanstatus() metrics on or off
   .schema ?PATTERN?        Show the CREATE statements matching PATTERN
   .selftest ?OPTIONS?      Run tests defined in the SELFTEST table
   .separator COL ?ROW?     Change the column and row separators
   .session ?NAME? CMD ...  Create or control sessions
   .sha3sum ...             Compute a SHA3 hash of database content
   .shell CMD ARGS...       Run CMD ARGS... in a system shell
   .show                    Show the current values for various settings
   .stats ?on|off?          Show stats or turn stats on or off
   .system CMD ARGS...      Run CMD ARGS... in a system shell
   .tables ?TABLE?          List names of tables matching LIKE pattern TABLE
   .testcase NAME           Begin redirecting output to 'testcase-out.txt'
   .testctrl CMD ...        Run various sqlite3_test_control() operations
   .timeout MS              Try opening locked tables for MS milliseconds
   .timer on|off            Turn SQL timer on or off
   .trace ?OPTIONS?         Output each SQL statement as it is run
   .vfsinfo ?AUX?           Information about the top-level VFS
   .vfslist                 List all available VFSes
   .vfsname ?AUX?           Print the name of the VFS stack
   .width NUM1 NUM2 ...     Set column widths for "column" mode
   ```
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features 
you've considered.
   
   **Additional context**
   Add any other context or screenshots about the feature request here.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to