Skip to content
Snippets Groups Projects

ENH: add is_reference to db.Property

Merged Henrik tom Wörden requested to merge f-is-reference into dev
Files
14
@@ -45,6 +45,8 @@ def LIST(datatype):
def get_list_datatype(datatype):
""" returns the datatype of the elements in the list """
if not isinstance(datatype, str):
return None
match = re.match("LIST(<|&lt;)(?P<datatype>.*)(>|&gt;)", datatype)
if match is not None:
@@ -66,6 +68,10 @@ def is_reference(datatype):
RecordTypes
"""
if datatype is None:
raise ValueError("Cannot decide whether datatype is reference if None"
" is supplied")
if datatype in [DOUBLE, BOOLEAN, INTEGER, TEXT, DATETIME]:
return False
elif is_list_datatype(datatype):
Loading