(s)
| 1549 | return s |
| 1550 | |
| 1551 | def 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 | |
| 1558 | class CSV(list): |
| 1559 |