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

orm: limit

This commit is contained in:
Alexander Medvednikov
2020-06-27 16:19:12 +02:00
parent f8f2fa246e
commit f073ffa4ad
4 changed files with 46 additions and 27 deletions

View File

@ -168,6 +168,12 @@ fn test_orm_sqlite() {
}
assert no_user.name == '' // TODO optional
assert no_user.age == 0
//
two_users := sql db {
select from User limit 2
}
assert two_users.len == 2
assert two_users[0].id > 0
}
struct User {