File: //opt/alt/python37/lib64/python3.7/site-packages/psycopg2/__pycache__/sql.cpython-37.pyc
B
*��]: � @ s� d Z ddlZddlmZ ddlmZmZ e�� Z G dd� de
�ZG dd� de�ZG d d
� d
e�Z
G dd� de�ZG d
d� de�ZG dd� de�Ze
d�Ze
d�ZdS )zSQL composition utility module
� N)�
extensions)�PY3�string_typesc @ sH e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dS )�
Composablea6
Abstract base class for objects that can be used to compose an SQL string.
`!Composable` objects can be passed directly to `~cursor.execute()`,
`~cursor.executemany()`, `~cursor.copy_expert()` in place of the query
string.
`!Composable` objects can be joined using the ``+`` operator: the result
will be a `Composed` instance containing the objects joined. The operator
``*`` is also supported with an integer argument: the result is a
`!Composed` instance containing the left argument repeated as many times as
requested.
c C s
|| _ d S )N)�_wrapped)�self�wrapped� r �?/opt/alt/python37/lib64/python3.7/site-packages/psycopg2/sql.py�__init__1 s zComposable.__init__c C s d| j j| jf S )Nz%s(%r))� __class__�__name__r )r r r r
�__repr__4 s zComposable.__repr__c C s t �dS )aj
Return the string value of the object.
:param context: the context to evaluate the string into.
:type context: `connection` or `cursor`
The method is automatically invoked by `~cursor.execute()`,
`~cursor.executemany()`, `~cursor.copy_expert()` if a `!Composable` is
passed instead of the query string.
N)�NotImplementedError)r �contextr r r
� as_string7 s zComposable.as_stringc C s>