feat: add PostgreSQL connection form
This commit is contained in:
+7
-2
@@ -13,7 +13,8 @@ Usage:
|
||||
dbdash --sqlite PATH
|
||||
dbdash --help
|
||||
|
||||
With no argument or DATABASE_URL, the in-app connection screen opens.
|
||||
Run without a connection argument and without DATABASE_URL to connect in-app.
|
||||
Otherwise DATABASE_URL supplies the PostgreSQL connection when no argument is given.
|
||||
Prefer the environment variable to keep passwords out of process arguments:
|
||||
export DATABASE_URL='postgresql://user@localhost:5432/database'
|
||||
cargo run
|
||||
@@ -25,7 +26,7 @@ SQLite paths can be relative or absolute; quote paths containing spaces.
|
||||
PostgreSQL URLs and libpq-style key=value strings are accepted.
|
||||
Use sslmode=require for mandatory TLS; certificates and hostnames are verified.
|
||||
Use sslmode=disable only for trusted local connections.
|
||||
The terminal must be at least 70 columns wide and 12 lines high.
|
||||
The inspector needs 70×12 terminal cells; the PostgreSQL form needs 70×16.
|
||||
|
||||
Navigation:
|
||||
Tab / Esc Switch focus / return to relations
|
||||
@@ -37,6 +38,10 @@ Navigation:
|
||||
c Open the connection screen (Esc keeps the current database)
|
||||
r Refresh relations and the active relation
|
||||
q / Ctrl-C Quit
|
||||
Connection screen: Up/Down chooses a provider; Enter starts editing.
|
||||
Tab/Shift-Tab changes fields; Left/Right changes TLS when that field is focused.
|
||||
Enter connects; Esc cancels; Ctrl-U clears a field. Pasting is supported.
|
||||
Form details are session-only. Passwords clear after connecting or cancelling.
|
||||
|
||||
PostgreSQL reads are enforced read-only and have a 5-second query timeout.
|
||||
SQLite files are opened read-only, with a 5-second lock wait but no query timeout.
|
||||
|
||||
Reference in New Issue
Block a user