X7ROOT File Manager
Current Path:
/opt/imunify360/venv/lib/python3.11/site-packages/playhouse
opt
/
imunify360
/
venv
/
lib
/
python3.11
/
site-packages
/
playhouse
/
📁
..
📄
__init__.py
(0 B)
📁
__pycache__
📄
apsw_ext.py
(4.82 KB)
📄
cockroachdb.py
(9 KB)
📄
dataset.py
(14.09 KB)
📄
db_url.py
(4.15 KB)
📄
fields.py
(1.66 KB)
📄
flask_utils.py
(8 KB)
📄
hybrid.py
(1.49 KB)
📄
kv.py
(5.48 KB)
📄
migrate.py
(30.11 KB)
📄
mysql_ext.py
(3.17 KB)
📄
pool.py
(11.21 KB)
📄
postgres_ext.py
(14.41 KB)
📄
psycopg3_ext.py
(1.15 KB)
📄
reflection.py
(30.2 KB)
📄
shortcuts.py
(11.25 KB)
📄
signals.py
(2.46 KB)
📄
sqlcipher_ext.py
(3.55 KB)
📄
sqlite_changelog.py
(4.68 KB)
📄
sqlite_ext.py
(45.65 KB)
📄
sqlite_udf.py
(13.34 KB)
📄
sqliteq.py
(9.75 KB)
📄
test_utils.py
(1.81 KB)
Editing: psycopg3_ext.py
from peewee import * try: import psycopg #from psycopg.types.json import Jsonb except ImportError: psycopg = None class Psycopg3Database(PostgresqlDatabase): def _connect(self): if psycopg is None: raise ImproperlyConfigured('psycopg3 is not installed!') conn = psycopg.connect(dbname=self.database, **self.connect_params) if self._isolation_level is not None: conn.isolation_level = self._isolation_level conn.autocommit = True return conn def get_binary_type(self): return psycopg.Binary def _set_server_version(self, conn): self.server_version = conn.pgconn.server_version if self.server_version >= 90600: self.safe_create_index = True def is_connection_usable(self): if self._state.closed: return False # Returns True if we are idle, running a command, or in an active # connection. If the connection is in an error state or the connection # is otherwise unusable, return False. conn = self._state.conn return conn.pgconn.transaction_status < conn.TransactionStatus.INERROR
Upload File
Create Folder