OwlCyberSecurity - MANAGER
Edit File: sql.cpython-39.pyc
a gH�f0R � @ s� d Z ddlZddlmZ ddlmZ ddlmZm Z G dd� d�Z G dd � d �ZG d d� de�ZG dd � d e�Z G dd� de e�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG d d!� d!e�ZG d"d#� d#e�ZG d$d%� d%e�ZG d&d'� d'e�ZG d(d)� d)e�ZG d*d+� d+e e�ZG d,d-� d-e�ZG d.d/� d/e�ZG d0d1� d1e�ZG d2d3� d3e�Z dS )4zFThis module contains classes representing syntactical elements of SQL.� N��tokens)� SQLParseError)�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 �N/home/gouroczh/virtualenv/test/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_whitespace� is_newlinec C s` t |�}|| _|| _d | _d| _|tjv | _| jtjv | _ | jtj v | _| jrV|�� n|| _ d S )NF)�strr* r+ r, r/ r r r. r r0 ZNewliner1 �upperr- )r r+ r* r r r �__init__3 s zToken.__init__c C s | j S �N�r* �r r r r �__str__>