<s> from django . db . models import Lookup <EOL> class AncestorOf ( Lookup ) : <EOL> lookup_name = '<STR_LIT>' <EOL> def as_sql ( self , compiler , connection ) : <EOL> lhs , lhs_params = self . process_lhs ( compiler , connection ) <EOL> rhs , rhs_params = self . process_rhs ( compiler , connection ) <EOL> params = lhs_params + rhs_params <EOL> return '<STR_LIT>' % ( lhs , rhs ) , params <EOL> class DescendantOf ( Lookup ) : <EOL> lookup_name = '<STR_LIT>' <EOL> def as_sql ( self , compiler , connection ) : <EOL> lhs , lhs_params = self . process_lhs ( compiler , connection ) <EOL> rhs , rhs_params = self . process_rhs ( compiler , connection ) <EOL> params = lhs_params + rhs_params <EOL> return '<STR_LIT>' % ( lhs , rhs ) , params <EOL> class Match ( Lookup ) : <EOL> lookup_name = '<STR_LIT>' <EOL> def as_sql ( self , compiler , connection ) : <EOL> lhs , lhs_params = self . process_lhs ( compiler , connection ) <EOL> rhs , rhs_params = self . process_rhs ( compiler , connection ) <EOL> params = lhs_params + rhs_params <EOL> return '<STR_LIT>' % ( lhs , rhs ) , params <EOL> class MatchAny ( Lookup ) : <EOL> lookup_name = '<STR_LIT>' <EOL> def as_sql ( self , compiler , connection ) : <EOL> lhs , lhs_params = self . process_lhs ( compiler , connection ) <EOL> rhs , rhs_params = self . process_rhs ( compiler , connection ) <EOL> params = lhs_params + rhs_params <EOL> return '<STR_LIT>' % ( lhs , rhs ) , params <EOL> class Search ( Lookup ) : <EOL> lookup_name = '<STR_LIT>' <EOL> def as_sql ( self , compiler , connection ) : <EOL> lhs , lhs_params = self . process_lhs ( compiler , connection ) <EOL> rhs , rhs_params = self . process_rhs ( compiler , connection ) <EOL> params = lhs_params + rhs_params <EOL> return '<STR_LIT>' % ( lhs , rhs ) , params </s>
