(self, conn, records, event)
| 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: |