Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python38
/
lib64
/
python3.8
/
site-packages
/
playhouse
/
__pycache__
/
File Content:
read_slave.cpython-38.pyc
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<