Expand description
manage dbshell — spawn psql / mysql / sqlite3 for the current
DATABASE_URL.
manage dbshell: open the native CLI client for the current
DATABASE_URL.
The URL scheme picks the client, and the process is replaced with
exec() on Unix so Ctrl-C reaches the child.
The client itself must already be installed: psql for PostgreSQL,
mysql for MySQL and MariaDB, sqlite3 for SQLite. If it is not on
PATH, the verb says so.
Enums§
- DbTarget
- What the parser found in
DATABASE_URL, split into the parts each client needs.
Functions§
- command_
for - Build the call for
targetas(program, args, env_vars). - parse_
target - Parse a
DATABASE_URLinto aDbTarget. - run
- Start the right CLI for
urland hand the process over to it. On success this never returns. Unix usesexec(); other targets run the child and pass its exit code on.