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

orm: update with multiple fields

This commit is contained in:
Alexander Medvednikov
2020-06-25 17:18:44 +02:00
parent b280e08ee0
commit 450c6e843c
3 changed files with 27 additions and 9 deletions

View File

@@ -125,6 +125,16 @@ fn test_orm_sqlite() {
println(kate2)
assert kate2.age == 31
assert kate2.name == 'Kate'
//
sql db {
update User set age = 32, name = 'Kate N' where name == 'Kate'
}
kate3 := sql db {
select from User where id == 3
}
println(kate3)
assert kate3.age == 32
assert kate3.name == 'Kate N'
}
struct User {