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

Class _String

pattern/db/__init__.py:673–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671#### FIELD #########################################################################################
672
673class _String(str):
674 # The STRING constant can be called with a length when passed to field(),
675 # for example field("language", type=STRING(2), default="en", index=True).
676 def __new__(self):
677 return str.__new__(self, "string")
678 def __call__(self, length=100):
679 return "varchar(%s)" % (length>255 and 255 or (length<1 and 1 or length))
680
681# Field type.
682# Note: SQLite string fields do not impose a string limit.

Callers 1

__init__.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…