MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / BlindQuery

Class BlindQuery

suds/xsd/query.py:89–113  ·  view source on GitHub ↗

Schema query class that I{blindly} searches for a reference in the specified schema. It may be used to find Elements and Types but will match on an Element first. This query will also find builtins.

Source from the content-addressed store, hash-verified

87
88
89class BlindQuery(Query):
90 """
91 Schema query class that I{blindly} searches for a reference in
92 the specified schema. It may be used to find Elements and Types but
93 will match on an Element first. This query will also find builtins.
94 """
95
96 def execute(self, schema):
97 if schema.builtin(self.ref):
98 name = self.ref[0]
99 b = Factory.create(schema, name)
100 log.debug('%s, found builtin (%s)', self.id, name)
101 return b
102 result = None
103 for d in (schema.elements, schema.types):
104 result = d.get(self.ref)
105 if self.filter(result):
106 result = None
107 else:
108 break
109 if result is None:
110 eq = ElementQuery(self.ref)
111 eq.history = self.history
112 result = eq.execute(schema)
113 return self.result(result)
114
115
116class TypeQuery(Query):

Callers 5

findMethod · 0.90
rootMethod · 0.90
queryMethod · 0.90
knownMethod · 0.90
queryMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected