1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: fix get_cookie() and redirect()

This commit is contained in:
Alexander Medvednikov
2019-08-02 06:57:35 +02:00
parent faf2f9920e
commit b2874f1200
2 changed files with 30 additions and 6 deletions

25
vlib/orm/orm_test.v Normal file
View File

@@ -0,0 +1,25 @@
//import pg
struct Mod {
id int
name string
url string
nr_downloads int
}
fn test_orm() {
/*
db := pg.connect('vpm', 'alex')
nr_modules := select count from db.modules
mod := select from db.modules where id = 1 limit 1
println(mod.name)
top_mods := select from db.modules where nr_downloads > 1000 order by nr_downloads desc limit 10
top_mods := db.select from modules where nr_downloads > 1000 order by nr_downloads desc limit 10
top_mods := db.select<Module>(m => m.nr_downloads > 1000).order_by(m => m.nr_downloads).desc().limit(10)
names := select name from db.modules // []string
n := db.q_int('select count(*) from modules')
println(n)
*/
}