as_sql(compiler, connection, function=None, template=None, arg_joiner=None, **extra_context) [source]
Generates the SQL for the database function.
The as_vendor() methods should use the function, template, arg_joiner, and any other **extra_context parameters to customize the SQL as needed. For example:
class ConcatPair(Func):
...
function = 'CONCAT'
...
def as_mysql(self, compiler, connection):
return super(ConcatPair, self).as_sql(
compiler, connection,