#NEWLINE# def spatial_lookup_sql( self , lvalue , lookup_type , value , field , qn ) : #NEWLINE# #INDENT# ( alias , col , db_type ) = lvalue #NEWLINE# geo_col = ( '%s.%s' % ( qn ( alias ) , qn ( col ) ) ) #NEWLINE# lookup_info = self . geometry_functions . get ( qn , False ) #NEWLINE# if lookup_info : #NEWLINE# #INDENT# return ( '%s(%s, %s)' % ( lookup_info , geo_col , self . get_geom_placeholder ( value , field . srid ) ) ) #NEWLINE# #UNINDENT# if ( lookup_type == 'isnull' ) : #NEWLINE# #INDENT# return ( '%s IS %sNULL' % ( geo_col , ( ( ( not value ) and 'NOT ' ) or '' ) ) ) #NEWLINE# #UNINDENT# raise TypeError ( ( 'Got invalid lookup_type: %s' % repr ( lookup_type ) ) )