v/tutorials/code/blog/article.v

18 lines
195 B
V
Raw Normal View History

2019-12-14 03:31:09 +01:00
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
}