shell bypass 403
�
%f�B � �� � d Z ddlmZ ddlmZmZmZmZmZm Z m
Z
mZmZm
Z
mZmZmZ dZdZdZdZdZd Z G d
� de� Z G d� d
e� Z G d� de� Z G d� de� Z G d� de� Zy)z,Implementation of the CRUD database objects.� )�ProgrammingError)
�
FindStatement�AddStatement�RemoveStatement�ModifyStatement�SelectStatement�InsertStatement�DeleteStatement�UpdateStatement�CreateCollectionIndexStatement�DropCollectionIndexStatement�CreateViewStatement�AlterViewStatement�CreateTableStatementz_SELECT COUNT(*) FROM information_schema.views WHERE table_schema = '{0}' AND table_name = '{1}'z`SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '{0}' AND table_name = '{1}'zMSELECT COUNT(*) FROM information_schema.schemata WHERE schema_name like '{0}'z SELECT COUNT(*) FROM `{0}`.`{1}`z DROP TABLE IF EXISTS `{0}`.`{1}`zDROP VIEW IF EXISTS `{0}`.`{1}`c �T � e Zd ZdZd� Zed� � Zed� � Zd� Zd� Z d� Z
d� Zd � Zy
)�DatabaseObjectz�Provides base functionality for database objects.
Args:
schema (mysqlx.Schema): The Schema object.
name (str): The database object name.
c �r � || _ || _ | j j � j | _ y �N)�_schema�_name�get_session�_connection)�self�schema�names �B/usr/local/python-3.12/lib/python3.12/site-packages/mysqlx/crud.py�__init__zDatabaseObject.__init__5 s+ � ������
��<�<�3�3�5�A�A��� c � � | j S )z3:class:`mysqlx.Schema`: The Schema object.
�r �r s r r zDatabaseObject.schema: s � � �|�|�r c � � | j S )z/str: The name of this database object.
�r r! s r r zDatabaseObject.name@ s � � �z�z�r c � � | j S )z{Returns the Schema object of this database object.
Returns:
mysqlx.Schema: The Schema object.
r r! s r �
get_schemazDatabaseObject.get_schemaF s � � �|�|�r c � � | j S )zwReturns the name of this database object.
Returns:
str: The name of this database object.
r# r! s r �get_namezDatabaseObject.get_nameN s � � �z�z�r c � � t �)z�Verifies if this object exists in the database.
Returns:
bool: `True` if object exists in database.
Raises:
NotImplementedError: This method must be implemented.
)�NotImplementedErrorr! s r �exists_in_databasez!DatabaseObject.exists_in_databaseV s
� � "�!r c �"