mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Swift codegen: add predicate properties
Properties marked with `predicate` in the schema are now accepted. * in the dbscheme, they will translate to a table with a single `id` column (and the table name will not be pluralized) * in C++ classes, they will translate to `bool` fields * in QL classes, they will translate to predicates Closes https://github.com/github/codeql-c-team/issues/1016
This commit is contained in:
@@ -35,6 +35,7 @@ class Field:
|
||||
type: str
|
||||
is_optional: bool = False
|
||||
is_repeated: bool = False
|
||||
is_predicate: bool = False
|
||||
trap_name: str = None
|
||||
first: bool = False
|
||||
|
||||
@@ -61,7 +62,7 @@ class Field:
|
||||
|
||||
@property
|
||||
def is_single(self):
|
||||
return not (self.is_optional or self.is_repeated)
|
||||
return not (self.is_optional or self.is_repeated or self.is_predicate)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user