def get_base_value_query(): return Value.objects.annotate(field_and_string_value=Concat( 'contact_field_id', Val('|'), Upper(Substr('string_value', 1, STRING_VALUE_COMPARISON_LIMIT)), output_field=CharField())).values('contact_id')
def get_base_value_query(): return Value.objects.annotate(field_and_string_value=Concat( 'contact_field_id', Val('|'), Upper('string_value'), output_field=CharField())).values('contact_id')