MCPcopy Index your code
hub / github.com/clips/pattern / csv_header_decode

Function csv_header_decode

pattern/db/__init__.py:1551–1556  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

1549 return s
1550
1551def csv_header_decode(s):
1552 # csv_header_decode("age (INTEGER)") => ("age", INTEGER).
1553 p = r"STRING|INTEGER|FLOAT|TEXT|BLOB|BOOLEAN|DATE|"
1554 p = re.match(r"(.*?) \(("+p+")\)", s)
1555 s = s.endswith(" ()") and s[:-3] or s
1556 return p and (string(p.group(1), default=None), p.group(2).lower()) or (string(s) or None, None)
1557
1558class CSV(list):
1559

Callers 1

loadMethod · 0.85

Calls 3

stringFunction · 0.85
matchMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…