MySQL NVARCHAR type. For variable-length character data in the server's configured national character set.
| 776 | |
| 777 | |
| 778 | class NVARCHAR(_StringType, sqltypes.NVARCHAR): |
| 779 | """MySQL NVARCHAR type. |
| 780 | |
| 781 | For variable-length character data in the server's configured national |
| 782 | character set. |
| 783 | """ |
| 784 | |
| 785 | __visit_name__ = "NVARCHAR" |
| 786 | |
| 787 | def __init__(self, length: Optional[int] = None, **kwargs: Any): |
| 788 | """Construct an NVARCHAR. |
| 789 | |
| 790 | :param length: Maximum data length, in characters. |
| 791 | |
| 792 | :param binary: Optional, use the default binary collation for the |
| 793 | national character set. This does not affect the type of data |
| 794 | stored, use a BINARY type for binary data. |
| 795 | |
| 796 | :param collation: Optional, request a particular collation. Must be |
| 797 | compatible with the national character set. |
| 798 | |
| 799 | """ |
| 800 | kwargs["national"] = True |
| 801 | super().__init__(length=length, **kwargs) |
| 802 | |
| 803 | |
| 804 | class NCHAR(_StringType, sqltypes.NCHAR): |