o
    Rih	                     @   s0   d Z ddlmZ ddlmZ G dd deZdS )zDatabase schema editor.    )Any)DatabaseSchemaEditorc                   @   s4   e Zd ZdZdedefddZdedefddZdS )	r   z\This class is responsible for emitting schema-changing statements to the
    databases.
    valuereturnc                 C   sP   | j   t|tr|dd}| j j j|}t|tr&t|tr&| }|S )zQuote value.%z%%)	
connectionensure_connection
isinstancestrreplace	converterescapebytesdecode)selfr   quoted r   T/home/air/SG/back/venv/lib/python3.10/site-packages/mysql/connector/django/schema.pyquote_value,   s   

z DatabaseSchemaEditor.quote_valuec                 C   s   |S )zImplement the required abstract method.

        MySQL has requires_literal_defaults=False, therefore return the value.
        r   )r   r   r   r   r   prepare_default6   s   z$DatabaseSchemaEditor.prepare_defaultN)__name__
__module____qualname____doc__r   r   r   r   r   r   r   r   '   s    
r   N)r   typingr   django.db.backends.mysql.schemar   MySQLDatabaseSchemaEditorr   r   r   r   <module>   s   