(self)
| 88 | |
| 89 | |
| 90 | def create_new_shard(self): |
| 91 | self.shard_file = open(self.path / f'shard_{self.shard}.bin', 'wb') |
| 92 | self.shard_table = f'shard_{self.shard}' |
| 93 | print(f'[CACHE] Creating new shard: {self.shard_table}') |
| 94 | self.con.execute(f'CREATE TABLE {self.shard_table}(offset, size)') |
| 95 | self.shard_index = 0 |
| 96 | self.offset = 0 |
| 97 | |
| 98 | |
| 99 | def finalize_current_shard(self): |