<s> """<STR_LIT>""" <EOL> class EmptyResultSet ( Exception ) : <EOL> pass <EOL> class MultiJoin ( Exception ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , names_pos , path_with_names ) : <EOL> self . level = names_pos <EOL> self . names_with_path = path_with_names <EOL> class Empty ( object ) : <EOL> pass <EOL> class RawValue ( object ) : <EOL> def __init__ ( self , value ) : <EOL> self . value = value <EOL> class Date ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , col , lookup_type ) : <EOL> self . col = col <EOL> self . lookup_type = lookup_type <EOL> def relabeled_clone ( self , change_map ) : <EOL> return self . __class__ ( ( change_map . get ( self . col [ <NUM_LIT:0> ] , self . col [ <NUM_LIT:0> ] ) , self . col [ <NUM_LIT:1> ] ) ) <EOL> def as_sql ( self , qn , connection ) : <EOL> if isinstance ( self . col , ( list , tuple ) ) : <EOL> col = '<STR_LIT>' % tuple ( [ qn ( c ) for c in self . col ] ) <EOL> else : <EOL> col = self . col <EOL> return connection . ops . date_trunc_sql ( self . lookup_type , col ) , [ ] <EOL> class DateTime ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , col , lookup_type , tzname ) : <EOL> self . col = col <EOL> self . lookup_type = lookup_type <EOL> self . tzname = tzname <EOL> def relabeled_clone ( self , change_map ) : <EOL> return self . __class__ ( ( change_map . get ( self . col [ <NUM_LIT:0> ] , self . col [ <NUM_LIT:0> ] ) , self . col [ <NUM_LIT:1> ] ) ) <EOL> def as_sql ( self , qn , connection ) : <EOL> if isinstance ( self . col , ( list , tuple ) ) : <EOL> col = '<STR_LIT>' % tuple ( [ qn ( c ) for c in self . col ] ) <EOL> else : <EOL> col = self . col <EOL> return connection . ops . datetime_trunc_sql ( self . lookup_type , col , self . tzname ) </s>
