mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-09-10 13:53:52 +02:00
rsql: add page (#17178)
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
This commit is contained in:
parent
3764c3469a
commit
f38256b735
1 changed files with 32 additions and 0 deletions
32
pages/common/rsql.md
Normal file
32
pages/common/rsql.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# rsql
|
||||
|
||||
> SQL client to interface with databases and other data sources inside the terminal.
|
||||
> More information: <https://github.com/theseus-rs/rsql>.
|
||||
|
||||
- Enter interactive mode:
|
||||
|
||||
`rsql`
|
||||
|
||||
- Connect to a database (e.g. PostgreSQL):
|
||||
|
||||
`rsql --url {{"postgresql://user:pass@localhost/mydb"}}`
|
||||
|
||||
- Connect to a PostgreSQL database with SSL:
|
||||
|
||||
`rsql --url {{"postgresql://user:pass@localhost/db?sslmode=require"}}`
|
||||
|
||||
- Connect to a MySQL database with a specified charset:
|
||||
|
||||
`rsql --url {{"mysql://user:pass@localhost/db?charset=utf8mb4"}}`
|
||||
|
||||
- Run a query and exit:
|
||||
|
||||
`rsql --url {{"sqlite://database.db"}} -- "SELECT * FROM users LIMIT 10"`
|
||||
|
||||
- Set default format:
|
||||
|
||||
`rsql --url {{"sqlite://db.sqlite"}} --format json`
|
||||
|
||||
- Connect to file and use custom line separator:
|
||||
|
||||
`rsql --url {{"delimited://data.txt?separator=|&has_header=true"}}`
|
Loading…
Add table
Reference in a new issue