| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 810dfb2 commit a2154ff
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -179,6 +179,13 @@ class String(FieldType): | |||
| 179 | 179 | """Represents a string type.""" | |
| 180 | 180 | ||
| 181 | 181 | def __init__(self, size: Optional[int] = None): | |
| 182 | + """Initializer. | ||
| 183 | + | ||
| 184 | + Args: | ||
| 185 | + size: Size of the String. MAX is used if not specified. | ||
| 186 | + """ | ||
| 187 | + if size < 0: | ||
| 188 | + raise error.ValidationError('string size can not be negative') | ||
| 182 | 189 | self._size = size | |
| 183 | 190 | ||
| 184 | 191 | def ddl(self) -> str: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments