def parameterize(self, tables):
        tables |= {"code", "symbols"}
        if isinstance(self.name, Regex):
            cond, name = self._null_regex("symbol_name"), self.name.regex
        else:
            cond, name = "symbol_name <=> ?", self.name.string
            if self.type == self.ALL:
                types = ", ".join(str(typ) for typ in xrange(len(self.TYPES)))
                part = " AND IF(ISNULL(symbol_type), 0, symbol_type IN (%s))"
                cond += part % types
        if self.type != self.ALL:
            cond += " AND symbol_type <=> %d" % self.type
        if self.context != self.ALL:
            tables |= {"symbol_locations"}
            cond += " AND sloc_type <=> %d" % self.context
        return "(" + cond + ")", [name], [], False
dataset/ETHPy150Open earwig/bitshift/bitshift/query/nodes.py/Symbol.parameterize/original