MySQL VARCHAR type, for variable-length character data.
| 703 | |
| 704 | |
| 705 | class VARCHAR(_StringType, sqltypes.VARCHAR): |
| 706 | """MySQL VARCHAR type, for variable-length character data.""" |
| 707 | |
| 708 | __visit_name__ = "VARCHAR" |
| 709 | |
| 710 | def __init__(self, length: Optional[int] = None, **kwargs: Any) -> None: |
| 711 | """Construct a VARCHAR. |
| 712 | |
| 713 | :param charset: Optional, a column-level character set for this string |
| 714 | value. Takes precedence to 'ascii' or 'unicode' short-hand. |
| 715 | |
| 716 | :param collation: Optional, a column-level collation for this string |
| 717 | value. Takes precedence to 'binary' short-hand. |
| 718 | |
| 719 | :param ascii: Defaults to False: short-hand for the ``latin1`` |
| 720 | character set, generates ASCII in schema. |
| 721 | |
| 722 | :param unicode: Defaults to False: short-hand for the ``ucs2`` |
| 723 | character set, generates UNICODE in schema. |
| 724 | |
| 725 | :param national: Optional. If true, use the server's configured |
| 726 | national character set. |
| 727 | |
| 728 | :param binary: Defaults to False: short-hand, pick the binary |
| 729 | collation type that matches the column's character set. Generates |
| 730 | BINARY in schema. This does not affect the type of data stored, |
| 731 | only the collation of character data. |
| 732 | |
| 733 | """ |
| 734 | super().__init__(length=length, **kwargs) |
| 735 | |
| 736 | |
| 737 | class CHAR(_StringType, sqltypes.CHAR): |