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

orm: skip fields

This commit is contained in:
Alexander Medvednikov 2019-12-14 02:02:14 +03:00
parent 797d4364e7
commit 88cde6e4e6

View File

@ -64,6 +64,9 @@ fn (p mut Parser) select_query(fn_ph int) string {
println('orm: skipping $field.name')
continue
}
if field.attr.contains('skip') {
continue
}
fields << field
}
if fields.len == 0 {
@ -88,6 +91,7 @@ fn (p mut Parser) select_query(fn_ph int) string {
println('orm: skipping $field.name')
continue
}
p.register_var({ field | is_mut: true, is_used:true, is_changed:true })
}
q += table_name + 's'