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

Function csv_header_encode

pattern/db/__init__.py:1544–1549  ·  view source on GitHub ↗
(field, type=STRING)

Source from the content-addressed store, hash-verified

1542csv.field_size_limit(sys.maxint)
1543
1544def csv_header_encode(field, type=STRING):
1545 # csv_header_encode("age", INTEGER) => "age (INTEGER)".
1546 t = re.sub(r"^varchar\(.*?\)", "string", (type or ""))
1547 t = t and " (%s)" % t or ""
1548 s = "%s%s" % (encode_utf8(field or ""), t.upper())
1549 return s
1550
1551def csv_header_decode(s):
1552 # csv_header_decode("age (INTEGER)") => ("age", INTEGER).

Callers 1

saveMethod · 0.85

Calls 1

encode_utf8Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…