def _get_regexp_ops(connection):
 regexp_op_map = {'postgresql': '~', 'mysql': 'REGEXP', 'sqlite': 'REGEXP'}
 regex_safe_filters = {'mysql': _safe_regex_mysql}
 db_type = _db_connection_type(connection)
 return (regex_safe_filters.get(db_type, (lambda x: x)), regexp_op_map.get(db_type, 'LIKE'))

def _get_regexp_ops ( connection ) : regexp_op_map = { 'postgresql' : '~' , 'mysql' : 'REGEXP' , 'sqlite' : 'REGEXP' } regex_safe_filters = { 'mysql' : _safe_regex_mysql } db_type = _db_connection_type ( connection ) return ( regex_safe_filters . get ( db_type , ( lambda x : x ) ) , regexp_op_map . get ( db_type , 'LIKE' ) )
return safety filter and db opts for regex .