(self, side, compiler, connection)
| 814 | |
| 815 | class DurationExpression(CombinedExpression): |
| 816 | def compile(self, side, compiler, connection): |
| 817 | try: |
| 818 | output = side.output_field |
| 819 | except FieldError: |
| 820 | pass |
| 821 | else: |
| 822 | if output.get_internal_type() == "DurationField": |
| 823 | sql, params = compiler.compile(side) |
| 824 | return connection.ops.format_for_duration_arithmetic(sql), params |
| 825 | return compiler.compile(side) |
| 826 | |
| 827 | def as_sql(self, compiler, connection): |
| 828 | if connection.features.has_native_duration_field: |