mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-01 20:54:33 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/rsql
12
tldr/rsql
@@ -14,24 +14,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Connect to a database (e.g. PostgreSQL):
|
||||
|
||||
`rsql --url {{"postgresql://user:pass@localhost/mydb"}}`
|
||||
`rsql --url "{{postgresql://user:pass@localhost/mydb}}"`
|
||||
|
||||
- Connect to a PostgreSQL database with SSL:
|
||||
|
||||
`rsql --url {{"postgresql://user:pass@localhost/db?sslmode=require"}}`
|
||||
`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"}}`
|
||||
`rsql --url "{{mysql://user:pass@localhost/db?charset=utf8mb4}}"`
|
||||
|
||||
- Run a query and exit:
|
||||
|
||||
`rsql --url {{"sqlite://database.db"}} -- "SELECT * FROM users LIMIT 10"`
|
||||
`rsql --url "{{sqlite://database.db}}" -- "{{SELECT * FROM users LIMIT 10}}"`
|
||||
|
||||
- Set default format:
|
||||
|
||||
`rsql --url {{"sqlite://db.sqlite"}} --format json`
|
||||
`rsql --url "{{sqlite://db.sqlite}}" --format json`
|
||||
|
||||
- Connect to file and use custom line separator:
|
||||
|
||||
`rsql --url {{"delimited://data.txt?separator=|&has_header=true"}}`
|
||||
`rsql --url "{{delimited://data.txt?separator=|&has_header=true}}"`
|
||||
|
||||
Reference in New Issue
Block a user