class TEXT(_StringType, sqltypes.TEXT):
- """MySQL TEXT type, for text up to 2^16 characters."""
+ """MySQL TEXT type, for character storage encoded up to 2^16 bytes."""
__visit_name__ = "TEXT"
:param length: Optional, if provided the server may optimize storage
by substituting the smallest TEXT type sufficient to store
- ``length`` characters.
+ ``length`` bytes of characters.
:param charset: Optional, a column-level character set for this string
value. Takes precedence to 'ascii' or 'unicode' short-hand.
class TINYTEXT(_StringType):
- """MySQL TINYTEXT type, for text up to 2^8 characters."""
+ """MySQL TINYTEXT type, for character storage encoded up to 2^8 bytes."""
__visit_name__ = "TINYTEXT"
class MEDIUMTEXT(_StringType):
- """MySQL MEDIUMTEXT type, for text up to 2^24 characters."""
+ """MySQL MEDIUMTEXT type, for character storage encoded up
+ to 2^24 bytes."""
__visit_name__ = "MEDIUMTEXT"
class LONGTEXT(_StringType):
- """MySQL LONGTEXT type, for text up to 2^32 characters."""
+ """MySQL LONGTEXT type, for character storage encoded up to 2^32 bytes."""
__visit_name__ = "LONGTEXT"
super(CHAR, self).__init__(length=length, **kwargs)
@classmethod
- def _adapt_string_for_cast(self, type_):
+ def _adapt_string_for_cast(cls, type_):
# copy the given string type into a CHAR
# for the purposes of rendering a CAST expression
type_ = sqltypes.to_instance(type_)