Avram::Credentials
Constructors
new(database : String, scheme : String = "postgres", hostname : String | Nil = nil, username : String | Nil = nil, password : String | Nil = nil, port : Int32 | Nil = nil, query : String | Nil = nil)
SourceParse a DB connection string URL. This may come from an environment variable.
Avram::Credentials.parse(ENV["DB_URL"])
Class methods
Instance methods
connection_string
This is the connection string without the DB, or query added in. This is used for connecting to the database engine without connecting to a specific database. e.g. postgres://user:pass@host:1234
hostname
Sourcepassword
Sourceport
Sourceprotocol
Sourcequery
Sourceuri
Sourceurl
This is the full URL including the database, querystring, etc... e.g. postgres://user:pass@host:1234/db?a=1
username
Source