관리-도구
편집 파일: provision.cpython-311.pyc
� �܋f � � � d dl Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm Z dd lmZ ej d� � d� � � Z e j d� � d � � � Z ej d� � d� � � Z ej d� � d� � � Z ej d� � d� � � Z e j d� � d� � � ZdS )� N� )�url)� create_db)�drop_db)�follower_url_from_main)�log)�post_configure_engine)�run_reap_dbs)�temp_table_keyword_args�sqlitec � � t j | � � } | j r| j dk r| S t j d|z � � S )Nz:memory:zsqlite:///%s.db)�sa_url�make_url�database)r �idents �w/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/sqlalchemy/dialects/sqlite/provision.py�_sqlite_follower_url_from_mainr sB � � �/�#� � �C��<� :�3�<�:�5�5�� ���0�5�8�9�9�9� c �V �� ddl m} |� |d� � �fd�� � }d S )Nr )�event�connectc �j �� �s| � d� � d S | � d�z � � d S )Nz/ATTACH DATABASE "test_schema.db" AS test_schemaz2ATTACH DATABASE "%s_test_schema.db" AS test_schema)�execute)�dbapi_connection�connection_record�follower_idents �r r z._sqlite_post_configure_engine.<locals>.connect sc �� � � � �$�$�A� � � � � � �$�$�D� �!� � � � � r )� sqlalchemyr �listens_for)r �enginer r r s ` r �_sqlite_post_configure_enginer sS �� � � � � � � � ���v�y�)�)�� � � � *�)�� � r c � � d S )N� )�cfg�engr s r �_sqlite_create_dbr% . s � ��Dr c � � d|z d|z fD ]L}t j � |� � r+t j d|z � � t j |� � �Md S )N�%s.db�%s_test_schema.db�!deleting SQLite database file: %s)�os�path�existsr �info�remove)r# r$ r r+ s r �_sqlite_drop_dbr/ 3 sd � ��5��"5��"=�>� � �� �7�>�>�$��� ��H�8�4�?�@�@�@��I�d�O�O�O��� r c � � ddgiS )N�prefixes� TEMPORARYr"