Server IP : 192.158.238.246 / Your IP : 3.133.141.1 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python38/lib64/python3.8/site-packages/playhouse/__pycache__/ |
Upload File : |
U S��W� � @ s d Z ddlT G dd� de�ZdS )ag Support for using a dedicated read-slave. The read database is specified as a Model.Meta option, and will be used for SELECT statements: master = PostgresqlDatabase('master') read_slave = PostgresqlDatabase('read_slave') class BaseModel(ReadSlaveModel): class Meta: database = master read_slaves = [read_slave] # This database will be used for SELECTs. # Now define your models as you would normally. class User(BaseModel): username = CharField() # To force a SELECT on the master database, you can instantiate the SelectQuery # by hand: master_select = SelectQuery(User).where(...) � )�*c s<