diff --git a/vlib/v/gen/c/sql.v b/vlib/v/gen/c/sql.v index 4ec32864d0..b782ff6bec 100644 --- a/vlib/v/gen/c/sql.v +++ b/vlib/v/gen/c/sql.v @@ -377,12 +377,13 @@ fn (mut g Gen) sqlite3_create_table(node ast.SqlStmt, typ SqlType) { mut fields := []string{} - outer: for field in struct_data.fields { + for field in struct_data.fields { mut is_primary := false + mut skip := false for attr in field.attrs { match attr.name { 'skip' { - continue outer + skip = true } 'primary' { is_primary = true @@ -390,6 +391,9 @@ fn (mut g Gen) sqlite3_create_table(node ast.SqlStmt, typ SqlType) { else {} } } + if skip { // cpp workaround + continue + } mut stmt := '' mut converted_typ := g.sql_type_from_v(typ, field.typ) mut name := field.name