mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
pg: minor fixes
This commit is contained in:
parent
e724792a67
commit
0fb0c43c0a
@ -41,5 +41,6 @@
|
||||
+ fast.vlang.io
|
||||
+ bare metal support
|
||||
+ inline assembly
|
||||
+ x64 machine code generation (ELF)
|
||||
|
||||
|
||||
|
@ -1625,7 +1625,9 @@ fn (p mut Parser) var_expr(v Var) string {
|
||||
p.next()
|
||||
return p.select_query(fn_ph)
|
||||
}
|
||||
if typ == 'pg__DB' && !p.fileis('pg.v') && p.peek() == .name {
|
||||
if typ == 'pg__DB' && !p.fileis('pg.v') && p.peek() == .name &&
|
||||
!p.tokens[p.token_idx].lit.contains('exec')
|
||||
{
|
||||
p.next()
|
||||
p.insert_query(fn_ph)
|
||||
return 'void'
|
||||
|
@ -5,19 +5,19 @@ module pg
|
||||
#flag darwin -I/opt/local/include/postgresql11
|
||||
#include <libpq-fe.h>
|
||||
|
||||
struct DB {
|
||||
pub struct DB {
|
||||
mut:
|
||||
conn &C.PGconn
|
||||
}
|
||||
|
||||
struct Row {
|
||||
pub struct Row {
|
||||
pub mut:
|
||||
vals []string
|
||||
}
|
||||
|
||||
struct C.PGResult { }
|
||||
|
||||
struct Config {
|
||||
pub struct Config {
|
||||
pub:
|
||||
host string
|
||||
user string
|
||||
|
Loading…
Reference in New Issue
Block a user