Skip to content

Commit 015b806

Browse files
committed
feat(pg): add Go-style large export APIs (streaming, COPY, snapshots)
1 parent 8da6e60 commit 015b806

16 files changed

Lines changed: 1989 additions & 221 deletions

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ if (UPQ_BUILD_EXAMPLES)
119119
target_link_libraries(upq_example_timeout PRIVATE upq)
120120
target_compile_definitions(upq_example_timeout PRIVATE DEV_STAGE=${DEV_STAGE})
121121

122+
add_executable(upq_example_large_exports examples/large_exports.cpp)
123+
target_link_libraries(upq_example_large_exports PRIVATE upq)
124+
target_compile_definitions(upq_example_large_exports PRIVATE DEV_STAGE=${DEV_STAGE})
125+
122126
FetchContent_Declare(
123127
ulog
124128
GIT_REPOSITORY https://github.com/Usub-Foundation/ulog.git

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ with [ureflect](https://github.com/Usub-development/ureflect).
1919
* Safe transactional RAII wrapper (`PgTransaction`)
2020
* Parameter binding with `$1, $2, …`
2121
* Zero-copy non-blocking I/O pipeline
22-
* **NEW:** Reflection-aware queries (`query_reflect`, `exec_reflect`, `query_reflect_one`)
22+
* **Reflection-aware queries** (`query_reflect`, `exec_reflect`, `query_reflect_one`)
2323
→ automatic struct ↔ SQL row mapping via `ureflect`
24+
* Large-export API — cursor-backed `PgRowStream`,
25+
streaming `COPY TO` / `COPY FROM` with async sinks/sources,
26+
`pg_export_snapshot` support for parallel consistent dumps
27+
([see docs](docs/large-exports.md))
2428

2529
---
2630

0 commit comments

Comments
 (0)