o
    `oi                     @   st   d dl mZ d dlZd dlmZ d dlmZ ejdkr"d dlm	Z
 nd dlmZ
 dd	gZG d
d	 d	e
jZee
_dS )    )perf_counterN)Command)
connection
postgresql)base)utilsr   PrintQueryWrapperc                   @   s   e Zd ZdddZdS )r    c                 C   s   t  }z-| j||W | jj| j||}t  }|| d }tj|dd}t| d|dd S | jj| j||}t  }|| d }tj|dd}t| d|dd w )Ni  T)Zreindentz [z.2fzms])	r   cursorexecutedbopsZlast_executed_querysqlparseformatprint)selfsqlparams
start_timeZraw_sqlZend_timedurationZformatted_sqlr	   r	   w/var/www/html/kuke-dev/django-kuke/venv/lib/python3.10/site-packages/debug_toolbar/management/commands/debugsqlshell.pyr      s   zPrintQueryWrapper.executeN)r	   )__name__
__module____qualname__r   r	   r	   r	   r   r      s    )timer   r   Z%django.core.management.commands.shellr   Z	django.dbr   vendorZdjango.db.backends.postgresqlr   base_moduleZdjango.db.backendsr   __all__ZCursorDebugWrapperr   r	   r	   r	   r   <module>   s    

