portage.dbapi._ContentsCaseSensitivityManager module¶
- class portage.dbapi._ContentsCaseSensitivityManager.ContentsCaseSensitivityManager(db)¶
Bases:
object
Implicitly handles case transformations that are needed for case-insensitive support.
- _case_insensitive_init()¶
Initialize data structures for case-insensitive support.
- _contains_case_insensitive(key)¶
Check if the given key is contained in the contents, using case-insensitive comparison when appropriate. :param key: A filesystem path (including ROOT and EPREFIX) :type key: str :rtype: bool :return: True if the given key is contained in the contents,
False otherwise
- _keys_case_insensitive()¶
Iterate over all contents keys, which are transformed to lowercase when appropriate, for use in case-insensitive comparisons. :rtype: iterator :return: An iterator over all the contents keys
- _unmap_key_case_insensitive(key)¶
Map a key (from the keys method) back to its case-preserved form. :param key: A filesystem path (including ROOT and EPREFIX) :type key: str :rtype: str :return: The case-preserved form of key
- clear_cache()¶
Clear all cached contents data.
- contains(key)¶
Check if the given key is contained in the contents, using case-insensitive comparison when appropriate. :param key: A filesystem path (including ROOT and EPREFIX) :type key: str :rtype: bool :return: True if the given key is contained in the contents,
False otherwise
- keys()¶
Iterate over all contents keys, which are transformed to lowercase when appropriate, for use in case-insensitive comparisons. :rtype: iterator :return: An iterator over all the contents keys
- unmap_key(key)¶
Map a key (from the keys method) back to its case-preserved form. :param key: A filesystem path (including ROOT and EPREFIX) :type key: str :rtype: str :return: The case-preserved form of key