mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
pg: define all C functions
This commit is contained in:
parent
feacc2441f
commit
9bfea5e60b
@ -474,7 +474,7 @@ fn parse_url(rawurl string, via_request bool) ?URL {
|
||||
if rawurl == '' && via_request {
|
||||
return error(error_msg('parse_url: empty URL', rawurl))
|
||||
}
|
||||
mut url := URL{}
|
||||
mut url := URL{user:0}
|
||||
|
||||
if rawurl == '*' {
|
||||
url.path = '*'
|
||||
|
@ -29,6 +29,10 @@ fn C.PQconnectdb(a byteptr) &C.PGconn
|
||||
fn C.PQerrorMessage(voidptr) byteptr
|
||||
fn C.PQgetvalue(voidptr, int, int) byteptr
|
||||
fn C.PQstatus(voidptr) int
|
||||
fn C.PQntuples(voidptr) int
|
||||
fn C.PQnfields(voidptr) int
|
||||
fn C.PQexec(voidptr) int
|
||||
fn C.PQexecParams(voidptr) int
|
||||
|
||||
pub fn connect(config pg.Config) DB {
|
||||
conninfo := 'host=$config.host user=$config.user dbname=$config.dbname'
|
||||
|
Loading…
Reference in New Issue
Block a user