Generate multi-line SELECT statements instead of single-line ones
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5372 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
0cf5917686
commit
00ffe3f55d
|
@ -29,6 +29,8 @@ sub printStructFields
|
||||||
{
|
{
|
||||||
my $field = shift(@fields);
|
my $field = shift(@fields);
|
||||||
|
|
||||||
|
printComments ${$field}{"comment"}, 1;
|
||||||
|
|
||||||
if (${$field}{"type"} and ${$field}{"type"} =~ /set/)
|
if (${$field}{"type"} and ${$field}{"type"} =~ /set/)
|
||||||
{
|
{
|
||||||
my $enumName = ${$field}{"enum"};
|
my $enumName = ${$field}{"enum"};
|
||||||
|
@ -39,16 +41,16 @@ sub printStructFields
|
||||||
{
|
{
|
||||||
my $value = shift(@values);
|
my $value = shift(@values);
|
||||||
|
|
||||||
print "`$structName`.`${$field}{\"name\"}_${$value}{\"name\"}`";
|
print "\t`$structName`.`${$field}{\"name\"}_${$value}{\"name\"}`";
|
||||||
print ", " if @values;
|
print ",\n" if @values;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "`$structName`.`${$field}{\"name\"}`";
|
print "\t`$structName`.`${$field}{\"name\"}`";
|
||||||
}
|
}
|
||||||
|
|
||||||
print ", " if @fields;
|
print ",\n\n" if @fields;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,12 +69,13 @@ sub printStructContent
|
||||||
}
|
}
|
||||||
elsif (/abstract/)
|
elsif (/abstract/)
|
||||||
{
|
{
|
||||||
print "`${$struct}{\"name\"}`.`unique_inheritance_id`, ";
|
print "`${$struct}{\"name\"}`.`unique_inheritance_id`,\n\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printStructFields($struct, $enumMap);
|
printStructFields($struct, $enumMap);
|
||||||
print ", " unless $first;
|
print ",\n" unless $first;
|
||||||
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub printBaseStruct
|
sub printBaseStruct
|
||||||
|
|
Loading…
Reference in New Issue