관리-도구
편집 파일: baked.cpython-38.pyc
U -?�f�E � @ s� d Z ddlmZ ddlZddlmZ ddlmZ ddl mZ ddlmZ ddl mZ ddlmZ dd lmZ ddlmZ e�e�ZG d d� d�ZG dd � d �ZG dd� d�ZejZdS )z�Baked query extension. Provides a creational pattern for the :class:`.query.Query` object which allows the fully constructed object, Core select statement, and string compiled result to be fully cached. � N� )�exc)�util)�Query)�Session)�func)�literal_columnc @ s$ e Zd ZdZdZdd� Zdd� ZdS )�Bakeryz�Callable which returns a :class:`.BakedQuery`. This object is returned by the class method :meth:`.BakedQuery.bakery`. It exists as an object so that the "cache" can be easily inspected. .. versionadded:: 1.2 ��cls�cachec C s || _ || _d S �Nr )�selfZcls_r � r �D/opt/hc_python/lib64/python3.8/site-packages/sqlalchemy/ext/baked.py�__init__1 s zBakery.__init__c G s | � | j||�S r r )r � initial_fn�argsr r r �__call__5 s zBakery.__call__N)�__name__� __module__�__qualname__�__doc__� __slots__r r r r r r r # s r c @ s� e Zd ZdZdZd+dd�Zed,dd ��Zd d� Zd-dd �Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zd.dd�Zdd� Zd/dd �Zd0d!d"�Zd#d$� Zd%d&� Zd'd(� Zd)d*� ZdS )1� BakedQueryz3A builder object for :class:`.query.Query` objects.)�steps�_bakery� _cache_key�_spoiledr c C s* d| _ | �||� |g| _d| _|| _d S )Nr F)r �_update_cache_keyr r r )r �bakeryr r r r r r >