sqls icon indicating copy to clipboard operation
sqls copied to clipboard

DATABASE_URL env variable as source of database connection info

Open itamarst opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. The DATABASE_URL environment variable is standard in many environments for specifying how to connect to the database. It would be nice if sqls could use, reducing the need for manual configuration.

Describe the solution you'd like Check for the environment variable, if it's there use it to connect to the database.

Describe alternatives you've considered Manual configuration.

Additional context I don't know how standardized the format is. Possibly you'd need to do more work to support multiple variations.

itamarst avatar May 05 '22 14:05 itamarst

How would you setup multiple connection through environment vars?

cizordj avatar Sep 19 '22 12:09 cizordj

How would you setup multiple connection through environment vars?

direnv: https://direnv.net/

itamarst avatar Sep 19 '22 13:09 itamarst

I guess cizordj is talking about how to specify multiple connection string in one environment variable.

mattn avatar Dec 30 '23 04:12 mattn

I guess cizordj is talking about how to specify multiple connection string in one environment variable.

This

cizordj avatar Jan 05 '24 17:01 cizordj