Skip to content

Commit d938c50

Browse files
committed
Added more parameters to configure connection
Signed-off-by: chandr-andr (Kiselev Aleksandr) <chandr@chandr.net>
1 parent f85a092 commit d938c50

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

python/psqlpy/_internal/__init__.pyi

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,19 @@ class ConnLoadBalanceHosts(Enum):
108108
"""Load balancing configuration."""
109109

110110
# Make connection attempts to hosts in the order provided.
111-
Disable = (1,)
111+
Disable = 1
112112
# Make connection attempts to hosts in a random order.
113-
Random = (2,)
113+
Random = 2
114+
115+
class ConnTargetSessionAttrs(Enum):
116+
"""Properties required of a session."""
117+
118+
# No special properties are required.
119+
Any = 1
120+
# The session must allow writes.
121+
ReadWrite = 2
122+
# The session allow only reads.
123+
ReadOnly = 3
114124

115125
class ReadVariant(Enum):
116126
"""Class for Read Variant for transaction."""

0 commit comments

Comments
 (0)