mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
orm: skip fields with [skip]
This commit is contained in:
parent
72b09d4794
commit
a609ff4659
@ -15,7 +15,8 @@ const (
|
||||
fn (mut g Gen) sql_insert_expr(node ast.SqlInsertExpr) {
|
||||
sym := g.table.get_type_symbol(node.table_type)
|
||||
info := sym.info as table.Struct
|
||||
fields := info.fields.filter(it.typ in [table.string_type, table.int_type, table.bool_type])
|
||||
fields := info.fields.filter(it.typ in [table.string_type, table.int_type, table.bool_type] &&
|
||||
'skip' !in it.attrs)
|
||||
g.writeln('\n\t// sql insert')
|
||||
db_name := g.new_tmp_var()
|
||||
g.sql_stmt_name = g.new_tmp_var()
|
||||
|
Loading…
Reference in New Issue
Block a user