pg: connect, use password
parent
f317b65808
commit
2678f9289e
|
@ -35,7 +35,7 @@ fn C.PQexec(voidptr) voidptr
|
|||
fn C.PQexecParams(voidptr) voidptr
|
||||
|
||||
pub fn connect(config pg.Config) ?DB {
|
||||
conninfo := 'host=$config.host user=$config.user dbname=$config.dbname'
|
||||
conninfo := 'host=$config.host user=$config.user dbname=$config.dbname password=$config.password'
|
||||
conn := C.PQconnectdb(conninfo.str)
|
||||
status := C.PQstatus(conn)
|
||||
println("status=$status")
|
||||
|
|
Loading…
Reference in New Issue