ci: fix compilation with g++ (#9629)
parent
9c67a1cf62
commit
fdb4f17866
|
@ -377,12 +377,13 @@ fn (mut g Gen) sqlite3_create_table(node ast.SqlStmt, typ SqlType) {
|
||||||
|
|
||||||
mut fields := []string{}
|
mut fields := []string{}
|
||||||
|
|
||||||
outer: for field in struct_data.fields {
|
for field in struct_data.fields {
|
||||||
mut is_primary := false
|
mut is_primary := false
|
||||||
|
mut skip := false
|
||||||
for attr in field.attrs {
|
for attr in field.attrs {
|
||||||
match attr.name {
|
match attr.name {
|
||||||
'skip' {
|
'skip' {
|
||||||
continue outer
|
skip = true
|
||||||
}
|
}
|
||||||
'primary' {
|
'primary' {
|
||||||
is_primary = true
|
is_primary = true
|
||||||
|
@ -390,6 +391,9 @@ fn (mut g Gen) sqlite3_create_table(node ast.SqlStmt, typ SqlType) {
|
||||||
else {}
|
else {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if skip { // cpp workaround
|
||||||
|
continue
|
||||||
|
}
|
||||||
mut stmt := ''
|
mut stmt := ''
|
||||||
mut converted_typ := g.sql_type_from_v(typ, field.typ)
|
mut converted_typ := g.sql_type_from_v(typ, field.typ)
|
||||||
mut name := field.name
|
mut name := field.name
|
||||||
|
|
Loading…
Reference in New Issue