관리-도구
편집 파일: baked.cpython-37.pyc
B ��4]�S � @ s< d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddl mZ ddlm Z dd lmZ dd lmZ ddlmZ e�e�ZG dd� de�ZG d d� de�ZG dd� de�Ze�dd�dd� �Ze�dd�dd� �Ze �� dd� �Zeje�dd�dd� ��Zeje�dd�dd� ��Z ej!Ze j"Z ej#Z#dS )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)�strategy_options)�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 )N)r r )�selfZcls_r � r �G/opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/ext/baked.py�__init__/ s zBakery.__init__c G s | � | j||�S )N)r r )r � initial_fn�argsr r r �__call__3 s zBakery.__call__N)�__name__� __module__�__qualname__�__doc__� __slots__r r r r r r r ! s r c @ s� e Zd ZdZdZd/dd�Zed0dd ��Zd d� Zd1dd �Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zd2dd�Zdd� Zd3dd �Zd4d!d"�Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� ZdS )5� 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 <