MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / chunked_rows

Function chunked_rows

scripts/migrate_sqlite_to_postgres.py:68–72  ·  view source on GitHub ↗
(rows: Sequence[dict], chunk_size: int)

Source from the content-addressed store, hash-verified

66
67
68def chunked_rows(rows: Sequence[dict], chunk_size: int) -> Iterator[list[dict]]:
69 if chunk_size <= 0:
70 raise MigrationError("chunk_size 必须大于 0")
71 for index in range(0, len(rows), chunk_size):
72 yield list(rows[index:index + chunk_size])
73
74
75def reflect_metadata(engine: Engine) -> MetaData:

Callers 1

copy_tableFunction · 0.85

Calls 1

MigrationErrorClass · 0.85

Tested by

no test coverage detected