Skip to content

Commit 3dd7da0

Browse files
committed
Document GtidSet.
1 parent 3ca6914 commit 3dd7da0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pymysqlreplication/gtid.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ def _to_gtid(element):
307307
self.gtids = [Gtid(x.strip(' \n')) for x in gtid_set.split(',')]
308308

309309
def merge_gtid(self, gtid):
310+
"""Insert a Gtid in current GtidSet."""
310311
new_gtids = []
311312
for existing in self.gtids:
312313
if existing.sid == gtid.sid:
@@ -319,6 +320,8 @@ def merge_gtid(self, gtid):
319320

320321
def __contains__(self, other):
321322
"""
323+
Test if self contains other, could be a GtidSet or a Gtid.
324+
322325
Raises:
323326
- NotImplementedError other is not a GtidSet neither a Gtid,
324327
please convert it first to one of them

0 commit comments

Comments
 (0)