Project

General

Profile

« Previous | Next » 

Revision 5891

sql_gen.py: Added null

View differences:

lib/sql_gen.py
978 978
    def __init__(self, *args):
979 979
        FunctionCall.__init__(self, InternalFunction('NULLIF'), *args)
980 980

  
981
null = Literal(None)
981 982
null_as_str = Cast('text', 'NULL')
982 983

  
983 984
def to_text(value): return Coalesce(Cast('text', value), null_as_str)

Also available in: Unified diff