MCPcopy Create free account
hub / github.com/apache/qpid-proton / _load

Method _load

python/examples/db_common.py:73–86  ·  view source on GitHub ↗
(self, conn, records, event)

Source from the content-addressed store, hash-verified

71 self.injector.trigger(event)
72
73 def _load(self, conn, records, event):
74 if self.position:
75 cursor = conn.execute("SELECT * FROM records WHERE id > ? ORDER BY id", (self.position,))
76 else:
77 cursor = conn.execute("SELECT * FROM records ORDER BY id")
78 while not records.full():
79 row = cursor.fetchone()
80 if row:
81 self.position = row['id']
82 records.put(dict(row))
83 else:
84 break
85 if event:
86 self.injector.trigger(event)
87
88 def _insert(self, conn, id, data, event):
89 if id:

Callers 1

loadMethod · 0.95

Calls 3

executeMethod · 0.80
triggerMethod · 0.80
putMethod · 0.45

Tested by

no test coverage detected