Beispiel #1
0
    def get_from_clause(self):
        from_, params = super(SQLCompiler, self).get_from_clause()

        if hasattr(self.query, "_custom_joins"):
            for join_dict in self.query._custom_joins:
                from_.append(
                    '%s %s AS %s ON (%s)' %
                    (join_dict['join_type'], _quote_name(join_dict['table']),
                     _quote_name(join_dict['alias']), join_dict['condition']))
                params.extend(join_dict['condition_values'])

        return from_, params
Beispiel #2
0
    def get_from_clause(self):
        from_, params = super(SQLCompiler, self).get_from_clause()

        if hasattr(self.query, "_custom_joins"):
            for join_dict in self.query._custom_joins:
                from_.append('%s %s AS %s ON (%s)'
                             % (join_dict['join_type'],
                                _quote_name(join_dict['table']),
                                _quote_name(join_dict['alias']),
                                join_dict['condition']))
                params.extend(join_dict['condition_values'])

        return from_, params
Beispiel #3
0
    def get_from_clause(self):
        from_, params = super(SQLCompiler, self).get_from_clause()

        if hasattr(self.query, "_custom_joins"):
            for join_dict in self.query._custom_joins:
                from_.append(
                    "%s %s AS %s ON (%s)"
                    % (
                        join_dict["join_type"],
                        _quote_name(join_dict["table"]),
                        _quote_name(join_dict["alias"]),
                        join_dict["condition"],
                    )
                )
                params.extend(join_dict["condition_values"])

        return from_, params