FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add description · google/python-spanner-orm@a2154ff · GitHub

Commit a2154ff

Browse files
wlliu
committed
Add description
1 parent 810dfb2 commit a2154ff

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎spanner_orm/field.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,13 @@ class String(FieldType):
179179
"""Represents a string type."""
180180

181181
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')
182189
self._size = size
183190

184191
def ddl(self) -> str:

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL