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