pg: fix compilation
parent
931cf86cc3
commit
e029044b13
|
@ -12,7 +12,7 @@ fn test_orm() {
|
|||
db := pg.connect(
|
||||
dbname:'vpm'
|
||||
user:'alex'
|
||||
)
|
||||
) or { panic(err) }
|
||||
/*
|
||||
//nr_modules := db.select count from modules
|
||||
//nr_modules := db.select count from Modules where id == 1
|
||||
|
|
|
@ -128,7 +128,8 @@ pub fn (db DB) exec_one(query string) ?Row {
|
|||
// free. This prevents warnings and doesn't seem to affect behavior.
|
||||
pub fn (db DB) exec_param_many(query string, params []string) []Row {
|
||||
unsafe {
|
||||
mut param_vals := &byteptr( malloc( params.len * sizeof(byteptr) ) )
|
||||
b := sizeof(byteptr)
|
||||
mut param_vals := &byteptr(malloc(params.len * 8))
|
||||
for i in 0..params.len {
|
||||
param_vals[i] = params[i].str
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue