
    ng                        S SK Jr  S SKrS SKrS SKrS SKJr  S SKr	S SK
Jr  S SKJr  S SKJr  S SKJr  SS jr\R$                   " S S	5      5       rSS
 jrSS jrSS jrg)    )annotationsN)perf_counter)current_app)g)has_app_contextc                 0    [         R                  " S/ 5      $ )a6  Get the list of recorded query information for the current session. Queries are
recorded if the config :data:`.SQLALCHEMY_RECORD_QUERIES` is enabled.

Each query info object has the following attributes:

``statement``
    The string of SQL generated by SQLAlchemy with parameter placeholders.
``parameters``
    The parameters sent with the SQL statement.
``start_time`` / ``end_time``
    Timing info about when the query started execution and when the results where
    returned. Accuracy and value depends on the operating system.
``duration``
    The time the query took in seconds.
``location``
    A string description of where in your application code the query was executed.
    This may not be possible to calculate, and the format is not stable.

.. versionchanged:: 3.0
    Renamed from ``get_debug_queries``.

.. versionchanged:: 3.0
    The info object is a dataclass instead of a tuple.

.. versionchanged:: 3.0
    The info object attribute ``context`` is renamed to ``location``.

.. versionchanged:: 3.0
    Not enabled automatically in debug or testing mode.
_sqlalchemy_queries)r   get     g/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/flask_sqlalchemy/record_queries.pyget_recorded_queriesr      s    > 55&++r   c                  `    \ rS rSr% SrS\S'   S\S'   S\S'   S\S	'   S
\S'   \SS j5       rSrg)
_QueryInfo1   a  Information about an executed query. Returned by :func:`get_recorded_queries`.

.. versionchanged:: 3.0
    Renamed from ``_DebugQueryTuple``.

.. versionchanged:: 3.0
    Changed to a dataclass instead of a tuple.

.. versionchanged:: 3.0
    ``context`` is renamed to ``location``.
z
str | None	statementt.Any
parametersfloat
start_timeend_timestrlocationc                4    U R                   U R                  -
  $ N)r   r   )selfs    r   duration_QueryInfo.durationE   s    }}t..r   r   N)returnr   )	__name__
__module____qualname____firstlineno____doc____annotations__propertyr   __static_attributes__r   r   r   r   r   1   s7    
 OM/ /r   r   c                p    [         R                  " U S[        SS9  [         R                  " U S[        SS9  g )Nbefore_cursor_executeT)namedafter_cursor_execute)sa_eventlisten_record_start_record_end)engines    r   _listenr1   J   s(    OOF3]$OOOF2KtLr   c                B    [        5       (       d  g [        5       U l        g r   )r   r   _fsa_start_time)contextkwargss     r   r.   r.   O   s    *nGr   c           
        [        5       (       d  g S[        ;  a  / [        l        [        R                  R                  S5      S   nU S3n[        R                  " 5       nU(       a  UR                  R                  S5      nU(       aQ  XR:X  d  UR                  U5      (       a6  UR                  nUR                   SUR                   SUR                   S3nOUR                  nU(       a  M  Sn[        R                  R!                  [#        U R$                  U R&                  U R(                  [+        5       US	95        g )
Nr	   .r   r    :z ()z	<unknown>)r   r   r   r   r   )r   r   r	   r   import_name	partitioninspectcurrentframe	f_globalsr
   
startswithf_codeco_filenamef_linenoco_namef_backappendr   r   r   r3   r   )r4   r5   
import_top
import_dotframenamecoder   s           r   r/   r/   V   s
   A% "((2237:J<q!J  "E
"":.T'4??:+F+F<<D**+1U^^,<Bt||nANH %   ''))..!^	
r   )r   zlist[_QueryInfo])r0   zsa.engine.Enginer   None)r4   zsa.engine.ExecutionContextr5   r   r   rK   )
__future__r   dataclassesr<   typingttimer   
sqlalchemysasqlalchemy.eventeventr,   flaskr   r   r   r   	dataclassr   r1   r.   r/   r   r   r   <module>rW      sX    "      #   !,D / / /0M
-r   