cdms2.database:AbstractDatabase¶
-
AbstractDatabase.
matchone
(pattern, attname)¶ Search if the attribute with name attname is a string attribute which matches the compiled regular expression pattern, or if attname is None and pattern matches at least one string attribute.
- Parameters
- pattern: (str) pattern
attname: (str/None) attribute name
- Returns
- result: (int/True/False)
True if the attribute with name attname is a string attribute which matches the compiled regular expression pattern, or if attname is None and pattern matches at least one string attribute.
False if the attribute is not found or is not a string.