Fixes for reading proper select types

This commit is contained in:
Thomas Krijnen
2018-02-05 15:19:38 +01:00
parent 852e3e28ee
commit 7e14d4389e
10 changed files with 2508 additions and 2818 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ import codegen
class EnumHeader(codegen.Base):
def __init__(self, mapping):
enumerable_types = sorted(set([name for name, type in mapping.schema.types.items()] + [name for name, type in mapping.schema.entities.items()]))
enumerable_types = sorted(set([name for name, type in mapping.schema.types.items()] + [name for name, type in mapping.schema.entities.items()]), key=lambda s: s.lower())
self.str = templates.enum_header % {
'schema_name_upper' : mapping.schema.name.upper(),
+1 -1
View File
@@ -159,7 +159,7 @@ class Implementation(codegen.Base):
schema_entity_statements += [templates.schema_entity_stmt%locals() for name, type in mapping.schema.simpletypes.items()]
schema_entity_statements += [templates.schema_entity_stmt%locals() for name, type in mapping.schema.entities.items()]
enumerable_types = sorted(set([name for name, type in mapping.schema.types.items()] + [name for name, type in mapping.schema.entities.items()]))
enumerable_types = sorted(set([name for name, type in mapping.schema.types.items()] + [name for name, type in mapping.schema.entities.items()]), key=lambda s: s.lower())
max_len = max(map(len, enumerable_types))
type_name_strings = catc(map(stringify, enumerable_types))
string_map_statements = [templates.string_map_statement % {