OwlCyberSecurity - MANAGER
Edit File: sql.cpython-39.pyc
a ���e�O � @ s� d Z ddlZddlmZ ddlmZmZ G dd� d�ZG dd� d�Z G d d � d e �Z G dd� de �ZG d d� dee �ZG dd� de �Z G dd� de �ZG dd� de �ZG dd� de �ZG dd� de �ZG dd� de �ZG dd� de �ZG dd� de �ZG dd � d e �ZG d!d"� d"e �ZG d#d$� d$e �ZG d%d&� d&e �ZG d'd(� d(ee �ZG d)d*� d*e �ZG d+d,� d,e �ZG d-d.� d.e �ZG d/d0� d0e �ZdS )1zFThis module contains classes representing syntactical elements of SQL.� N��tokens)�imt� remove_quotesc @ s e Zd ZdZdd� Zdd� ZdS )�NameAliasMixinz'Implements get_real_name and get_alias.c C s$ | j tjdfd�\}}| j|dd�S )�7Returns the real name (object name) of this identifier.�.��mT)� real_name)� token_next_by�T�Punctuation�_get_first_name)�self�dot_idx�_� r �M/home/gouroczh/virtualenv/pat/3.9/lib/python3.9/site-packages/sqlparse/sql.py� get_real_name s zNameAliasMixin.get_real_namec C sh | j tjdfd�\}}|dur0| j|d dd�S | j tjd�\}}t| j�dkrd|durd| jdd �S dS ) �2Returns the alias for this identifier or ``None``.ZASr N� T)�keywords��t� ��reverse)r r �Keywordr � Whitespace�lenr )r Zkw_idx�kwr �wsr r r � get_alias s zNameAliasMixin.get_aliasN)�__name__� __module__�__qualname__�__doc__r r# r r r r r s r c @ sf e Zd ZdZdZdd� Zdd� Zdd� Zd d � Zdd� Z d d� Z ddd�Zdd� Zdd� Z dd� ZdS )�Tokenz�Base class for all other classes in this module. It represents a single token and has two instance attributes: ``value`` is the unchanged value of the token and ``ttype`` is the type of the token. )�value�ttype�parent� normalized� is_keyword�is_group� is_whitespacec C sR t |�}|| _|| _d | _d| _|tjv | _| jtjv | _ | jrH|� � n|| _d S )NF)�strr) r* r+ r. r r r- r r/ �upperr, )r r* r) r r r �__init__2 s zToken.__init__c C s | j S �N�r) �r r r r �__str__<