mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
18 lines
195 B
V
18 lines
195 B
V
|
module main
|
||
|
|
||
|
struct Article {
|
||
|
id int
|
||
|
title string
|
||
|
text string
|
||
|
}
|
||
|
|
||
|
pub fn (app &App) find_all_articles() []Article {
|
||
|
db := app.db
|
||
|
articles := db.select from Article
|
||
|
return articles
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|