--- /srv/reproducible-results/rbuild-debian/r-b-build.obZgKhvV/b1/libpqxx_7.10.0-2_amd64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.obZgKhvV/b2/libpqxx_7.10.0-2_amd64.changes ├── Files │ @@ -1,5 +1,5 @@ │ │ ff621924c9939d6d80bdb58203b23dca 2520444 debug optional libpqxx-7.10-dbgsym_7.10.0-2_amd64.deb │ 0d7d87ebe02b84408d81502b64d620ba 190540 libs optional libpqxx-7.10_7.10.0-2_amd64.deb │ 85054eee2d1c27be0a3c838e5e3b55df 358800 libdevel optional libpqxx-dev_7.10.0-2_amd64.deb │ - 0b73cd773750de8dc2235299eacd7ea4 2637444 doc optional libpqxx-doc_7.10.0-2_all.deb │ + 0f35862c635e64e40620a320705d5eee 2637384 doc optional libpqxx-doc_7.10.0-2_all.deb ├── libpqxx-doc_7.10.0-2_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2025-01-23 16:15:05.000000 debian-binary │ │ --rw-r--r-- 0 0 0 32392 2025-01-23 16:15:05.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 2604860 2025-01-23 16:15:05.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 32420 2025-01-23 16:15:05.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 2604772 2025-01-23 16:15:05.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -2,15 +2,15 @@ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-01-23 16:15:05.000000 ./usr/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-01-23 16:15:05.000000 ./usr/share/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-01-23 16:15:05.000000 ./usr/share/doc/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1322 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/changelog.Debian.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2807 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/copyright │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18206 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/accessing-results.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18203 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/accessing-results.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 81499 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/annotated.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 22300 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/annotated_dup.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 63073 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/array-composite_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 87535 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/array_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 674 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/bc_s.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 634 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/bc_sd.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8304 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/binary.html │ │ │ │ @@ -829,71 +829,71 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 168 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/nav_fd.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 95 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/nav_g.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 98 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/nav_h.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 111 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/nav_hd.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2167 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtree.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 15935 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtree.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5968 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtreedata.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19107 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtreeindex0.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19104 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtreeindex0.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 21285 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtreeindex1.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 19510 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtreeindex2.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 15193 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtreeindex3.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 17784 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtreeindex4.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18016 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtreeindex5.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18019 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtreeindex5.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2477 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/navtreeindex6.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 13256 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/nontransaction_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 16353 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/notification_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 122 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/open.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6420 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/pages.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12962 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/parameters.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 52695 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/params_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5810 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/performance.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 29855 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/pipeline_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 696 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/plus.svg │ │ │ │ -rw-r--r-- 0 root (0) root (0) 696 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/plusd.svg │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8893 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/pqxx-source_8hxx_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14798 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/prepared.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14801 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/prepared.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9364 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/prepared__statement_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 101844 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/range_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5685 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/resize.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8660 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/result-connection_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 11425 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/result-creation_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8756 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/result-pipeline_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8591 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/result-sql__cursor_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 63743 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/result_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 29407 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/result__iter_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 62185 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/result__iterator_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 19467 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/robusttransaction_8hxx_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 91997 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/row_8hxx_source.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7544 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_0.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4728 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_1.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6981 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_10.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21619 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_11.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7545 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_0.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4729 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_1.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6978 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_10.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21620 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_11.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7537 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_12.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2857 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_13.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 906 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_14.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1395 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_15.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1394 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_15.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 95 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_16.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1206 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_17.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1207 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_17.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 319 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_18.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 15545 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_2.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4604 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_3.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4603 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_3.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9409 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_4.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7171 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_5.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5454 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_6.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1038 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_7.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5821 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_8.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 147 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_9.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2895 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_a.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1394 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_b.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9602 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_c.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9163 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_d.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6426 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_e.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4664 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_f.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1393 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_b.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9603 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_c.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9162 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_d.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6428 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_e.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4663 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_f.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 875 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/classes_0.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1086 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/classes_1.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 975 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/classes_10.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 835 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/classes_11.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 157 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/classes_12.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 85 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/classes_13.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3820 2025-01-23 16:15:05.000000 ./usr/share/doc/libpqxx-doc/doxygen-html/search/classes_2.js │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/accessing-results.html │ │ │ │ @@ -93,38 +93,38 @@ │ │ │ │
Accessing results and result rows
│ │ │ │ │ │ │ │
│ │ │ │

A query produces a result set consisting of rows, and each row consists of fields. There are several ways to receive this data.

│ │ │ │

The fields are "untyped." That is to say, libpqxx has no opinion on what their types are. The database sends the data in a very flexible textual format. When you read a field, you specify what type you want it to be, and libpqxx converts the text format to that type for you.

│ │ │ │

If a value does not conform to the format for the type you specify, the conversion fails. For example, if you have strings that all happen to contain numbers, you can read them as int. But if any of the values is empty, or it's null (for a type that doesn't support null), or it's some string that does not look like an integer, or it's too large, you can't convert it to int.

│ │ │ │

So usually, reading result data from the database means not just retrieving the data; it also means converting it to some target type.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Querying rows of data

│ │ │ │

The simplest way to query rows of data is to call one of a transaction's "query" functions, passing as template arguments the types of columns you want to get back (e.g. int, std::string, double, and so on) and as a regular argument the query itself.

│ │ │ │

You can then iterate over the result to go over the rows of data:

│ │ │ │
for (auto [id, value] :
│ │ │ │
tx.query<int, std::string>("SELECT id, name FROM item"))
│ │ │ │
{
│ │ │ │
std::cout << id << '\t' << value << '\n';
│ │ │ │
}
│ │ │ │

The "query" functions execute your query, load the complete result data from the database, and then as you iterate, convert each row it received to a tuple of C++ types that you indicated.

│ │ │ │

There are different query functions for querying any number of rows (query()); querying just one row of data as a std::tuple and throwing an error if there's more than one row (query1()); or querying

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Streaming rows

│ │ │ │

There's another way to go through the rows coming out of a query. It's usually easier and faster if there are a lot of rows, but there are drawbacks.

│ │ │ │

One, you start getting rows before all the data has come in from the database. That speeds things up, but what happens if you lose your network connection while transferring the data? Your application may already have processed some of the data before finding out that the rest isn't coming. If that is a problem for your application, streaming may not be the right choice.

│ │ │ │

Two, streaming only works for some types of query. The stream() function wraps your query in a PostgreSQL COPY command, and COPY only supports a few commands: SELECT, VALUES, or an INSERT, UPDATE, or DELETE with a RETURNING clause. See the COPY documentation here: [ https://www.postgresql.org/docs/current/sql-copy.html ](https://www.postgresql.org/docs/current/sql-copy.html).

│ │ │ │

Three, when you convert a field to a "view" type (such as std::string_view or pqxx::bytes_view), the view points to underlying data which only stays valid until you iterate to the next row or exit the loop. So if you want to use that data for longer than a single iteration of the streaming loop, you'll have to store it somewhere yourself.

│ │ │ │

Now for the good news. Streaming does make it very easy to query data and loop over it, and often faster than with the "query" or "exec" functions:

│ │ │ │
for (auto [id, name, x, y] :
│ │ │ │
tx.stream<int, std::string_view, float, float>(
│ │ │ │
"SELECT id, name, x, y FROM point"))
│ │ │ │
process(id + 1, "point-" + name, x * 10.0, y * 10.0);
│ │ │ │

The conversion to C++ types (here int, std::string_view, and two floats) is built into the function. You never even see row objects, field objects, iterators, or conversion methods. You just put in your query and you receive your data.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Results with metadata

│ │ │ │

Sometimes you want more from a query result than just rows of data. You may need to know right away how many rows of result data you received, or how many rows your UPDATE statement has affected, or the names of the columns, etc.

│ │ │ │

For that, use the transaction's "exec" query execution functions. Apart from a few exceptions, these return a pqxx::result object. A result is a container of pqxx::row objects, so you can iterate them as normal, or index them like you would index an array. Each row in turn is a container of pqxx::field, Each field holds a value, but doesn't know its type. You specify the type when you read the value.

│ │ │ │

For example, your code might do:

│ │ │ │
pqxx::result r = tx.exec("SELECT * FROM mytable");
│ │ │ │
for (auto const &row: r)
│ │ │ │
{
│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/binary.html │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │
std::string hi{"Hello binary world"};
│ │ │ │
my_blob.write(pqxx::binary_cast(hi);
│ │ │ │
bytes_view binary_cast(TYPE const &data)
Cast binary data to a type that libpqxx will recognise as binary.
Definition util.hxx:409
│ │ │ │

The other takes a pointer and a size:

│ │ │ │
char const greeting[] = "Hello binary world";
│ │ │ │
char const *hi = greeting;
│ │ │ │
my_blob.write(pqxx::binary_cast(hi, sizeof(greeting)));
│ │ │ │ -

│ │ │ │ +

│ │ │ │ Caveats

│ │ │ │

There are some restrictions on binary_cast that you must be aware of.

│ │ │ │

First, your data must of a type that gives us bytes. So: char, unsigned char, signed char, int8_t, uint8_t, or of course std::byte. You can't feed in a vector of double, or anything like that.

│ │ │ │

Second, the data must be laid out as a contiguous block in memory. If there's no std::data() implementation for your type, it's not suitable.

│ │ │ │

Third, binary_cast only constructs something like a std::string_view. It does not make a copy of your actual data. So, make sure that your data remains alive and in the same place while you're using it.

│ │ │ │
│ │ │ │ │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1array__parser.html │ │ │ │ @@ -122,15 +122,15 @@ │ │ │ │   │ │ │ │ std::pair< juncture, std::string > get_next () │ │ │ │  Parse the next step in the array.
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Low-level parser for C++ arrays.

│ │ │ │ -
Deprecated:
Use pqxx::array instead.
│ │ │ │ +
Deprecated:
Use pqxx::array instead.
│ │ │ │

Clunky old API for parsing SQL arrays.

│ │ │ │
Warning
This parser will only work reliably if your client encoding is UTF-8, ASCII, or a "safe ASCII superset" (such as the EUC encodings) where a byte value in the ASCII range can only occur as an actual ASCII character, never as one byte in a multi-byte character.
│ │ │ │
│ │ │ │ The parser only supports array element types which use a comma (‘’,') as the separator between array elements. All built-in SQL types use comma, except forbox` which uses semicolon. However some custom types may not work.
│ │ │ │

The input is a C-style string containing the textual representation of an array, as returned by the database. The parser reads this representation on the fly. The string must remain in memory until parsing is done.

│ │ │ │

Parse the array by making calls to get_next until it returns a juncture of done. The juncture tells you what the parser found in that step: did the array "nest" to a deeper level, or "un-nest" back up?

│ │ │ │

Member Enumeration Documentation

│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1basic__fieldstream.html │ │ │ │ @@ -148,15 +148,15 @@ │ │ │ │ │ │ │ │  basic_fieldstream (field const &f) │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
│ │ │ │ class pqxx::basic_fieldstream< CHAR, TRAITS >

Input stream that gets its data from a result field.

│ │ │ │ -
Deprecated:
To convert a field's value string to some other type, e.g. to an int, use the field's as<...>() member function. To read a field efficiently just as a string, use its c_str() or its as<std::string_vview>().
│ │ │ │ +
Deprecated:
To convert a field's value string to some other type, e.g. to an int, use the field's as<...>() member function. To read a field efficiently just as a string, use its c_str() or its as<std::string_vview>().
│ │ │ │

Works like any other istream to read data from a field. It supports all formatting and streaming operations of std::istream. For convenience there is a fieldstream alias, which defines a basic_fieldstream for char. This is similar to how e.g. std::ifstream relates to std::basic_ifstream.

│ │ │ │

This class has only been tested for the char type (and its default traits).

│ │ │ │

The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1basic__ilostream.html │ │ │ │ @@ -151,15 +151,15 @@ │ │ │ │  basic_ilostream (dbtransaction &t, oid o, largeobject::size_type buf_size=512) │ │ │ │  Create a basic_ilostream.
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
│ │ │ │ class pqxx::basic_ilostream< CHAR, TRAITS >

Input stream that gets its data from a large object.

│ │ │ │ -
Deprecated:
Access large objects directly using the blob class.
│ │ │ │ +
Deprecated:
Access large objects directly using the blob class.
│ │ │ │

This class worked like any other istream, but to read data from a large object. It supported all formatting and streaming operations of std::istream.

│ │ │ │

This functionality was considered too fragile and complex, so it has been replaced with a single, much simpler class.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ basic_ilostream() [1/2]

│ │ │ │ │ │ │ │
│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1basic__lostream.html │ │ │ │ @@ -151,15 +151,15 @@ │ │ │ │  basic_lostream (dbtransaction &t, oid o, largeobject::size_type buf_size=512) │ │ │ │  Create a basic_lostream.
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
│ │ │ │ class pqxx::basic_lostream< CHAR, TRAITS >

Stream that reads and writes a large object.

│ │ │ │ -
Deprecated:
Access large objects directly using the blob class.
│ │ │ │ +
Deprecated:
Access large objects directly using the blob class.
│ │ │ │

This worked like a std::iostream, but to read data from, or write data to, a large object. It supported all formatting and streaming operations of std::iostream.

│ │ │ │

This functionality was considered too fragile and complex, so it has been replaced with a single, much simpler class.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ basic_lostream() [1/2]

│ │ │ │ │ │ │ │
│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1basic__olostream.html │ │ │ │ @@ -151,15 +151,15 @@ │ │ │ │  basic_olostream (dbtransaction &t, oid o, largeobject::size_type buf_size=512) │ │ │ │  Create a basic_olostream.
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
│ │ │ │ class pqxx::basic_olostream< CHAR, TRAITS >

Output stream that writes data back to a large object.

│ │ │ │ -
Deprecated:
Access large objects directly using the blob class.
│ │ │ │ +
Deprecated:
Access large objects directly using the blob class.
│ │ │ │

This worked like any other ostream, but to write data to a large object. It supported all formatting and streaming operations of std::ostream.

│ │ │ │

This functionality was considered too fragile and complex, so it has been replaced with a single, much simpler class.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ basic_olostream() [1/2]

│ │ │ │ │ │ │ │
│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1blob.html │ │ │ │ @@ -543,15 +543,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Read up to std::size(buf) bytes from the object.

│ │ │ │ -
Deprecated:
As libpqxx moves to C++20 as its baseline language version, this will take and return std::span<std::byte>.
│ │ │ │ +
Deprecated:
As libpqxx moves to C++20 as its baseline language version, this will take and return std::span<std::byte>.
│ │ │ │

Retrieves bytes from the blob, at the current position, until buf is full (i.e. its current size is reached), or there are no more bytes to read, whichever comes first.

│ │ │ │

This function will not change either the size or the capacity of buf, only its contents.

│ │ │ │

Returns the filled portion of buf. This may be empty.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1connection.html │ │ │ │ @@ -788,15 +788,15 @@ │ │ │ │ std::vector< pqxx::errorhandler * > pqxx::connection::get_errorhandlers │ │ │ │ ( │ │ │ │ ) │ │ │ │ const │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
Deprecated:
Return pointers to the active errorhandlers.
│ │ │ │ +
Deprecated:
Return pointers to the active errorhandlers.
│ │ │ │

The entries are ordered from oldest to newest handler.

│ │ │ │

The pointers point to the real errorhandlers. The container it returns however is a copy of the one internal to the connection, not a reference.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ get_notifs()

│ │ │ │ @@ -1528,15 +1528,15 @@ │ │ │ │ ) │ │ │ │ & │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Set session variable, using SQL's SET command.

│ │ │ │ -
Deprecated:
To set a session variable, use set_session_var. To set a transaction-local variable, execute an SQL SET command.
│ │ │ │ +
Deprecated:
To set a session variable, use set_session_var. To set a transaction-local variable, execute an SQL SET command.
│ │ │ │
Warning
When setting a string value, you must escape and quote it first. Use the quote() function to do that.
│ │ │ │
│ │ │ │ This executes an SQL query, so do not get or set variables while a table stream or pipeline is active on the same connection.
│ │ │ │
Parameters
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1errorhandler.html │ │ │ │ @@ -126,15 +126,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
varVariable to set.
valueNew value for Var. This can be any SQL expression. If it's a string, be sure that it's properly escaped and quoted.

│ │ │ │ Friends

│ │ │ │ class internal::gate::errorhandler_connection
 
│ │ │ │

Detailed Description

│ │ │ │ -
Deprecated:
Base class for obsolete error-handler callbacks.
│ │ │ │ +
Deprecated:
Base class for obsolete error-handler callbacks.
│ │ │ │

This method of handling errors is obsolete. Use a "notice handler" instead.

│ │ │ │
Warning
Strange things happen when a result object outlives its parent connection. If you register an error handler on a connection, then you must not access the result after destroying the connection. This applies even if you destroy the error handler first!
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ errorhandler()

│ │ │ │ │ │ │ │
│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1internal_1_1dynamic__params.html │ │ │ │ @@ -123,15 +123,15 @@ │ │ │ │   │ │ │ │ │ │ │ │ constexpr auto access (decltype(*std::declval< IT >()) value) const -> decltype(std::declval< ACCESSOR >()(value)) │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<typename IT, typename ACCESSOR = decltype(iterator_identity<IT>)>
│ │ │ │ -class pqxx::internal::dynamic_params< IT, ACCESSOR >
Deprecated:
Use params instead.
│ │ │ │ +class pqxx::internal::dynamic_params< IT, ACCESSOR >
Deprecated:
Use params instead.
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ dynamic_params() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1largeobject.html │ │ │ │ @@ -171,15 +171,15 @@ │ │ │ │   │ │ │ │ │ │ │ │ PQXX_PRIVATE std::string reason (connection const &, int err) const │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Identity of a large object.

│ │ │ │ -
Deprecated:
Use the blob class instead.
│ │ │ │ +
Deprecated:
Use the blob class instead.
│ │ │ │

Encapsulates the identity of a large object.

│ │ │ │

A largeobject must be accessed only from within a backend transaction, but the object's identity remains valid as long as the object exists.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ largeobject() [1/5]

│ │ │ │ │ │ │ │
│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1largeobject__streambuf.html │ │ │ │ @@ -190,15 +190,15 @@ │ │ │ │ │ │ │ │ virtual int_type underflow () override │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
│ │ │ │ class pqxx::largeobject_streambuf< CHAR, TRAITS >

Streambuf to use large objects in standard I/O streams.

│ │ │ │ -
Deprecated:
Access large objects directly using the blob class.
│ │ │ │ +
Deprecated:
Access large objects directly using the blob class.
│ │ │ │

The standard streambuf classes provide uniform access to data storage such as files or string buffers, so they can be accessed using standard input or output streams. This streambuf implementation provided similar access to large objects, so they could be read and written using the same stream classes.

│ │ │ │

This functionality was considered too fragile and complex, so it has been replaced with a single, much simpler class.

│ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ default_mode

│ │ │ │ │ │ │ │
│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1largeobjectaccess.html │ │ │ │ @@ -238,15 +238,15 @@ │ │ │ │   │ │ │ │ bool operator>= (largeobject const &other) const │ │ │ │  Compare object identities.
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Accessor for large object's contents.

│ │ │ │ -
Deprecated:
Use the blob class instead.
│ │ │ │ +
Deprecated:
Use the blob class instead.
│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ openmode

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1params.html │ │ │ │ @@ -181,15 +181,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
(binarystring const & value) &
│ │ │ │
│ │ │ │ -
Deprecated:
Append binarystring parameter.
│ │ │ │ +
Deprecated:
Append binarystring parameter.
│ │ │ │

The binarystring must stay valid for as long as the params remains active.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ append() [2/6]

│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1quiet__errorhandler.html │ │ │ │ @@ -137,15 +137,15 @@ │ │ │ │  errorhandler (errorhandler const &)=delete │ │ │ │   │ │ │ │ │ │ │ │ errorhandleroperator= (errorhandler const &)=delete │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │ -
Deprecated:
Use a notice handler instead.
│ │ │ │ +
Deprecated:
Use a notice handler instead.
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ operator()()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1row.html │ │ │ │ @@ -497,15 +497,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
) const
│ │ │ │
│ │ │ │

Produce a slice of this row, containing the given range of columns.

│ │ │ │ -
Deprecated:
I haven't heard of anyone caring about row slicing at all in at least the last 15 years. Yet it adds complexity, so unless anyone files a bug explaining why they really need this feature, I'm going to remove it. Even if they do, the feature may need an update.
│ │ │ │ +
Deprecated:
I haven't heard of anyone caring about row slicing at all in at least the last 15 years. Yet it adds complexity, so unless anyone files a bug explaining why they really need this feature, I'm going to remove it. Even if they do, the feature may need an update.
│ │ │ │

The slice runs from the range's starting column to the range's end column, exclusive. It looks just like a normal result row, except slices can be empty.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ table_column()

│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1stream__from.html │ │ │ │ @@ -209,15 +209,15 @@ │ │ │ │   │ │ │ │ static stream_from table (transaction_base &tx, table_path path, std::initializer_list< std::string_view > columns={}) │ │ │ │  Factory: Stream data from a given table.
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Stream data from the database.

│ │ │ │ -
Deprecated:
Use transaction_base::stream.
│ │ │ │ +
Deprecated:
Use transaction_base::stream.
│ │ │ │

For larger data sets, retrieving data this way is likely to be faster than executing a query and then iterating and converting the rows fields. You will also be able to start processing before all of the data has come in.

│ │ │ │

There are also downsides. Not all kinds of query will work in a stream. But straightforward SELECT and UPDATE ... RETURNING queries should work. This function makes use of pqxx::stream_from, which in turn uses PostgreSQL's COPY command, so see the documentation for those to get the full details.

│ │ │ │

There are other downsides. If there stream encounters an error, it may leave the entire connection in an unusable state, so you'll have to give the whole thing up. Finally, opening a stream puts the connection in a special state, so you won't be able to do many other things with the connection or the transaction while the stream is open.

│ │ │ │

There are two ways of starting a stream: you stream either all rows in a table (using one of the factories, table() or raw_table()), or the results of a query (using the query() factory).

│ │ │ │

Usually you'll want the stream convenience wrapper in transaction_base, * so you don't need to deal with this class directly.

│ │ │ │
Warning
While a stream is active, you cannot execute queries, open a pipeline, etc. on the same transaction. A transaction can have at most one object of a type derived from pqxx::transaction_focus active on it at a time.
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ @@ -250,15 +250,15 @@ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Execute query, and stream over the results.

│ │ │ │ -
Deprecated:
Use factory function query instead.
│ │ │ │ +
Deprecated:
Use factory function query instead.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ stream_from() [2/7]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -287,15 +287,15 @@ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Stream all rows in table, all columns.

│ │ │ │ -
Deprecated:
Use factories table or raw_table instead.
│ │ │ │ +
Deprecated:
Use factories table or raw_table instead.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ stream_from() [3/7]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -346,15 +346,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Stream given columns from all rows in table.

│ │ │ │ -
Deprecated:
Use factories table or raw_table instead.
│ │ │ │ +
Deprecated:
Use factories table or raw_table instead.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ stream_from() [4/7]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -399,15 +399,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Stream given columns from all rows in table.

│ │ │ │ -
Deprecated:
Use factory function query instead.
│ │ │ │ +
Deprecated:
Use factory function query instead.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ stream_from() [5/7]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -436,15 +436,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
Deprecated:
Use factories table or raw_table instead.
│ │ │ │ +
Deprecated:
Use factories table or raw_table instead.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ stream_from() [6/7]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -481,15 +481,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
Deprecated:
Use factories table or raw_table instead.
│ │ │ │ +
Deprecated:
Use factories table or raw_table instead.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ stream_from() [7/7]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -524,15 +524,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
Deprecated:
Use factories table or raw_table instead.
│ │ │ │ +
Deprecated:
Use factories table or raw_table instead.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ complete()

│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/classpqxx_1_1stream__to.html │ │ │ │ @@ -218,15 +218,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Create a stream, without specifying columns.

│ │ │ │ -
Deprecated:
Use table or raw_table as a factory.
│ │ │ │ +
Deprecated:
Use table or raw_table as a factory.
│ │ │ │

Fields will be inserted in whatever order the columns have in the database.

│ │ │ │

You'll probably want to specify the columns, so that the mapping between your data fields and the table is explicit in your code, and not hidden in an "implicit contract" between your code and your schema.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ stream_to() [2/2]

│ │ │ │ @@ -267,15 +267,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Create a stream, specifying column names as a container of strings.

│ │ │ │ -
Deprecated:
Use table or raw_table as a factory.
│ │ │ │ +
Deprecated:
Use table or raw_table as a factory.
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ complete()

│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/datatypes.html │ │ │ │ @@ -93,52 +93,52 @@ │ │ │ │
Supporting additional data types
│ │ │ │ │ │ │ │
│ │ │ │

Communication with the database mostly happens in a text format. When you include an integer value in a query, either you use to_string to convert it to that text format, or under the bonnet, libpqxx does it for you. When you get a query result field "as a float," libpqxx converts from the text format to a floating-point type. These conversions are everywhere in libpqxx.

│ │ │ │

The conversion system supports many built-in types, but it is also extensible. You can "teach" libpqxx (in the scope of your own application) to convert additional types of values to and from PostgreSQL's string format.

│ │ │ │

This is massively useful, but it's not for the faint of heart. You'll need to specialise some templates. And, the API for doing this can change with any major libpqxx release.

│ │ │ │

If that happens, your code may fail to compile with the newer libpqxx version, and you'll have to go through the NEWS file to find the API changes. Usually it'll be a small change, like an additional function you need to implement, or a constant you need to define.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Converting types

│ │ │ │

In your application, a conversion is driven entirely by a C++ type you specify. The value's SQL type on the database side has nothing to do with it. Nor is there anything in the string that would identify its type. Your code says "convert to this type" and libpqxx does it.

│ │ │ │

So, if you've SELECTed a 64-bit integer from the database, and you try to convert it to a C++ short, one of two things will happen: either the number is small enough to fit in your short and it just works, or else it throws a conversion exception. Similarly, if you try to read a 32-bit SQL int as a C++ 32-bit unsigned int, that'll work fine, unless the value happens to be negative. In such cases the conversion will throw a conversion_error.

│ │ │ │

Or, your database table might have a text column, but a given field may contain a string that looks just like a number. You can convert that value to an integer type just fine. Or to a floating-point type. All that matters to the conversion is the actual value, and the type your code specifies.

│ │ │ │

In some cases the templates for these conversions can tell the type from the arguments you pass them:

│ │ │ │
auto x = to_string(99);
│ │ │ │

In other cases you may need to instantiate template explicitly:

│ │ │ │
auto y = from_string<int>("99");
│ │ │ │ -

│ │ │ │ +

│ │ │ │ Supporting a new type

│ │ │ │

Let's say you have some other SQL type which you want to be able to store in, or retrieve from, the database. What would it take to support that?

│ │ │ │

Sometimes you do not need complete support. You might need a conversion to a string but not from a string, for example. You write out the conversion at compile time, so don't be too afraid to be incomplete. If you leave out one of these steps, it's not going to crash at run time or mess up your data. The worst that can happen is that your code won't build.

│ │ │ │

So what do you need for a complete conversion?

│ │ │ │

First off, of course, you need a C++ type. It may be your own, but it doesn't have to be. It could be a type from a third-party library, or even one from the standard library that libpqxx does not yet support.

│ │ │ │

First thing to do is specialise the pqxx::type_name variable to give the type a human-readable name. That allows libpqxx error messages and such to talk about the type. If you don't define a name, libpqxx will try to figure one out with some help from the compiler, but it may not always be easy to read.

│ │ │ │

Then, does your type have a built-in null value? For example, a char * can be null on the C++ side. Or some types are always null, such as nullptr. You specialise the pqxx::nullness template to specify the details.

│ │ │ │

Finally, you specialise the pqxx::string_traits template. This is where you define the actual conversions.

│ │ │ │

Let's go through these steps one by one.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Your type

│ │ │ │

You'll need a type for which the conversions are not yet defined, because the C++ type is what determines the right conversion. One type, one set of conversions.

│ │ │ │

The type doesn't have to be one that you create. The conversion logic was designed such that you can build it around any type. So you can just as easily build a conversion for a type that's defined somewhere else. There's no need to include any special methods or other members inside the type itself. That's also why libpqxx can convert built-in types like int.

│ │ │ │

By the way, if the type is an enum, you don't need to do any of this. Just invoke the preprocessor macro PQXX_DECLARE_ENUM_CONVERSION, from the global namespace near the top of your translation unit, and pass the type as an argument.

│ │ │ │

The library also provides specialisations for std::optional<T>, std::shared_ptr<T>, and std::unique_ptr<T>. If you have conversions for T, you'll also automatically have conversions for those.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Specialise <tt>type_name</tt>

│ │ │ │

When errors happen during conversion, libpqxx will compose error messages for the user. Sometimes these will include the name of the type that's being converted.

│ │ │ │

To tell libpqxx the name of each type, there's a template variable called pqxx::type_name. For any given type T, it should have a specialisation that provides that T's human-readable name:

│ │ │ │
// T is your type.
│ │ │ │
namespace pqxx
│ │ │ │
{
│ │ │ │
template<> std::string const type_name<T>{"My T type's name"};
│ │ │ │
}
│ │ │ │
The home of all libpqxx classes, functions, templates, etc.
Definition array.cxx:27
│ │ │ │

(Yes, this means that you need to define something inside the pqxx namespace. Future versions of libpqxx may move this into a separate namespace.)

│ │ │ │

Define this early on in your translation unit, before any code that might cause libpqxx to need the name. That way, the libpqxx code which needs to know the type's name can see your definition.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Specialise <tt>nullness</tt>

│ │ │ │

A struct template pqxx::nullness defines whether your type has a natural "null value" built in. If so, it also provides member functions for producing and recognising null values.

│ │ │ │

The simplest scenario is also the most common: most types don't have a null value built in. There is no "null `int`" in C++. In that kind of case, just derive your nullness traits from pqxx::no_null as a shorthand:

│ │ │ │
// T is your type.
│ │ │ │
namespace pqxx
│ │ │ │
{
│ │ │ │
template<> struct nullness<T> : pqxx::no_null<T> {};
│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/deprecated.html │ │ │ │ @@ -91,91 +91,91 @@ │ │ │ │ │ │ │ │
│ │ │ │
Deprecated List
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
Class pqxx::array_parser
│ │ │ │ -
Use pqxx::array instead.
│ │ │ │ +
Use pqxx::array instead.
│ │ │ │
Class pqxx::basic_fieldstream< CHAR, TRAITS >
│ │ │ │ -
To convert a field's value string to some other type, e.g. to an int, use the field's as<...>() member function. To read a field efficiently just as a string, use its c_str() or its as<std::string_vview>().
│ │ │ │ +
To convert a field's value string to some other type, e.g. to an int, use the field's as<...>() member function. To read a field efficiently just as a string, use its c_str() or its as<std::string_vview>().
│ │ │ │
Class pqxx::basic_ilostream< CHAR, TRAITS >
│ │ │ │ -
Access large objects directly using the blob class.
│ │ │ │ +
Access large objects directly using the blob class.
│ │ │ │
Class pqxx::basic_lostream< CHAR, TRAITS >
│ │ │ │ -
Access large objects directly using the blob class.
│ │ │ │ +
Access large objects directly using the blob class.
│ │ │ │
Class pqxx::basic_olostream< CHAR, TRAITS >
│ │ │ │ -
Access large objects directly using the blob class.
│ │ │ │ +
Access large objects directly using the blob class.
│ │ │ │
Class pqxx::binarystring
│ │ │ │ -
Use bytes and bytes_view for binary data. In C++20 or better, any contiguous_range of std::byte will do.
│ │ │ │ +
Use bytes and bytes_view for binary data. In C++20 or better, any contiguous_range of std::byte will do.
│ │ │ │
Member pqxx::blob::read (std::vector< std::byte, ALLOC > &buf)
│ │ │ │ -
As libpqxx moves to C++20 as its baseline language version, this will take and return std::span<std::byte>.
│ │ │ │ +
As libpqxx moves to C++20 as its baseline language version, this will take and return std::span<std::byte>.
│ │ │ │
Member pqxx::connection::get_errorhandlers () const
│ │ │ │ -
Return pointers to the active errorhandlers.
│ │ │ │ +
Return pointers to the active errorhandlers.
│ │ │ │
Member pqxx::connection::set_variable (std::string_view var, std::string_view value) &
│ │ │ │ -
To set a session variable, use set_session_var. To set a transaction-local variable, execute an SQL SET command.
│ │ │ │ +
To set a session variable, use set_session_var. To set a transaction-local variable, execute an SQL SET command.
│ │ │ │
Member pqxx::connection_base
│ │ │ │ -
Old base class for connection. They are now the same class.
│ │ │ │ +
Old base class for connection. They are now the same class.
│ │ │ │
Member pqxx::encrypt_password (zview user, zview password)
│ │ │ │ -
Use connection::encrypt_password instead.
│ │ │ │ +
Use connection::encrypt_password instead.
│ │ │ │
Member pqxx::encrypt_password (char const user[], char const password[])
│ │ │ │ -
Use connection::encrypt_password instead.
│ │ │ │ +
Use connection::encrypt_password instead.
│ │ │ │
Class pqxx::errorhandler
│ │ │ │ -
Base class for obsolete error-handler callbacks.
│ │ │ │ +
Base class for obsolete error-handler callbacks.
│ │ │ │
Member pqxx::fieldstream
│ │ │ │ -
Read a field using field::as<...>() or field::c_str().
│ │ │ │ +
Read a field using field::as<...>() or field::c_str().
│ │ │ │
Member pqxx::from_query
│ │ │ │ -
Use transaction_base::stream instead of stream_from.
│ │ │ │ +
Use transaction_base::stream instead of stream_from.
│ │ │ │
Struct pqxx::from_query_t
│ │ │ │ -
Use stream_from::query() instead.
│ │ │ │ +
Use stream_from::query() instead.
│ │ │ │
Member pqxx::from_table
│ │ │ │ -
Use transaction_base::stream instead of stream_from.
│ │ │ │ +
Use transaction_base::stream instead of stream_from.
│ │ │ │
Struct pqxx::from_table_t
│ │ │ │ -
Use stream_from::table() instead.
│ │ │ │ +
Use stream_from::table() instead.
│ │ │ │
Class pqxx::internal::dynamic_params< IT, ACCESSOR >
│ │ │ │ -
Use params instead.
│ │ │ │ +
Use params instead.
│ │ │ │
Class pqxx::largeobject
│ │ │ │ -
Use the blob class instead.
│ │ │ │ +
Use the blob class instead.
│ │ │ │
Class pqxx::largeobject_streambuf< CHAR, TRAITS >
│ │ │ │ -
Access large objects directly using the blob class.
│ │ │ │ +
Access large objects directly using the blob class.
│ │ │ │
Class pqxx::largeobjectaccess
│ │ │ │ -
Use the blob class instead.
│ │ │ │ +
Use the blob class instead.
│ │ │ │
Member pqxx::operator<< (std::basic_ostream< CHAR > &s, field const &value)
│ │ │ │ -
The C++ streams library is not great to work with. In particular, error handling is easy to get wrong. So you're probably better off doing this by hand.
│ │ │ │ +
The C++ streams library is not great to work with. In particular, error handling is easy to get wrong. So you're probably better off doing this by hand.
│ │ │ │
Member pqxx::params::append (binarystring const &value) &
│ │ │ │ -
Append binarystring parameter.
│ │ │ │ +
Append binarystring parameter.
│ │ │ │
Namespace pqxx::prepare
│ │ │ │ -
The new params class replaces all of this.
│ │ │ │ +
The new params class replaces all of this.
│ │ │ │
Class pqxx::quiet_errorhandler
│ │ │ │ -
Use a notice handler instead.
│ │ │ │ +
Use a notice handler instead.
│ │ │ │
Member pqxx::row::slice (size_type sbegin, size_type send) const
│ │ │ │ -
I haven't heard of anyone caring about row slicing at all in at least the last 15 years. Yet it adds complexity, so unless anyone files a bug explaining why they really need this feature, I'm going to remove it. Even if they do, the feature may need an update.
│ │ │ │ +
I haven't heard of anyone caring about row slicing at all in at least the last 15 years. Yet it adds complexity, so unless anyone files a bug explaining why they really need this feature, I'm going to remove it. Even if they do, the feature may need an update.
│ │ │ │
Class pqxx::stream_from
│ │ │ │ -
Use transaction_base::stream.
│ │ │ │ -
Member pqxx::stream_from::stream_from (transaction_base &, std::string_view table, Iter columns_begin, Iter columns_end)
│ │ │ │ -
Use factories table or raw_table instead.
│ │ │ │ -
Member pqxx::stream_from::stream_from (transaction_base &tx, std::string_view table, Columns const &columns)
│ │ │ │ +
Use transaction_base::stream.
│ │ │ │ +
Member pqxx::stream_from::stream_from (transaction_base &, from_table_t, std::string_view table, Iter columns_begin, Iter columns_end)
│ │ │ │
Use factories table or raw_table instead.
│ │ │ │ -
Member pqxx::stream_from::stream_from (transaction_base &tx, std::string_view table)
│ │ │ │ -
Use factories table or raw_table instead.
│ │ │ │
Member pqxx::stream_from::stream_from (transaction_base &tx, from_table_t, std::string_view table, Columns const &columns)
│ │ │ │ -
Use factory function query instead.
│ │ │ │ -
Member pqxx::stream_from::stream_from (transaction_base &, from_table_t, std::string_view table, Iter columns_begin, Iter columns_end)
│ │ │ │ -
Use factories table or raw_table instead.
│ │ │ │ +
Use factory function query instead.
│ │ │ │ +
Member pqxx::stream_from::stream_from (transaction_base &tx, std::string_view table)
│ │ │ │ +
Use factories table or raw_table instead.
│ │ │ │ +
Member pqxx::stream_from::stream_from (transaction_base &tx, std::string_view table, Columns const &columns)
│ │ │ │ +
Use factories table or raw_table instead.
│ │ │ │ +
Member pqxx::stream_from::stream_from (transaction_base &, std::string_view table, Iter columns_begin, Iter columns_end)
│ │ │ │ +
Use factories table or raw_table instead.
│ │ │ │
Member pqxx::stream_from::stream_from (transaction_base &, from_table_t, std::string_view table)
│ │ │ │ -
Use factories table or raw_table instead.
│ │ │ │ +
Use factories table or raw_table instead.
│ │ │ │
Member pqxx::stream_from::stream_from (transaction_base &, from_query_t, std::string_view query)
│ │ │ │ -
Use factory function query instead.
│ │ │ │ -
Member pqxx::stream_to::stream_to (transaction_base &tx, std::string_view table_name)
│ │ │ │ -
Use table or raw_table as a factory.
│ │ │ │ +
Use factory function query instead.
│ │ │ │
Member pqxx::stream_to::stream_to (transaction_base &, std::string_view table_name, Columns const &columns)
│ │ │ │ -
Use table or raw_table as a factory.
│ │ │ │ +
Use table or raw_table as a factory.
│ │ │ │ +
Member pqxx::stream_to::stream_to (transaction_base &tx, std::string_view table_name)
│ │ │ │ +
Use table or raw_table as a factory.
│ │ │ │
Member pqxx::strip_t
│ │ │ │ -
In C++20 we'll replace this with std::remove_cvref.
│ │ │ │ +
In C++20 we'll replace this with std::remove_cvref.
│ │ │ │
Member pqxx::transaction_base::set_variable (std::string_view var, std::string_view value)
│ │ │ │ -
To set a transaction-local variable, execute an SQL SET command. To set a session variable, use the connection's set_session_var function.
│ │ │ │ +
To set a transaction-local variable, execute an SQL SET command. To set a session variable, use the connection's set_session_var function.
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

◆ table_path

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1486,15 +1486,15 @@ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Encrypt a password.

│ │ │ │ -
Deprecated:
Use connection::encrypt_password instead.
│ │ │ │ +
Deprecated:
Use connection::encrypt_password instead.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ encrypt_password() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1525,15 +1525,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Encrypt password.

│ │ │ │ -
Deprecated:
Use connection::encrypt_password instead.
│ │ │ │ +
Deprecated:
Use connection::encrypt_password instead.
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ from_string()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1701,15 +1701,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Write a result field to any type of stream.

│ │ │ │ -
Deprecated:
The C++ streams library is not great to work with. In particular, error handling is easy to get wrong. So you're probably better off doing this by hand.
│ │ │ │ +
Deprecated:
The C++ streams library is not great to work with. In particular, error handling is easy to get wrong. So you're probably better off doing this by hand.
│ │ │ │

This can be convenient when writing a field to an output stream. More importantly, it lets you write a field to e.g. a stringstream which you can then use to read, format and convert the field in ways that to() does not support.

│ │ │ │

Example: parse a field into a variable of the nonstandard long long type.

│ │ │ │
extern result R;
│ │ │ │
long long L;
│ │ │ │
stringstream S;
│ │ │ │
│ │ │ │
// Write field's string into S
│ │ │ │ @@ -1985,15 +1985,15 @@ │ │ │ │ │ │ │ │ constexpr │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Pass this to a stream_from constructor to stream query results.

│ │ │ │ -
Deprecated:
Use transaction_base::stream instead of stream_from.
│ │ │ │ +
Deprecated:
Use transaction_base::stream instead of stream_from.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ from_table

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2010,15 +2010,15 @@ │ │ │ │ │ │ │ │ constexpr │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Pass this to a stream_from constructor to stream table contents.

│ │ │ │ -
Deprecated:
Use transaction_base::stream instead of stream_from.
│ │ │ │ +
Deprecated:
Use transaction_base::stream instead of stream_from.
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ has_generic_bytes_char_traits

│ │ │ │ │ │ │ │
│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/namespacepqxx_1_1prepare.html │ │ │ │ @@ -90,15 +90,15 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
pqxx::prepare Namespace Reference
│ │ │ │
│ │ │ │
│ │ │ │

Detailed Description

│ │ │ │ -
Deprecated:
The new params class replaces all of this.
│ │ │ │ +
Deprecated:
The new params class replaces all of this.
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Inserting the 101 in there is awkward and even dangerous. We'll get to that in a moment. Here's how you do it better, using parameters:

│ │ │ │
pqxx::result r = tx.exec("SELECT name FROM employee WHERE id=$1", {101});
│ │ │ │

That second argument to exec(), the {101}, constructs a pqxx::params object. The exec() call will fill this value in where the query says $1.

│ │ │ │

Doing this saves you work. If you don't use statement parameters, you'll need to quote and escape your values (see connection::quote() and friends) as you insert them into your query as literal values.

│ │ │ │

Or if you forget to do that, you leave yourself open to horrible SQL injection attacks. Trust me, I was born in a town whose name started with an apostrophe!

│ │ │ │

With parameters you can pass your values as they are, and they will go across the wire to the database in a safe format.

│ │ │ │

In some cases it may even be faster! When a parameter represents binary data (as in the SQL BYTEA type), libpqxx will send it directly as binary, which is a bit more efficient than the standard textual format in which the data normally gets sent to the database. If you insert the binary data directly in your query text, your CPU will have some extra work to do, converting the data into a text format, escaping it, and adding quotes; and the data will take up more bytes, which take time to transmit.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Multiple parameters

│ │ │ │

The pqxx::params class is quite fleixble. It can contain any number of parameter values, of many different types.

│ │ │ │

You can pass them in while constructing the params object:

│ │ │ │
pqxx::params{23, "acceptance", 3.14159}
│ │ │ │
Build a parameter list for a parameterised or prepared statement.
Definition params.hxx:33
│ │ │ │

Or you can add them one by one:

│ │ │ │
pqxx::params p;
│ │ │ │ @@ -117,15 +117,15 @@ │ │ │ │
p.append("acceptance");
│ │ │ │
p.append(3.14159);
│ │ │ │
void append() &
Append a null value.
Definition params.cxx:32
│ │ │ │

You can also combine the two, passing some values int the constructor and adding the rest later. You can even insert a params into a params:

│ │ │ │
pqxx::params p{23};
│ │ │ │
p.append(params{"acceptance", 3.14159});
│ │ │ │

Each of these examples will produce the same list of parameters.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Generating placeholders

│ │ │ │

If your code gets particularly complex, it may sometimes happen that it becomes hard to track which parameter value belongs with which placeholder. Did you intend to pass this numeric value as $7, or as $8? The answer may depend on an if that happened earlier in a different function.

│ │ │ │

(Generally if things get that complex, it's a good idea to look for simpler solutions. But especially when performance matters, sometimes you can't avoid complexity like that.)

│ │ │ │

There's a little helper class called placeholders. You can use it as a counter which produces those placeholder strings, $1, $2, $3, et cetera. When you start generating a complex statement, you can create both a params and a placeholders:

│ │ │ │
pqxx::params values;
│ │ │ │
pqxx::placeholders name;
│ │ │ │
Generate parameter placeholders for use in an SQL statement.
Definition params.hxx:206
│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/prepared.html │ │ │ │ @@ -91,15 +91,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
Prepared statements
│ │ │ │
│ │ │ │
│ │ │ │

Prepared statements are SQL queries that you define once and then invoke as many times as you like, typically with varying parameters. It's a lot like a function that you can define ad hoc, within the scope of one connection.

│ │ │ │

If you have an SQL statement that you're going to execute many times in quick succession, it may (but see below!) be more efficient to prepare it once and reuse it. This saves the database backend the effort of parsing the SQL and figuring out an efficient execution plan.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Preparing a statement

│ │ │ │

You create a prepared statement by preparing it on the connection (using the pqxx::connection::prepare functions), passing an identifying name for the statement, and its SQL text.

│ │ │ │

The statement's name should consist of ASCII letters, digits, and underscores only, and start with an ASCII letter. The name is case-sensitive.

│ │ │ │
void prepare_my_statement(pqxx::connection &cx)
│ │ │ │
{
│ │ │ │
cx.prepare(
│ │ │ │
"my_statement",
│ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │
{
│ │ │ │
return t.exec(pqxx::prepped{"my_statement"});
│ │ │ │
}
│ │ │ │
A string that is the name of a prepared statement.
Definition prepared_statement.hxx:70
│ │ │ │
Result set containing data returned by a query or command.
Definition result.hxx:92
│ │ │ │
result exec(std::string_view query, std::string_view desc)
Execute a command.
Definition transaction_base.cxx:249
│ │ │ │
Interface definition (and common code) for "transaction" classes.
Definition transaction_base.hxx:151
│ │ │ │ -

│ │ │ │ +

│ │ │ │ Parameters

│ │ │ │

You can pass parameters to a prepared statemet, just like you can with a regular statement. The query text can contain $1, $2 etc. as placeholders for parameter values that you will provide when you invoke the prepared satement.

│ │ │ │

See Statement parameters for more about this. And here's a simple example of preparing a statement and invoking it with parameters:

│ │ │ │
void prepare_find(pqxx::connection &cx)
│ │ │ │
{
│ │ │ │
// Prepare a statement called "find" that looks for employees with a
│ │ │ │
// given name (parameter 1) whose salary exceeds a given number
│ │ │ │ @@ -131,24 +131,24 @@ │ │ │ │
}
│ │ │ │

This example looks up the prepared statement "find," passes name and min_salary as parameters, and invokes the statement with those values:

│ │ │ │
pqxx::result execute_find(
│ │ │ │
pqxx::transaction_base &tx, std::string name, int min_salary)
│ │ │ │
{
│ │ │ │
return tx.exec(pqxx::prepped{"find"}, name, min_salary);
│ │ │ │
}
│ │ │ │ -

│ │ │ │ +

│ │ │ │ A special prepared statement

│ │ │ │

There is one special case: the nameless prepared statement. You may prepare a statement without a name, i.e. whose name is an empty string. The unnamed statement can be redefined at any time, without un-preparing it first.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Performance note

│ │ │ │

Don't assume that using prepared statements will speed up your application. There are cases where prepared statements are actually slower than plain SQL.

│ │ │ │

The reason is that the backend can often produce a better execution plan when it knows the statement's actual parameter values.

│ │ │ │

For example, say you've got a web application and you're querying for users with status "inactive" who have email addresses in a given domain name X. If X is a very popular provider, the best way for the database engine to plan the query may be to list the inactive users first and then filter for the email addresses you're looking for. But in other cases, it may be much faster to find matching email addresses first and then see which of their owners are "inactive." A prepared statement must be planned to fit either case, but a direct query will be optimised based on table statistics, partial indexes, etc.

│ │ │ │

So, as with any optimisation... measure where your real performance problems are before you start making changes, and then afterwards, measure whether your changes actually helped. Don't complicate your code unless it solves a real problem. Knuth's Law applies.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Zero bytes

│ │ │ │
Warning
Beware of zero ("nul") bytes!
│ │ │ │

Since libpqxx is a wrapper around libpq, the C-level client library, most strings you pass to the library should be compatible with C-style strings. So they must end with a single byte with value 0, and the text within them cannot contain any such zero bytes.

│ │ │ │

(The pqxx::zview type exists specifically to tell libpqxx: "this is a │ │ │ │ C-compatible string, containing no zero bytes but ending in a zero byte.")

│ │ │ │

One example is prepared statement names. But the same also goes for the parameters values. Any string you pass as a parameter will end at the first char with value zero. If you pass a string that contains a zero byte, the last byte in the value will be the one just before the zero.

│ │ │ │

So, if you need a zero byte in a string, consider that it's really a binary string, which is not the same thing as a text string. SQL represents binary data as the BYTEA type, or in binary large objects ("blobs").

│ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_0.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ - ['a_20new_20type_0', ['Supporting a new type', ['../datatypes.html#autotoc_md15', 1, '']]], │ │ │ │ │ - ['a_20query_20em_1', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ - ['a_20special_20prepared_20statement_2', ['A special prepared statement', ['../prepared.html#autotoc_md7', 1, '']]], │ │ │ │ │ - ['a_20statement_3', ['Preparing a statement', ['../prepared.html#autotoc_md5', 1, '']]], │ │ │ │ │ - ['a_20table_20em_4', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md21', 1, '']]], │ │ │ │ │ + ['a_20new_20type_0', ['Supporting a new type', ['../datatypes.html#autotoc_md18', 1, '']]], │ │ │ │ │ + ['a_20query_20em_1', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md14', 1, '']]], │ │ │ │ │ + ['a_20special_20prepared_20statement_2', ['A special prepared statement', ['../prepared.html#autotoc_md10', 1, '']]], │ │ │ │ │ + ['a_20statement_3', ['Preparing a statement', ['../prepared.html#autotoc_md8', 1, '']]], │ │ │ │ │ + ['a_20table_20em_4', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ ['abort_5', ['abort', ['../group__transactions.html#a955f2497216d9eae268ac662b46d5a45', 1, 'pqxx::transaction_base']]], │ │ │ │ │ ['access_5fpolicy_6', ['access_policy', ['../classpqxx_1_1cursor__base.html#ab2dbdc503c97b0200dd3eca6ae22f0a2', 1, 'pqxx::cursor_base']]], │ │ │ │ │ ['accessing_20results_20and_20result_20rows_7', ['Accessing results and result rows', ['../accessing-results.html', 1, '']]], │ │ │ │ │ ['additional_20data_20types_8', ['Supporting additional data types', ['../datatypes.html', 1, '']]], │ │ │ │ │ ['adorn_5fname_9', ['adorn_name', ['../classpqxx_1_1connection.html#ab4cbd2e2d30694fcaf0969c33fbeaa8f', 1, 'pqxx::connection']]], │ │ │ │ │ ['affected_5frows_10', ['affected_rows', ['../classpqxx_1_1result.html#af73d036566ef69618f8b22ba9a220a2e', 1, 'pqxx::result']]], │ │ │ │ │ ['all_11', ['all', ['../classpqxx_1_1cursor__base.html#a8ce6273da334bfd0a571c47a7eece137', 1, 'pqxx::cursor_base']]], │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_1.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -36,13 +36,13 @@ │ │ │ │ │ ['../classpqxx_1_1blob.html#a3c1c5fcc157476dfe938c6901059502f', 1, 'pqxx::blob::blob()=default'], │ │ │ │ │ ['../classpqxx_1_1blob.html#aafa3ce93f6401c592f8985217be1d416', 1, 'pqxx::blob::blob(blob &&)'] │ │ │ │ │ ]], │ │ │ │ │ ['broken_5fconnection_16', ['broken_connection', ['../group__exception.html#structpqxx_1_1broken__connection', 1, 'pqxx']]], │ │ │ │ │ ['byte_5fchar_5ftraits_17', ['byte_char_traits', ['../structpqxx_1_1byte__char__traits.html', 1, 'pqxx']]], │ │ │ │ │ ['bytes_18', ['bytes', ['../group__escaping-functions.html#a9c32ded06d7701f6aec265699b09a3d7', 1, 'pqxx::binarystring::bytes()'], │ │ │ │ │ ['../namespacepqxx.html#ac5e2f3e80ccc3a5f58bab7d699c9be05', 1, 'pqxx::bytes'], │ │ │ │ │ - ['../prepared.html#autotoc_md9', 1, 'Zero bytes'] │ │ │ │ │ + ['../prepared.html#autotoc_md12', 1, 'Zero bytes'] │ │ │ │ │ ]], │ │ │ │ │ ['bytes_5fview_19', ['bytes_view', ['../group__escaping-functions.html#a896578493ce8e0a82e1b2de5fc786c17', 1, 'pqxx::binarystring::bytes_view()'], │ │ │ │ │ ['../namespacepqxx.html#adf98e8b2ed585c586f9575928421e07d', 1, 'pqxx::bytes_view'] │ │ │ │ │ ]] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_10.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -39,31 +39,31 @@ │ │ │ │ │ ['../classpqxx_1_1internal_1_1result__iter.html#a0c920149f5043b7d03b7ac765447a929', 1, 'pqxx::internal::result_iter::result_iter()'] │ │ │ │ │ ]], │ │ │ │ │ ['result_5fiteration_24', ['result_iteration', ['../classpqxx_1_1internal_1_1result__iteration.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['result_5fpipeline_25', ['result_pipeline', ['../classpqxx_1_1internal_1_1gate_1_1result__pipeline.html', 1, 'pqxx::internal::gate']]], │ │ │ │ │ ['result_5fsize_5ftype_26', ['result_size_type', ['../namespacepqxx.html#a937d9f67d0bc04774b85efa58736852b', 1, 'pqxx']]], │ │ │ │ │ ['result_5fsql_5fcursor_27', ['result_sql_cursor', ['../classpqxx_1_1internal_1_1gate_1_1result__sql__cursor.html', 1, 'pqxx::internal::gate']]], │ │ │ │ │ ['results_20and_20result_20rows_28', ['Accessing results and result rows', ['../accessing-results.html', 1, '']]], │ │ │ │ │ - ['results_20with_20metadata_29', ['Results with metadata', ['../accessing-results.html#autotoc_md12', 1, '']]], │ │ │ │ │ + ['results_20with_20metadata_29', ['Results with metadata', ['../accessing-results.html#autotoc_md2', 1, '']]], │ │ │ │ │ ['resume_30', ['resume', ['../classpqxx_1_1pipeline.html#a06667e2e73b597586e61cae8533a2874', 1, 'pqxx::pipeline']]], │ │ │ │ │ ['retain_31', ['retain', ['../classpqxx_1_1pipeline.html#a5de968e394d7d9b68cfd84f9ae93f5bb', 1, 'pqxx::pipeline']]], │ │ │ │ │ ['retrieve_32', ['retrieve', ['../classpqxx_1_1pipeline.html#a5f8dfe951c18c19f24dd2e7a30ef276d', 1, 'pqxx::pipeline::retrieve()'], │ │ │ │ │ ['../classpqxx_1_1pipeline.html#a19c508710d0025993e41512f23de56be', 1, 'pqxx::pipeline::retrieve(query_id qid)'], │ │ │ │ │ ['../classpqxx_1_1stateless__cursor.html#a97046479f709ae621473c48ed7a0932d', 1, 'pqxx::stateless_cursor::retrieve()'] │ │ │ │ │ ]], │ │ │ │ │ - ['right_20for_20my_20query_33', ['Is streaming right for my query?', ['../streams.html#autotoc_md18', 1, '']]], │ │ │ │ │ + ['right_20for_20my_20query_33', ['Is streaming right for my query?', ['../streams.html#autotoc_md15', 1, '']]], │ │ │ │ │ ['row_34', ['row', ['../classpqxx_1_1row.html#a5bd8864f453d45f83984ed858fb68880', 1, 'pqxx::row::row()'], │ │ │ │ │ ['../classpqxx_1_1row.html', 1, 'pqxx::row'] │ │ │ │ │ ]], │ │ │ │ │ ['row_5fdifference_5ftype_35', ['row_difference_type', ['../namespacepqxx.html#a3269cdd94e1966b5d9e5d175f27741db', 1, 'pqxx']]], │ │ │ │ │ ['row_5fend_36', ['row_end', ['../classpqxx_1_1array__parser.html#a039577d83d313a6daf35fd7c273e189eab11c3eff6dd36f1f7136020d32b38051', 1, 'pqxx::array_parser']]], │ │ │ │ │ ['row_5fsize_5ftype_37', ['row_size_type', ['../namespacepqxx.html#a2dedde27863671a16a59f2625bf03d03', 1, 'pqxx']]], │ │ │ │ │ ['row_5fstart_38', ['row_start', ['../classpqxx_1_1array__parser.html#a039577d83d313a6daf35fd7c273e189ea776234b9f0a5c0e802f2790824042092', 1, 'pqxx::array_parser']]], │ │ │ │ │ ['rownumber_39', ['rownumber', ['../classpqxx_1_1const__reverse__result__iterator.html#aadd30c2141060d954c16301e3711a02c', 1, 'pqxx::const_reverse_result_iterator::rownumber()'], │ │ │ │ │ ['../classpqxx_1_1const__result__iterator.html#aadd30c2141060d954c16301e3711a02c', 1, 'pqxx::const_result_iterator::rownumber()'], │ │ │ │ │ ['../classpqxx_1_1row.html#aadd30c2141060d954c16301e3711a02c', 1, 'pqxx::row::rownumber()'] │ │ │ │ │ ]], │ │ │ │ │ ['rows_40', ['rows', ['../accessing-results.html', 1, 'Accessing results and result rows'], │ │ │ │ │ - ['../accessing-results.html#autotoc_md11', 1, 'Streaming rows'] │ │ │ │ │ + ['../accessing-results.html#autotoc_md1', 1, 'Streaming rows'] │ │ │ │ │ ]], │ │ │ │ │ - ['rows_20of_20data_41', ['Querying rows of data', ['../accessing-results.html#autotoc_md10', 1, '']]] │ │ │ │ │ + ['rows_20of_20data_41', ['Querying rows of data', ['../accessing-results.html#autotoc_md0', 1, '']]] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_11.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -44,37 +44,37 @@ │ │ │ │ │ ['skip_5finit_5fssl_29', ['skip_init_ssl', ['../namespacepqxx_1_1internal.html#a2ff078037fe1e6ca2b76fd9e0ac94b87', 1, 'pqxx::internal::skip_init_ssl()'], │ │ │ │ │ ['../namespacepqxx.html#a71f4fd3d06b6e0a849c58a8160380a86', 1, 'pqxx::skip_init_ssl()'] │ │ │ │ │ ]], │ │ │ │ │ ['slice_30', ['slice', ['../classpqxx_1_1row.html#a4195a594e4f11829637820cd89e39c7b', 1, 'pqxx::row']]], │ │ │ │ │ ['sock_31', ['sock', ['../classpqxx_1_1connection.html#af312d26f21b1cfd4d063e3b591fb7579', 1, 'pqxx::connection::sock()'], │ │ │ │ │ ['../classpqxx_1_1connecting.html#a26fe754177b77ce5d62a7de871d79b7b', 1, 'pqxx::connecting::sock()'] │ │ │ │ │ ]], │ │ │ │ │ - ['special_20prepared_20statement_32', ['A special prepared statement', ['../prepared.html#autotoc_md7', 1, '']]], │ │ │ │ │ + ['special_20prepared_20statement_32', ['A special prepared statement', ['../prepared.html#autotoc_md10', 1, '']]], │ │ │ │ │ ['specialise_20tt_20is_5funquoted_5fsafe_20tt_33', ['Optional: Specialise <tt>is_unquoted_safe</tt>', ['../datatypes.html#autotoc_md27', 1, '']]], │ │ │ │ │ - ['specialise_20tt_20nullness_20tt_34', ['Specialise <tt>nullness</tt>', ['../datatypes.html#autotoc_md20', 1, '']]], │ │ │ │ │ + ['specialise_20tt_20nullness_20tt_34', ['Specialise <tt>nullness</tt>', ['../datatypes.html#autotoc_md21', 1, '']]], │ │ │ │ │ ['specialise_20tt_20param_5fformat_20tt_35', ['Optional: Specialise <tt>param_format</tt>', ['../datatypes.html#autotoc_md28', 1, '']]], │ │ │ │ │ ['specialise_20tt_20string_5ftraits_20tt_36', ['Specialise <tt>string_traits</tt>', ['../datatypes.html#autotoc_md22', 1, '']]], │ │ │ │ │ - ['specialise_20tt_20type_5fname_20tt_37', ['Specialise <tt>type_name</tt>', ['../datatypes.html#autotoc_md19', 1, '']]], │ │ │ │ │ + ['specialise_20tt_20type_5fname_20tt_37', ['Specialise <tt>type_name</tt>', ['../datatypes.html#autotoc_md20', 1, '']]], │ │ │ │ │ ['specialize_5fparse_5fcomposite_5ffield_38', ['specialize_parse_composite_field', ['../namespacepqxx_1_1internal.html#ab1007038de5942f048d5da32e49b6b07', 1, 'pqxx::internal']]], │ │ │ │ │ - ['sql_20injection_39', ['SQL injection', ['../escaping.html#autotoc_md0', 1, '']]], │ │ │ │ │ + ['sql_20injection_39', ['SQL injection', ['../escaping.html#autotoc_md4', 1, '']]], │ │ │ │ │ ['sql_5fcursor_40', ['sql_cursor', ['../classpqxx_1_1internal_1_1sql__cursor.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['sql_5ferror_41', ['sql_error', ['../group__exception.html#classpqxx_1_1sql__error', 1, 'pqxx']]], │ │ │ │ │ ['sqlstate_42', ['sqlstate', ['../group__exception.html#a31ffc7a42e9a388eb2b7cb46647e4282', 1, 'pqxx::sql_error']]], │ │ │ │ │ ['ssize_43', ['ssize', ['../namespacepqxx_1_1internal.html#af21d8461eaf6d185ed98ab88b2edac6e', 1, 'pqxx::internal::ssize()'], │ │ │ │ │ ['../classpqxx_1_1array.html#a707b514df7835fa198a29ae68897efd8', 1, 'pqxx::array::ssize()'], │ │ │ │ │ ['../classpqxx_1_1params.html#ab23b2a3b2a58bfd03fca36022ebce8b4', 1, 'pqxx::params::ssize()'] │ │ │ │ │ ]], │ │ │ │ │ ['started_44', ['Getting started', ['../getting-started.html', 1, '']]], │ │ │ │ │ ['state_5fbuffer_5foverrun_45', ['state_buffer_overrun', ['../namespacepqxx_1_1internal.html#ac32dacb4b6c712d3d7b1de9ebad0e1d5', 1, 'pqxx::internal']]], │ │ │ │ │ ['stateless_5fcursor_46', ['stateless_cursor', ['../classpqxx_1_1stateless__cursor.html#ad77d68832afb8572fd976fc816bec89a', 1, 'pqxx::stateless_cursor::stateless_cursor(transaction_base &tx, std::string_view query, std::string_view cname, bool hold)'], │ │ │ │ │ ['../classpqxx_1_1stateless__cursor.html#afe5492d726a1765647985874d17f4149', 1, 'pqxx::stateless_cursor::stateless_cursor(transaction_base &tx, std::string_view adopted_cursor)'], │ │ │ │ │ ['../classpqxx_1_1stateless__cursor.html', 1, 'pqxx::stateless_cursor< up, op >'] │ │ │ │ │ ]], │ │ │ │ │ - ['statement_47', ['statement', ['../prepared.html#autotoc_md7', 1, 'A special prepared statement'], │ │ │ │ │ - ['../prepared.html#autotoc_md5', 1, 'Preparing a statement'] │ │ │ │ │ + ['statement_47', ['statement', ['../prepared.html#autotoc_md10', 1, 'A special prepared statement'], │ │ │ │ │ + ['../prepared.html#autotoc_md8', 1, 'Preparing a statement'] │ │ │ │ │ ]], │ │ │ │ │ ['statement_20parameters_48', ['Statement parameters', ['../parameters.html', 1, '']]], │ │ │ │ │ ['statement_5fcompletion_5funknown_49', ['statement_completion_unknown', ['../group__exception.html#structpqxx_1_1statement__completion__unknown', 1, 'pqxx']]], │ │ │ │ │ ['statements_50', ['Prepared statements', ['../prepared.html', 1, '']]], │ │ │ │ │ ['str_51', ['str', ['../group__escaping-functions.html#a9686dbe184806d5e115d9842aa3484dd', 1, 'pqxx::binarystring']]], │ │ │ │ │ ['stream_52', ['stream', ['../group__transactions.html#a742319e1c35632e9e3b14b91b64d5b4b', 1, 'pqxx::transaction_base::stream(std::string_view query, params parms) &'], │ │ │ │ │ ['../group__transactions.html#aec4d0f102c2c0fab8fa1a48f452abc0f', 1, 'pqxx::transaction_base::stream(std::string_view query) &'] │ │ │ │ │ @@ -99,18 +99,18 @@ │ │ │ │ │ ]], │ │ │ │ │ ['stream_5fquery_5fend_5fiterator_57', ['stream_query_end_iterator', ['../namespacepqxx_1_1internal.html#classpqxx_1_1internal_1_1stream__query__end__iterator', 1, 'pqxx::internal']]], │ │ │ │ │ ['stream_5fquery_5finput_5fiterator_58', ['stream_query_input_iterator', ['../classpqxx_1_1internal_1_1stream__query__input__iterator.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['stream_5fto_59', ['stream_to', ['../classpqxx_1_1stream__to.html', 1, 'pqxx::stream_to'], │ │ │ │ │ ['../classpqxx_1_1stream__to.html#a3491f56118589adff7b7fc214689ad67', 1, 'pqxx::stream_to::stream_to(transaction_base &, std::string_view table_name, Columns const &columns)'], │ │ │ │ │ ['../classpqxx_1_1stream__to.html#a726187a18a93a4c5cc2343bcb9e97da8', 1, 'pqxx::stream_to::stream_to(transaction_base &tx, std::string_view table_name)'] │ │ │ │ │ ]], │ │ │ │ │ - ['streaming_20data_20em_20from_20a_20query_20em_60', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ - ['streaming_20data_20em_20into_20a_20table_20em_61', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md21', 1, '']]], │ │ │ │ │ - ['streaming_20right_20for_20my_20query_62', ['Is streaming right for my query?', ['../streams.html#autotoc_md18', 1, '']]], │ │ │ │ │ - ['streaming_20rows_63', ['Streaming rows', ['../accessing-results.html#autotoc_md11', 1, '']]], │ │ │ │ │ + ['streaming_20data_20em_20from_20a_20query_20em_60', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md14', 1, '']]], │ │ │ │ │ + ['streaming_20data_20em_20into_20a_20table_20em_61', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ + ['streaming_20right_20for_20my_20query_62', ['Is streaming right for my query?', ['../streams.html#autotoc_md15', 1, '']]], │ │ │ │ │ + ['streaming_20rows_63', ['Streaming rows', ['../accessing-results.html#autotoc_md1', 1, '']]], │ │ │ │ │ ['streams_64', ['Streams', ['../streams.html', 1, '']]], │ │ │ │ │ ['string_20conversion_65', ['String conversion', ['../group__stringconversion.html', 1, '']]], │ │ │ │ │ ['string_20escaping_66', ['String escaping', ['../escaping.html', 1, '']]], │ │ │ │ │ ['string_20escaping_20functions_67', ['String-escaping functions', ['../group__escaping-functions.html', 1, '']]], │ │ │ │ │ ['string_5ftraits_68', ['string_traits', ['../structpqxx_1_1string__traits.html', 1, 'pqxx']]], │ │ │ │ │ ['string_5ftraits_20tt_69', ['Specialise <tt>string_traits</tt>', ['../datatypes.html#autotoc_md22', 1, '']]], │ │ │ │ │ ['string_5ftraits_3c_20binarystring_20_3e_70', ['string_traits< binarystring >', ['../structpqxx_1_1string__traits_3_01binarystring_01_4.html', 1, 'pqxx']]], │ │ │ │ │ @@ -150,20 +150,20 @@ │ │ │ │ │ ['string_5ftraits_3c_20unsigned_20long_20long_20_3e_104', ['string_traits< unsigned long long >', ['../structpqxx_1_1string__traits_3_01unsigned_01long_01long_01_4.html', 1, 'pqxx']]], │ │ │ │ │ ['string_5ftraits_3c_20unsigned_20short_20_3e_105', ['string_traits< unsigned short >', ['../structpqxx_1_1string__traits_3_01unsigned_01short_01_4.html', 1, 'pqxx']]], │ │ │ │ │ ['string_5ftraits_3c_20zview_20_3e_106', ['string_traits< zview >', ['../structpqxx_1_1string__traits_3_01zview_01_4.html', 1, 'pqxx']]], │ │ │ │ │ ['string_5fvalue_107', ['string_value', ['../classpqxx_1_1array__parser.html#a039577d83d313a6daf35fd7c273e189ea863a85b49df560a48bb166fcbf59f8b4', 1, 'pqxx::array_parser']]], │ │ │ │ │ ['strip_5ft_108', ['strip_t', ['../namespacepqxx.html#a316a1521470224aad07d24109ff0043d', 1, 'pqxx']]], │ │ │ │ │ ['strip_5ftypes_109', ['strip_types', ['../namespacepqxx_1_1internal.html#a9b4647a83a27f2d3adc9add80c55dec3', 1, 'pqxx::internal']]], │ │ │ │ │ ['strip_5ftypes_5ft_110', ['strip_types_t', ['../namespacepqxx_1_1internal.html#a8e0a910c85d42eaa8d5948fae092cf16', 1, 'pqxx::internal']]], │ │ │ │ │ - ['subtransaction_111', ['subtransaction', ['../group__transactions.html#aa351325206ada1be7f3db4fa69145c4d', 1, 'pqxx::subtransaction::subtransaction(subtransaction &t, std::string_view name=""sv)'], │ │ │ │ │ - ['../group__transactions.html#abec3848ca61ae755fab531e791ce89d8', 1, 'pqxx::subtransaction::subtransaction(dbtransaction &t, std::string_view tname=""sv)'], │ │ │ │ │ - ['../group__transactions.html#classpqxx_1_1subtransaction', 1, 'pqxx::subtransaction'] │ │ │ │ │ + ['subtransaction_111', ['subtransaction', ['../group__transactions.html#classpqxx_1_1subtransaction', 1, 'pqxx::subtransaction'], │ │ │ │ │ + ['../group__transactions.html#aa351325206ada1be7f3db4fa69145c4d', 1, 'pqxx::subtransaction::subtransaction(subtransaction &t, std::string_view name=""sv)'], │ │ │ │ │ + ['../group__transactions.html#abec3848ca61ae755fab531e791ce89d8', 1, 'pqxx::subtransaction::subtransaction(dbtransaction &t, std::string_view tname=""sv)'] │ │ │ │ │ ]], │ │ │ │ │ ['super_112', ['super', ['../classpqxx_1_1internal_1_1callgate.html#afb620090453fc901f4fa147ee60bde36', 1, 'pqxx::internal::callgate']]], │ │ │ │ │ - ['supporting_20a_20new_20type_113', ['Supporting a new type', ['../datatypes.html#autotoc_md15', 1, '']]], │ │ │ │ │ + ['supporting_20a_20new_20type_113', ['Supporting a new type', ['../datatypes.html#autotoc_md18', 1, '']]], │ │ │ │ │ ['supporting_20additional_20data_20types_114', ['Supporting additional data types', ['../datatypes.html', 1, '']]], │ │ │ │ │ ['swap_115', ['swap', ['../group__escaping-functions.html#ad6e5000885dd6f0b7bdf1f5d7f365dd9', 1, 'pqxx::binarystring::swap()'], │ │ │ │ │ ['../classpqxx_1_1result.html#ad1d929a8c555ef0e4e84d4dbcf56c05e', 1, 'pqxx::result::swap()'], │ │ │ │ │ ['../classpqxx_1_1const__result__iterator.html#a3a7cd99d4e801fca6a538dbad3c7bba6', 1, 'pqxx::const_result_iterator::swap()'] │ │ │ │ │ ]], │ │ │ │ │ ['syntax_5ferror_116', ['syntax_error', ['../group__exception.html#structpqxx_1_1syntax__error', 1, 'pqxx']]] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_12.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,24 +1,24 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ ['table_0', ['table', ['../classpqxx_1_1field.html#aee9267454dca1a3457fb86e2f0046feb', 1, 'pqxx::field::table()'], │ │ │ │ │ ['../classpqxx_1_1stream__from.html#a8bd03db93560766414f74258202f86fd', 1, 'pqxx::stream_from::table()'], │ │ │ │ │ ['../classpqxx_1_1stream__to.html#a34d7ca93963c0b5733a9ebcc10f2429b', 1, 'pqxx::stream_to::table()'] │ │ │ │ │ ]], │ │ │ │ │ - ['table_20em_1', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md21', 1, '']]], │ │ │ │ │ + ['table_20em_1', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ ['table_5fcolumn_2', ['table_column', ['../classpqxx_1_1field.html#a884880e40a43bad2733a167340896192', 1, 'pqxx::field::table_column()'], │ │ │ │ │ ['../classpqxx_1_1result.html#ae65c4fb3934978bba367ab61811aabec', 1, 'pqxx::result::table_column(row_size_type col_num) const'], │ │ │ │ │ ['../classpqxx_1_1result.html#a22161b4bebb52ef85a51509302b5a8a9', 1, 'pqxx::result::table_column(zview col_name) const'], │ │ │ │ │ ['../classpqxx_1_1row.html#a0cc2133611f007e7390988f6110245c8', 1, 'pqxx::row::table_column(size_type) const'], │ │ │ │ │ ['../classpqxx_1_1row.html#add6bd3b28ccb8178a072e8d3d19b9616', 1, 'pqxx::row::table_column(zview col_name) const'] │ │ │ │ │ ]], │ │ │ │ │ ['table_5fpath_3', ['table_path', ['../namespacepqxx.html#a7f913d1e427c805856ac303db75c1e57', 1, 'pqxx']]], │ │ │ │ │ ['tell_4', ['tell', ['../classpqxx_1_1largeobjectaccess.html#a972d8559cae789984a194c98a88b943b', 1, 'pqxx::largeobjectaccess::tell()'], │ │ │ │ │ ['../classpqxx_1_1blob.html#a88f116eb30c662386e02a1a47fd859b8', 1, 'pqxx::blob::tell()'] │ │ │ │ │ ]], │ │ │ │ │ - ['the_20esc_20functions_5', ['Using the esc functions', ['../escaping.html#autotoc_md1', 1, '']]], │ │ │ │ │ + ['the_20esc_20functions_5', ['Using the esc functions', ['../escaping.html#autotoc_md5', 1, '']]], │ │ │ │ │ ['thread_20safety_6', ['Thread safety', ['../thread-safety.html', 1, '']]], │ │ │ │ │ ['thread_5fsafety_5fmodel_7', ['thread_safety_model', ['../namespacepqxx.html#structpqxx_1_1thread__safety__model', 1, 'pqxx']]], │ │ │ │ │ ['throw_5fnull_5fconversion_8', ['throw_null_conversion', ['../namespacepqxx_1_1internal.html#ab228c862d33c75405472dccf8a34dfa3', 1, 'pqxx::internal::throw_null_conversion(std::string_view type)'], │ │ │ │ │ ['../namespacepqxx_1_1internal.html#a14aec6b418ba2b5867987eb22bd867ce', 1, 'pqxx::internal::throw_null_conversion(std::string const &type)'] │ │ │ │ │ ]], │ │ │ │ │ ['to_9', ['to', ['../classpqxx_1_1field.html#a31433b3a426646a23e1d11f3242a3885', 1, 'pqxx::field::to(T &obj, T const &default_value) const -> typename std::enable_if_t<(not std::is_pointer< T >::value or std::is_same< T, char const * >::value), bool >'], │ │ │ │ │ ['../classpqxx_1_1field.html#a1e87e9981c60d37516326e7ab6b26da6', 1, 'pqxx::field::to(char const *&obj) const'], │ │ │ │ │ @@ -53,23 +53,23 @@ │ │ │ │ │ ['transaction_5fsql_5fcursor_22', ['transaction_sql_cursor', ['../classpqxx_1_1internal_1_1gate_1_1transaction__sql__cursor.html', 1, 'pqxx::internal::gate']]], │ │ │ │ │ ['transaction_5ftransaction_5ffocus_23', ['transaction_transaction_focus', ['../classpqxx_1_1internal_1_1gate_1_1transaction__transaction__focus.html', 1, 'pqxx::internal::gate']]], │ │ │ │ │ ['transactions_24', ['Transactions', ['../classpqxx_1_1connection.html#autotoc_md30', 1, '']]], │ │ │ │ │ ['transactor_20framework_25', ['Transactor framework', ['../group__transactor.html', 1, '']]], │ │ │ │ │ ['tt_20from_5fstring_20tt_26', ['<tt>from_string</tt>', ['../datatypes.html#autotoc_md23', 1, '']]], │ │ │ │ │ ['tt_20into_5fbuf_20tt_27', ['<tt>into_buf</tt>', ['../datatypes.html#autotoc_md25', 1, '']]], │ │ │ │ │ ['tt_20is_5funquoted_5fsafe_20tt_28', ['Optional: Specialise <tt>is_unquoted_safe</tt>', ['../datatypes.html#autotoc_md27', 1, '']]], │ │ │ │ │ - ['tt_20nullness_20tt_29', ['Specialise <tt>nullness</tt>', ['../datatypes.html#autotoc_md20', 1, '']]], │ │ │ │ │ + ['tt_20nullness_20tt_29', ['Specialise <tt>nullness</tt>', ['../datatypes.html#autotoc_md21', 1, '']]], │ │ │ │ │ ['tt_20param_5fformat_20tt_30', ['Optional: Specialise <tt>param_format</tt>', ['../datatypes.html#autotoc_md28', 1, '']]], │ │ │ │ │ ['tt_20size_5fbuffer_20tt_31', ['<tt>size_buffer</tt>', ['../datatypes.html#autotoc_md26', 1, '']]], │ │ │ │ │ ['tt_20string_5ftraits_20tt_32', ['Specialise <tt>string_traits</tt>', ['../datatypes.html#autotoc_md22', 1, '']]], │ │ │ │ │ ['tt_20to_5fbuf_20tt_33', ['<tt>to_buf</tt>', ['../datatypes.html#autotoc_md24', 1, '']]], │ │ │ │ │ - ['tt_20type_5fname_20tt_34', ['Specialise <tt>type_name</tt>', ['../datatypes.html#autotoc_md19', 1, '']]], │ │ │ │ │ - ['type_35', ['type', ['../datatypes.html#autotoc_md15', 1, 'Supporting a new type'], │ │ │ │ │ + ['tt_20type_5fname_20tt_34', ['Specialise <tt>type_name</tt>', ['../datatypes.html#autotoc_md20', 1, '']]], │ │ │ │ │ + ['type_35', ['type', ['../datatypes.html#autotoc_md18', 1, 'Supporting a new type'], │ │ │ │ │ ['../classpqxx_1_1field.html#ad2da9b613fdf2b38a36e92eafd9b223a', 1, 'pqxx::field::type()'], │ │ │ │ │ - ['../datatypes.html#autotoc_md17', 1, 'Your type'] │ │ │ │ │ + ['../datatypes.html#autotoc_md19', 1, 'Your type'] │ │ │ │ │ ]], │ │ │ │ │ ['type_5fname_36', ['type_name', ['../namespacepqxx.html#a03b51dc175989959be170596670dafa4', 1, 'pqxx']]], │ │ │ │ │ - ['type_5fname_20tt_37', ['Specialise <tt>type_name</tt>', ['../datatypes.html#autotoc_md19', 1, '']]], │ │ │ │ │ - ['types_38', ['types', ['../datatypes.html#autotoc_md13', 1, 'Converting types'], │ │ │ │ │ + ['type_5fname_20tt_37', ['Specialise <tt>type_name</tt>', ['../datatypes.html#autotoc_md20', 1, '']]], │ │ │ │ │ + ['types_38', ['types', ['../datatypes.html#autotoc_md17', 1, 'Converting types'], │ │ │ │ │ ['../datatypes.html', 1, 'Supporting additional data types'] │ │ │ │ │ ]] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_13.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -18,10 +18,10 @@ │ │ │ │ │ ['unexpected_5frows_7', ['unexpected_rows', ['../group__exception.html#structpqxx_1_1unexpected__rows', 1, 'pqxx']]], │ │ │ │ │ ['unique_5fviolation_8', ['unique_violation', ['../group__exception.html#structpqxx_1_1unique__violation', 1, 'pqxx']]], │ │ │ │ │ ['unprepare_9', ['unprepare', ['../classpqxx_1_1connection.html#a5cbd8240e3c74b595ccb535c941433ae', 1, 'pqxx::connection']]], │ │ │ │ │ ['update_10', ['update', ['../classpqxx_1_1cursor__base.html#ace67894e61fba0ce9f9f6e5b9dd33083a12fa229ee3e760f1ca86d66304554b63', 1, 'pqxx::cursor_base']]], │ │ │ │ │ ['update_5fpolicy_11', ['update_policy', ['../classpqxx_1_1cursor__base.html#ace67894e61fba0ce9f9f6e5b9dd33083', 1, 'pqxx::cursor_base']]], │ │ │ │ │ ['usage_5ferror_12', ['usage_error', ['../group__exception.html#structpqxx_1_1usage__error', 1, 'pqxx']]], │ │ │ │ │ ['username_13', ['username', ['../classpqxx_1_1connection.html#a9d7c7ab0c54a258ac4fab0d562fdbacd', 1, 'pqxx::connection']]], │ │ │ │ │ - ['using_20the_20esc_20functions_14', ['Using the esc functions', ['../escaping.html#autotoc_md1', 1, '']]], │ │ │ │ │ + ['using_20the_20esc_20functions_14', ['Using the esc functions', ['../escaping.html#autotoc_md5', 1, '']]], │ │ │ │ │ ['utility_20functions_15', ['Utility functions', ['../group__utility.html', 1, '']]] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_14.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ ['value_0', ['value', ['../classpqxx_1_1range__bound.html#a76d25b17ed6af78070b888f5effe70ba', 1, 'pqxx::range_bound']]], │ │ │ │ │ ['value_5ftype_1', ['value_type', ['../namespacepqxx.html#a934fca7aa1250b4c488ac2f09ac2bf1b', 1, 'pqxx']]], │ │ │ │ │ - ['values_2', ['values', ['../streams.html#autotoc_md14', 1, 'Interlude: null values'], │ │ │ │ │ + ['values_2', ['values', ['../streams.html#autotoc_md13', 1, 'Interlude: null values'], │ │ │ │ │ ['../structpqxx_1_1internal_1_1c__params.html#aad4eb2f440fe907fcf11467effbbff15', 1, 'pqxx::internal::c_params::values'] │ │ │ │ │ ]], │ │ │ │ │ ['variable_5fset_5fto_5fnull_3', ['variable_set_to_null', ['../group__exception.html#structpqxx_1_1variable__set__to__null', 1, 'pqxx']]], │ │ │ │ │ ['view_4', ['view', ['../group__escaping-functions.html#a882b8988b2b48a9d3d254a25c559871e', 1, 'pqxx::binarystring::view()'], │ │ │ │ │ ['../classpqxx_1_1field.html#aa05908e8ed320fac8c96b9eb4cf46813', 1, 'pqxx::field::view()'], │ │ │ │ │ ['../classpqxx_1_1placeholders.html#a92d006575732b3ead81cbaf4892197ae', 1, 'pqxx::placeholders::view()'] │ │ │ │ │ ]] │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_15.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ ['wait_5ffd_0', ['wait_fd', ['../namespacepqxx_1_1internal.html#ae8a3cb88d2e0bc1f1125bee862fe100b', 1, 'pqxx::internal']]], │ │ │ │ │ ['wait_5ffor_1', ['wait_for', ['../namespacepqxx_1_1internal.html#ae95ba6e41e051ca26d13855aa2b512cb', 1, 'pqxx::internal']]], │ │ │ │ │ ['wait_5fto_5fread_2', ['wait_to_read', ['../classpqxx_1_1connecting.html#aa60ab98dc5a2702929765f05229bf160', 1, 'pqxx::connecting']]], │ │ │ │ │ ['wait_5fto_5fwrite_3', ['wait_to_write', ['../classpqxx_1_1connecting.html#a4b39dd46b61ea3e39242213bd4245eb0', 1, 'pqxx::connecting']]], │ │ │ │ │ - ['with_20metadata_4', ['Results with metadata', ['../accessing-results.html#autotoc_md12', 1, '']]], │ │ │ │ │ + ['with_20metadata_4', ['Results with metadata', ['../accessing-results.html#autotoc_md2', 1, '']]], │ │ │ │ │ ['write_5', ['write', ['../classpqxx_1_1blob.html#a28ff055c22102e0d1bda250d20d265e8', 1, 'pqxx::blob::write()'], │ │ │ │ │ ['../classpqxx_1_1largeobjectaccess.html#a60ff3072349074e732d0c00e2aefc498', 1, 'pqxx::largeobjectaccess::write(char const buf[], std::size_t len)'], │ │ │ │ │ ['../classpqxx_1_1largeobjectaccess.html#addc309fe11d4d3e29547b149e4600199', 1, 'pqxx::largeobjectaccess::write(std::string_view buf)'] │ │ │ │ │ ]], │ │ │ │ │ ['write_5fpolicy_6', ['write_policy', ['../namespacepqxx.html#a3a8103e375bc507b6e9df93e24121912', 1, 'pqxx']]], │ │ │ │ │ ['write_5frow_7', ['write_row', ['../classpqxx_1_1stream__to.html#ae628c71679b4ec6ebb4378b487e4f543', 1, 'pqxx::stream_to']]], │ │ │ │ │ ['write_5fvalues_8', ['write_values', ['../classpqxx_1_1stream__to.html#a41ffa59e4f36803f1e9473ed83b3c41d', 1, 'pqxx::stream_to']]] │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_16.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ - ['your_20type_0', ['Your type', ['../datatypes.html#autotoc_md17', 1, '']]] │ │ │ │ │ + ['your_20type_0', ['Your type', ['../datatypes.html#autotoc_md19', 1, '']]] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_17.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,9 +1,9 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ - ['zero_20bytes_0', ['Zero bytes', ['../prepared.html#autotoc_md9', 1, '']]], │ │ │ │ │ + ['zero_20bytes_0', ['Zero bytes', ['../prepared.html#autotoc_md12', 1, '']]], │ │ │ │ │ ['zview_1', ['zview', ['../classpqxx_1_1zview.html', 1, 'pqxx::zview'], │ │ │ │ │ ['../classpqxx_1_1zview.html#a766cc45a178d43b1471fdc025f01535d', 1, 'pqxx::zview::zview(char const text[], std::ptrdiff_t len) noexcept(noexcept(std::string_view{text, static_cast< std::size_t >(len)}))'], │ │ │ │ │ ['../classpqxx_1_1zview.html#a581b8c75e8c2c0de579debfca37cd725', 1, 'pqxx::zview::zview(char text[], std::ptrdiff_t len) noexcept(noexcept(std::string_view{text, static_cast< std::size_t >(len)}))'], │ │ │ │ │ ['../classpqxx_1_1zview.html#aa713ad5896e247699dcb5be68528b0e8', 1, 'pqxx::zview::zview(std::string_view other) noexcept'], │ │ │ │ │ ['../classpqxx_1_1zview.html#a3ddf4e0ff127e96f8f68361088f96d2e', 1, 'pqxx::zview::zview(Args &&...args)'], │ │ │ │ │ ['../classpqxx_1_1zview.html#ad5928543720ef457a1ca229920f33de6', 1, 'pqxx::zview::zview(std::string const &str) noexcept'], │ │ │ │ │ ['../classpqxx_1_1zview.html#a9297b1b431ea593ea2ec6c8f0beaefa9', 1, 'pqxx::zview::zview(char const str[]) noexcept(noexcept(std::string_view{str}))'], │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_2.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -14,15 +14,15 @@ │ │ │ │ │ ['callgate_3c_20icursorstream_20_3e_8', ['callgate< icursorstream >', ['../classpqxx_1_1internal_1_1callgate.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['callgate_3c_20result_20const_20_3e_9', ['callgate< result const >', ['../classpqxx_1_1internal_1_1callgate.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['callgate_3c_20transaction_5fbase_20_3e_10', ['callgate< transaction_base >', ['../classpqxx_1_1internal_1_1callgate.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['cancel_11', ['cancel', ['../classpqxx_1_1pipeline.html#ab375b0b4e02c7f1a48602c4186fbbbd7', 1, 'pqxx::pipeline']]], │ │ │ │ │ ['cancel_5fquery_12', ['cancel_query', ['../classpqxx_1_1connection.html#ad1719d51a24c5aa6bd58f03a328a3833', 1, 'pqxx::connection']]], │ │ │ │ │ ['case_20sensitivity_13', ['Case sensitivity', ['../classpqxx_1_1connection.html#autotoc_md29', 1, '']]], │ │ │ │ │ ['cat2_14', ['cat2', ['../namespacepqxx_1_1internal.html#ae3d8bb14c1d7c63c57c59b61cf63ff09', 1, 'pqxx::internal']]], │ │ │ │ │ - ['caveats_15', ['Caveats', ['../binary.html#autotoc_md2', 1, '']]], │ │ │ │ │ + ['caveats_15', ['Caveats', ['../binary.html#autotoc_md3', 1, '']]], │ │ │ │ │ ['cbegin_16', ['cbegin', ['../classpqxx_1_1array.html#aa091e8641639a3802f44b565194d1119', 1, 'pqxx::array']]], │ │ │ │ │ ['cend_17', ['cend', ['../classpqxx_1_1array.html#a14d57111c8af2324a8e9e8e3df162d9d', 1, 'pqxx::array']]], │ │ │ │ │ ['channel_18', ['channel', ['../classpqxx_1_1notification__receiver.html#a57732bae437844782bdfe6314f829d9a', 1, 'pqxx::notification_receiver::channel()'], │ │ │ │ │ ['../namespacepqxx.html#adb60a62bb5ba0afac027989fe3f0869b', 1, 'pqxx::notification::channel'] │ │ │ │ │ ]], │ │ │ │ │ ['char_5ffinder_5ffunc_19', ['char_finder_func', ['../namespacepqxx_1_1internal.html#a93267405e140acb909fe17d58746f113', 1, 'pqxx::internal']]], │ │ │ │ │ ['check_5fcast_20', ['check_cast', ['../namespacepqxx.html#af61c9b8bf784c48b540deb2fe1c1f90c', 1, 'pqxx']]], │ │ │ │ │ @@ -115,15 +115,15 @@ │ │ │ │ │ ['contains_70', ['contains', ['../classpqxx_1_1range.html#a3f5071556ce9c0b77e6e4a006b6c51fe', 1, 'pqxx::range::contains(range< TYPE > const &other) const noexcept(noexcept((*this &other)==other))'], │ │ │ │ │ ['../classpqxx_1_1range.html#a2fa03d4ad40c545610bdc382e2aff187', 1, 'pqxx::range::contains(TYPE value) const noexcept(noexcept(m_lower.extends_down_to(value)) and noexcept(m_upper.extends_up_to(value)))'] │ │ │ │ │ ]], │ │ │ │ │ ['conversion_71', ['String conversion', ['../group__stringconversion.html', 1, '']]], │ │ │ │ │ ['conversion_5ferror_72', ['conversion_error', ['../group__exception.html#structpqxx_1_1conversion__error', 1, 'pqxx']]], │ │ │ │ │ ['conversion_5foverrun_73', ['conversion_overrun', ['../group__exception.html#structpqxx_1_1conversion__overrun', 1, 'pqxx']]], │ │ │ │ │ ['convert_74', ['convert', ['../classpqxx_1_1row.html#af81dc44f173ab151bd052f339c10521f', 1, 'pqxx::row']]], │ │ │ │ │ - ['converting_20types_75', ['Converting types', ['../datatypes.html#autotoc_md13', 1, '']]], │ │ │ │ │ + ['converting_20types_75', ['Converting types', ['../datatypes.html#autotoc_md17', 1, '']]], │ │ │ │ │ ['converts_5ffrom_5fstring_76', ['converts_from_string', ['../structpqxx_1_1string__traits.html#afc7783fd1fd1020f8d400b318f1a0c10', 1, 'pqxx::string_traits']]], │ │ │ │ │ ['converts_5fto_5fstring_77', ['converts_to_string', ['../structpqxx_1_1string__traits.html#ac537955384e39377e84fd71ad6c80bfd', 1, 'pqxx::string_traits']]], │ │ │ │ │ ['count_78', ['count', ['../classpqxx_1_1placeholders.html#a254b9519ce26aee58826afcd4dadb778', 1, 'pqxx::placeholders']]], │ │ │ │ │ ['crbegin_79', ['crbegin', ['../classpqxx_1_1array.html#a2499a20fcc7d9da7e7f303b6e16fb254', 1, 'pqxx::array']]], │ │ │ │ │ ['cread_80', ['cread', ['../classpqxx_1_1largeobjectaccess.html#ac43433ab08b3ccb34fc72ea4975bcda2', 1, 'pqxx::largeobjectaccess']]], │ │ │ │ │ ['create_81', ['create', ['../classpqxx_1_1blob.html#a008264c527d6806ea2b190dd8b75dc11', 1, 'pqxx::blob']]], │ │ │ │ │ ['crend_82', ['crend', ['../classpqxx_1_1array.html#ac2f300e0917b8e0afbc9d77bbc26534a', 1, 'pqxx::array']]], │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_3.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,14 +1,14 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ ['data_0', ['data', ['../binary.html', 1, 'Binary data'], │ │ │ │ │ ['../group__escaping-functions.html#aa8e2854a33324620fb8ba3bb0176fa51', 1, 'pqxx::binarystring::data()'], │ │ │ │ │ - ['../accessing-results.html#autotoc_md10', 1, 'Querying rows of data'] │ │ │ │ │ + ['../accessing-results.html#autotoc_md0', 1, 'Querying rows of data'] │ │ │ │ │ ]], │ │ │ │ │ - ['data_20em_20from_20a_20query_20em_1', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ - ['data_20em_20into_20a_20table_20em_2', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md21', 1, '']]], │ │ │ │ │ + ['data_20em_20from_20a_20query_20em_1', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md14', 1, '']]], │ │ │ │ │ + ['data_20em_20into_20a_20table_20em_2', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ ['data_20types_3', ['Supporting additional data types', ['../datatypes.html', 1, '']]], │ │ │ │ │ ['data_5fexception_4', ['data_exception', ['../group__exception.html#structpqxx_1_1data__exception', 1, 'pqxx']]], │ │ │ │ │ ['dbname_5', ['dbname', ['../classpqxx_1_1connection.html#a286e275a7701a8ac96f839cbf8205258', 1, 'pqxx::connection']]], │ │ │ │ │ ['dbtransaction_6', ['dbtransaction', ['../group__transactions.html#classpqxx_1_1dbtransaction', 1, 'pqxx::dbtransaction'], │ │ │ │ │ ['../group__transactions.html#a1a93f046a44aa6018495a537ee06e0db', 1, 'pqxx::dbtransaction::dbtransaction(connection &cx, std::string_view tname, std::shared_ptr< std::string > rollback_cmd)'], │ │ │ │ │ ['../group__transactions.html#ae58d1c6a70b3d5c87ae066c49b2cd671', 1, 'pqxx::dbtransaction::dbtransaction(connection &cx, std::string_view tname)'], │ │ │ │ │ ['../group__transactions.html#a1d75492f91f1e0de3d970af6e6127a05', 1, 'pqxx::dbtransaction::dbtransaction(connection &cx)'] │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_4.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,10 +1,10 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ - ['em_20from_20a_20query_20em_0', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ - ['em_20into_20a_20table_20em_1', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md21', 1, '']]], │ │ │ │ │ + ['em_20from_20a_20query_20em_0', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md14', 1, '']]], │ │ │ │ │ + ['em_20into_20a_20table_20em_1', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ ['empty_2', ['empty', ['../classpqxx_1_1row.html#a05994def0b6c7b426bb13a7a95e9e035', 1, 'pqxx::row::empty()'], │ │ │ │ │ ['../classpqxx_1_1range.html#ac91cd0e74ae28042d8f887107f0aef76', 1, 'pqxx::range::empty()'] │ │ │ │ │ ]], │ │ │ │ │ ['empty_5fresult_3', ['empty_result', ['../classpqxx_1_1internal_1_1sql__cursor.html#aa081894fff9516d7dc26a8f724db21aa', 1, 'pqxx::internal::sql_cursor']]], │ │ │ │ │ ['enc_5fgroup_4', ['enc_group', ['../namespacepqxx_1_1internal.html#a6a4fef10718297b22be8627e18e20fe0', 1, 'pqxx::internal::enc_group(std::string_view encoding_name)'], │ │ │ │ │ ['../namespacepqxx_1_1internal.html#aef85ea1bf0ba64165cf2719dc25b0424', 1, 'pqxx::internal::enc_group(int)'] │ │ │ │ │ ]], │ │ │ │ │ @@ -30,15 +30,15 @@ │ │ │ │ │ ]], │ │ │ │ │ ['errorhandler_5fconnection_18', ['errorhandler_connection', ['../classpqxx_1_1internal_1_1gate_1_1errorhandler__connection.html', 1, 'pqxx::internal::gate']]], │ │ │ │ │ ['esc_19', ['esc', ['../classpqxx_1_1connection.html#a6e6bc476091af546f880c9c572f05375', 1, 'pqxx::connection::esc(std::string_view text) const'], │ │ │ │ │ ['../classpqxx_1_1connection.html#aa29f2e36001c4715e898f2c1a2ca9d5a', 1, 'pqxx::connection::esc(char const text[]) const'], │ │ │ │ │ ['../classpqxx_1_1connection.html#ab2fd28a1d384854642cc84dcd54cd450', 1, 'pqxx::connection::esc(char const text[], std::size_t maxlen) const'], │ │ │ │ │ ['../group__escaping-functions.html#ga6710c7298c40ae41b5d8326cbf2ad20e', 1, 'pqxx::transaction_base::esc()'] │ │ │ │ │ ]], │ │ │ │ │ - ['esc_20functions_20', ['Using the esc functions', ['../escaping.html#autotoc_md1', 1, '']]], │ │ │ │ │ + ['esc_20functions_20', ['Using the esc functions', ['../escaping.html#autotoc_md5', 1, '']]], │ │ │ │ │ ['esc_5fbin_21', ['esc_bin', ['../namespacepqxx_1_1internal.html#a842929aed32b7ff0f3178a7539b595d9', 1, 'pqxx::internal::esc_bin(bytes_view binary_data)'], │ │ │ │ │ ['../namespacepqxx_1_1internal.html#a89a78387ec5faabb426e0f519cad2b56', 1, 'pqxx::internal::esc_bin(bytes_view binary_data, char buffer[]) noexcept'] │ │ │ │ │ ]], │ │ │ │ │ ['esc_5flike_22', ['esc_like', ['../classpqxx_1_1connection.html#a7e8f054f91d4e61879039bfdff9b2889', 1, 'pqxx::connection::esc_like()'], │ │ │ │ │ ['../group__transactions.html#abb28d39ae66b1f36f7297b1e9d1c4e1a', 1, 'pqxx::transaction_base::esc_like(std::string_view bin, char escape_char='\\') const'] │ │ │ │ │ ]], │ │ │ │ │ ['esc_5fraw_23', ['esc_raw', ['../group__transactions.html#a7a64a944468f732eb1a78301ec940e29', 1, 'pqxx::transaction_base::esc_raw()'], │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_5.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ ['find_5fchar_8', ['find_char', ['../namespacepqxx_1_1internal.html#ac7f47e680c4aba12c395e1a854966a8e', 1, 'pqxx::internal']]], │ │ │ │ │ ['find_5fs_5fascii_5fchar_9', ['find_s_ascii_char', ['../namespacepqxx_1_1internal.html#a47911290f09c40ca080108ea376ffca9', 1, 'pqxx::internal']]], │ │ │ │ │ ['float_5ftraits_10', ['float_traits', ['../structpqxx_1_1internal_1_1float__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['float_5ftraits_3c_20double_20_3e_11', ['float_traits< double >', ['../structpqxx_1_1internal_1_1float__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['float_5ftraits_3c_20float_20_3e_12', ['float_traits< float >', ['../structpqxx_1_1internal_1_1float__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['float_5ftraits_3c_20long_20double_20_3e_13', ['float_traits< long double >', ['../structpqxx_1_1internal_1_1float__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['flush_14', ['flush', ['../classpqxx_1_1pipeline.html#a33a890c64efc37d76f3c649f145ff950', 1, 'pqxx::pipeline']]], │ │ │ │ │ - ['for_20my_20query_15', ['Is streaming right for my query?', ['../streams.html#autotoc_md18', 1, '']]], │ │ │ │ │ + ['for_20my_20query_15', ['Is streaming right for my query?', ['../streams.html#autotoc_md15', 1, '']]], │ │ │ │ │ ['for_5feach_16', ['for_each', ['../classpqxx_1_1result.html#a9302f9b61826f8b7b213f13b30453c0b', 1, 'pqxx::result']]], │ │ │ │ │ ['for_5fglyphs_17', ['for_glyphs', ['../namespacepqxx_1_1internal.html#a6d813d2723b73f1e674a9aa3229ab060', 1, 'pqxx::internal']]], │ │ │ │ │ ['for_5fquery_18', ['for_query', ['../group__transactions.html#aed05d9bf4a4d29e8f13ef92174489d86', 1, 'pqxx::transaction_base::for_query(zview query, CALLABLE &&func)'], │ │ │ │ │ ['../group__transactions.html#a2b72c8c8dec3714ba9bda0c4546e9c2f', 1, 'pqxx::transaction_base::for_query(zview query, CALLABLE &&func, params const &parms)'], │ │ │ │ │ ['../group__transactions.html#a08e4d94abccb520af509c2923d113c96', 1, 'pqxx::transaction_base::for_query(prepped statement, CALLABLE &&func, params const &parms={})'] │ │ │ │ │ ]], │ │ │ │ │ ['for_5fstream_19', ['for_stream', ['../group__transactions.html#aaf86f83eff8c7ca945c9921bddb75b14', 1, 'pqxx::transaction_base']]], │ │ │ │ │ @@ -33,15 +33,15 @@ │ │ │ │ │ ['forbidden_5fconversion_3c_20std_3a_3abyte_20_3e_23', ['forbidden_conversion< std::byte >', ['../structpqxx_1_1forbidden__conversion.html', 1, 'pqxx']]], │ │ │ │ │ ['forbidden_5fconversion_3c_20unsigned_20char_20_3e_24', ['forbidden_conversion< unsigned char >', ['../structpqxx_1_1forbidden__conversion.html', 1, 'pqxx']]], │ │ │ │ │ ['foreign_5fkey_5fviolation_25', ['foreign_key_violation', ['../group__exception.html#structpqxx_1_1foreign__key__violation', 1, 'pqxx']]], │ │ │ │ │ ['format_26', ['format', ['../namespacepqxx.html#afac7ada3a82bcd0e70131f9aede360ce', 1, 'pqxx']]], │ │ │ │ │ ['formats_27', ['formats', ['../structpqxx_1_1internal_1_1c__params.html#a9a6d51da90f51c90d3044ad9261616b8', 1, 'pqxx::internal::c_params']]], │ │ │ │ │ ['forward_5fonly_28', ['forward_only', ['../classpqxx_1_1cursor__base.html#ab2dbdc503c97b0200dd3eca6ae22f0a2af440221f717464c87f043899cc117cbf', 1, 'pqxx::cursor_base']]], │ │ │ │ │ ['framework_29', ['Transactor framework', ['../group__transactor.html', 1, '']]], │ │ │ │ │ - ['from_20a_20query_20em_30', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ + ['from_20a_20query_20em_30', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md14', 1, '']]], │ │ │ │ │ ['from_5fbuf_31', ['from_buf', ['../classpqxx_1_1blob.html#ab1f3e5e083f3c69ecc32cc87aa4d8f90', 1, 'pqxx::blob']]], │ │ │ │ │ ['from_5ffile_32', ['from_file', ['../classpqxx_1_1blob.html#a41ea99b2f59cf0946986c14371915980', 1, 'pqxx::blob::from_file(dbtransaction &, char const path[])'], │ │ │ │ │ ['../classpqxx_1_1blob.html#acd468aa64cdd17c3dec34cb059721842', 1, 'pqxx::blob::from_file(dbtransaction &, char const path[], oid)'] │ │ │ │ │ ]], │ │ │ │ │ ['from_5fquery_33', ['from_query', ['../namespacepqxx.html#a31fff381823ee2bc5af1f47139b3b48c', 1, 'pqxx']]], │ │ │ │ │ ['from_5fquery_5ft_34', ['from_query_t', ['../namespacepqxx.html#structpqxx_1_1from__query__t', 1, 'pqxx']]], │ │ │ │ │ ['from_5fstring_35', ['from_string', ['../structpqxx_1_1string__traits.html#a09bce703d8e0234e84605038189381e8', 1, 'pqxx::string_traits::from_string()'], │ │ │ │ │ @@ -54,11 +54,11 @@ │ │ │ │ │ ]], │ │ │ │ │ ['from_5fstring_20tt_36', ['<tt>from_string</tt>', ['../datatypes.html#autotoc_md23', 1, '']]], │ │ │ │ │ ['from_5fstring_3c_20std_3a_3anullptr_5ft_20_3e_37', ['from_string< std::nullptr_t >', ['../namespacepqxx.html#ac676a8d392370a92f0a2ef0f0bbf2043', 1, 'pqxx']]], │ │ │ │ │ ['from_5ftable_38', ['from_table', ['../namespacepqxx.html#a66648ed503eb162846c41247daa32660', 1, 'pqxx']]], │ │ │ │ │ ['from_5ftable_5ft_39', ['from_table_t', ['../namespacepqxx.html#structpqxx_1_1from__table__t', 1, 'pqxx']]], │ │ │ │ │ ['front_40', ['front', ['../classpqxx_1_1array.html#af0f6cbf8e3621dc46e59b9563ed436b1', 1, 'pqxx::array']]], │ │ │ │ │ ['functions_41', ['functions', ['../group__escaping-functions.html', 1, 'String-escaping functions'], │ │ │ │ │ - ['../escaping.html#autotoc_md1', 1, 'Using the esc functions'], │ │ │ │ │ + ['../escaping.html#autotoc_md5', 1, 'Using the esc functions'], │ │ │ │ │ ['../group__utility.html', 1, 'Utility functions'] │ │ │ │ │ ]] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_6.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,9 +1,9 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ - ['generating_20placeholders_0', ['Generating placeholders', ['../parameters.html#autotoc_md4', 1, '']]], │ │ │ │ │ + ['generating_20placeholders_0', ['Generating placeholders', ['../parameters.html#autotoc_md7', 1, '']]], │ │ │ │ │ ['generic_5finto_5fbuf_1', ['generic_into_buf', ['../namespacepqxx_1_1internal.html#ad36377dfe85994d97cb1aaa942100b6b', 1, 'pqxx::internal']]], │ │ │ │ │ ['get_2', ['get', ['../classpqxx_1_1placeholders.html#a4bdc5f0c544e544a62af6d2fc2309c58', 1, 'pqxx::placeholders::get()'], │ │ │ │ │ ['../classpqxx_1_1field.html#adb7ec4ecef586ebbab147b5b181dfff3', 1, 'pqxx::field::get()'], │ │ │ │ │ ['../group__escaping-functions.html#a22a65469db21930a72c82178f37b568a', 1, 'pqxx::binarystring::get()'] │ │ │ │ │ ]], │ │ │ │ │ ['get_5fchar_5ffinder_3', ['get_char_finder', ['../namespacepqxx_1_1internal.html#a16e6f54fdf88d18355e1a3a570fa175f', 1, 'pqxx::internal']]], │ │ │ │ │ ['get_5fclient_5fencoding_4', ['get_client_encoding', ['../classpqxx_1_1connection.html#a777daa7f80f3e55df9ee50e236f74653', 1, 'pqxx::connection']]], │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_8.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -3,38 +3,38 @@ │ │ │ │ │ ['icursorstream_5ficursor_5fiterator_1', ['icursorstream_icursor_iterator', ['../classpqxx_1_1internal_1_1gate_1_1icursorstream__icursor__iterator.html', 1, 'pqxx::internal::gate']]], │ │ │ │ │ ['id_2', ['id', ['../classpqxx_1_1largeobjectaccess.html#af210c3d0b39442a5ce9b3b1508d96c84', 1, 'pqxx::largeobjectaccess::id()'], │ │ │ │ │ ['../classpqxx_1_1largeobject.html#af210c3d0b39442a5ce9b3b1508d96c84', 1, 'pqxx::largeobject::id()'] │ │ │ │ │ ]], │ │ │ │ │ ['ignore_5funused_3', ['ignore_unused', ['../namespacepqxx.html#a9dd8124be2fccf97ece84ae958c175a0', 1, 'pqxx']]], │ │ │ │ │ ['in_5fdoubt_5ferror_4', ['in_doubt_error', ['../group__exception.html#structpqxx_1_1in__doubt__error', 1, 'pqxx']]], │ │ │ │ │ ['inclusive_5fbound_5', ['inclusive_bound', ['../classpqxx_1_1inclusive__bound.html', 1, 'pqxx']]], │ │ │ │ │ - ['injection_6', ['SQL injection', ['../escaping.html#autotoc_md0', 1, '']]], │ │ │ │ │ + ['injection_6', ['SQL injection', ['../escaping.html#autotoc_md4', 1, '']]], │ │ │ │ │ ['insert_7', ['insert', ['../classpqxx_1_1pipeline.html#a808f4fc39c77e490171d54a5554b337d', 1, 'pqxx::pipeline']]], │ │ │ │ │ ['inserted_5foid_8', ['inserted_oid', ['../classpqxx_1_1result.html#a5094a7be5f02f0f4c641fbd5ccb1a4da', 1, 'pqxx::result']]], │ │ │ │ │ ['insufficient_5fprivilege_9', ['insufficient_privilege', ['../group__exception.html#structpqxx_1_1insufficient__privilege', 1, 'pqxx']]], │ │ │ │ │ ['insufficient_5fresources_10', ['insufficient_resources', ['../group__exception.html#structpqxx_1_1insufficient__resources', 1, 'pqxx']]], │ │ │ │ │ ['integral_5ftraits_11', ['integral_traits', ['../structpqxx_1_1internal_1_1integral__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['integral_5ftraits_3c_20int_20_3e_12', ['integral_traits< int >', ['../structpqxx_1_1internal_1_1integral__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['integral_5ftraits_3c_20long_20_3e_13', ['integral_traits< long >', ['../structpqxx_1_1internal_1_1integral__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['integral_5ftraits_3c_20long_20long_20_3e_14', ['integral_traits< long long >', ['../structpqxx_1_1internal_1_1integral__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['integral_5ftraits_3c_20short_20_3e_15', ['integral_traits< short >', ['../structpqxx_1_1internal_1_1integral__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['integral_5ftraits_3c_20unsigned_20_3e_16', ['integral_traits< unsigned >', ['../structpqxx_1_1internal_1_1integral__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['integral_5ftraits_3c_20unsigned_20long_20_3e_17', ['integral_traits< unsigned long >', ['../structpqxx_1_1internal_1_1integral__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['integral_5ftraits_3c_20unsigned_20long_20long_20_3e_18', ['integral_traits< unsigned long long >', ['../structpqxx_1_1internal_1_1integral__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['integral_5ftraits_3c_20unsigned_20short_20_3e_19', ['integral_traits< unsigned short >', ['../structpqxx_1_1internal_1_1integral__traits.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['integrity_5fconstraint_5fviolation_20', ['integrity_constraint_violation', ['../group__exception.html#structpqxx_1_1integrity__constraint__violation', 1, 'pqxx']]], │ │ │ │ │ - ['interlude_3a_20null_20values_21', ['Interlude: null values', ['../streams.html#autotoc_md14', 1, '']]], │ │ │ │ │ + ['interlude_3a_20null_20values_21', ['Interlude: null values', ['../streams.html#autotoc_md13', 1, '']]], │ │ │ │ │ ['internal_5ferror_22', ['internal_error', ['../group__exception.html#structpqxx_1_1internal__error', 1, 'pqxx']]], │ │ │ │ │ - ['into_20a_20table_20em_23', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md21', 1, '']]], │ │ │ │ │ + ['into_20a_20table_20em_23', ['Streaming data <em>into a table</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ ['into_5fbuf_24', ['into_buf', ['../structpqxx_1_1string__traits.html#ad0fa1a3d75ba56a58c39822d25c14a0c', 1, 'pqxx::string_traits']]], │ │ │ │ │ ['into_5fbuf_20tt_25', ['<tt>into_buf</tt>', ['../datatypes.html#autotoc_md25', 1, '']]], │ │ │ │ │ ['invalid_5fcursor_5fname_26', ['invalid_cursor_name', ['../group__exception.html#structpqxx_1_1invalid__cursor__name', 1, 'pqxx']]], │ │ │ │ │ ['invalid_5fcursor_5fstate_27', ['invalid_cursor_state', ['../group__exception.html#structpqxx_1_1invalid__cursor__state', 1, 'pqxx']]], │ │ │ │ │ ['invalid_5fsql_5fstatement_5fname_28', ['invalid_sql_statement_name', ['../group__exception.html#structpqxx_1_1invalid__sql__statement__name', 1, 'pqxx']]], │ │ │ │ │ - ['is_20streaming_20right_20for_20my_20query_29', ['Is streaming right for my query?', ['../streams.html#autotoc_md18', 1, '']]], │ │ │ │ │ + ['is_20streaming_20right_20for_20my_20query_29', ['Is streaming right for my query?', ['../streams.html#autotoc_md15', 1, '']]], │ │ │ │ │ ['is_5fdigit_30', ['is_digit', ['../namespacepqxx_1_1internal.html#ace1c90d8dab0dafc4764c89ff09fa938', 1, 'pqxx::internal']]], │ │ │ │ │ ['is_5fexclusive_31', ['is_exclusive', ['../classpqxx_1_1range__bound.html#a5e36faad60586213187bbe1735f00c5b', 1, 'pqxx::range_bound']]], │ │ │ │ │ ['is_5ffinished_32', ['is_finished', ['../classpqxx_1_1pipeline.html#adb318eea9147fb82d67c43a430722283', 1, 'pqxx::pipeline']]], │ │ │ │ │ ['is_5finclusive_33', ['is_inclusive', ['../classpqxx_1_1range__bound.html#abe993384f178fe7ac1143e88a3dbcaeb', 1, 'pqxx::range_bound']]], │ │ │ │ │ ['is_5flimited_34', ['is_limited', ['../classpqxx_1_1range__bound.html#a62434321bfbc5f66bf3921ea2fb31274', 1, 'pqxx::range_bound']]], │ │ │ │ │ ['is_5fnull_35', ['is_null', ['../structpqxx_1_1no__null.html#ab53a311556c321a9dd10229b5b64773b', 1, 'pqxx::no_null::is_null()'], │ │ │ │ │ ['../structpqxx_1_1nullness.html#a309fcad467f815a9fbccbea0c2a6608a', 1, 'pqxx::nullness::is_null()'], │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_b.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -4,11 +4,11 @@ │ │ │ │ │ ['m_5fend_2', ['m_end', ['../classpqxx_1_1row.html#a0ec7d11b9721ab7bb54ec5df113ab8f5', 1, 'pqxx::row']]], │ │ │ │ │ ['m_5findex_3', ['m_index', ['../classpqxx_1_1row.html#a859f508b95f424531247427189a529ef', 1, 'pqxx::row']]], │ │ │ │ │ ['m_5fresult_4', ['m_result', ['../classpqxx_1_1row.html#a83a21b69ee9c581fc449d24dc33d8e65', 1, 'pqxx::row']]], │ │ │ │ │ ['make_5fc_5fparams_5', ['make_c_params', ['../classpqxx_1_1params.html#a6ecf59a6ac483fe23e051ae654abc2b0', 1, 'pqxx::params']]], │ │ │ │ │ ['map_5fascii_5fsearch_5fgroup_6', ['map_ascii_search_group', ['../namespacepqxx_1_1internal.html#ae26a85861af19d77bcc12ae448531d32', 1, 'pqxx::internal']]], │ │ │ │ │ ['max_5fparams_7', ['max_params', ['../classpqxx_1_1placeholders.html#a066068da0d7ca3d0b38ee47ce0098843', 1, 'pqxx::placeholders']]], │ │ │ │ │ ['member_5fargs_5ff_8', ['member_args_f', ['../namespacepqxx_1_1internal.html#a70ec299b53c60d248d0766cc11faacf1', 1, 'pqxx::internal']]], │ │ │ │ │ - ['metadata_9', ['Results with metadata', ['../accessing-results.html#autotoc_md12', 1, '']]], │ │ │ │ │ - ['multiple_20parameters_10', ['Multiple parameters', ['../parameters.html#autotoc_md3', 1, '']]], │ │ │ │ │ - ['my_20query_11', ['Is streaming right for my query?', ['../streams.html#autotoc_md18', 1, '']]] │ │ │ │ │ + ['metadata_9', ['Results with metadata', ['../accessing-results.html#autotoc_md2', 1, '']]], │ │ │ │ │ + ['multiple_20parameters_10', ['Multiple parameters', ['../parameters.html#autotoc_md6', 1, '']]], │ │ │ │ │ + ['my_20query_11', ['Is streaming right for my query?', ['../streams.html#autotoc_md15', 1, '']]] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_c.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -2,15 +2,15 @@ │ │ │ │ │ ['name_0', ['name', ['../classpqxx_1_1stateless__cursor.html#a0be6e4435c96296ab1f91f4769235dae', 1, 'pqxx::stateless_cursor::name()'], │ │ │ │ │ ['../classpqxx_1_1cursor__base.html#a580405381178880d7804180c0c396fe5', 1, 'pqxx::cursor_base::name()'], │ │ │ │ │ ['../classpqxx_1_1field.html#accb1b29590adaf1c265279fc410b2e59', 1, 'pqxx::field::name()'], │ │ │ │ │ ['../group__transactions.html#ae59455e1e8da50f0cb5901c1f72ff66e', 1, 'pqxx::transaction_base::name()'], │ │ │ │ │ ['../classpqxx_1_1transaction__focus.html#a4ccffff2688e9e7757acc385be1d781c', 1, 'pqxx::transaction_focus::name()'] │ │ │ │ │ ]], │ │ │ │ │ ['name_5fencoding_1', ['name_encoding', ['../namespacepqxx_1_1internal.html#a51e0c4e1a45c85a3b625dc3d764684f5', 1, 'pqxx::internal']]], │ │ │ │ │ - ['new_20type_2', ['Supporting a new type', ['../datatypes.html#autotoc_md15', 1, '']]], │ │ │ │ │ + ['new_20type_2', ['Supporting a new type', ['../datatypes.html#autotoc_md18', 1, '']]], │ │ │ │ │ ['next_3', ['next', ['../classpqxx_1_1cursor__base.html#a8084649c4f6be54a3c688908c1b9edf9', 1, 'pqxx::cursor_base::next()'], │ │ │ │ │ ['../classpqxx_1_1placeholders.html#aef09cd2fcb858917f33752a85e063bde', 1, 'pqxx::placeholders::next()'] │ │ │ │ │ ]], │ │ │ │ │ ['no_5fbound_4', ['no_bound', ['../structpqxx_1_1no__bound.html', 1, 'pqxx']]], │ │ │ │ │ ['no_5fnull_5', ['no_null', ['../structpqxx_1_1no__null.html', 1, 'pqxx']]], │ │ │ │ │ ['no_5fnull_3c_20binarystring_20_3e_6', ['no_null< binarystring >', ['../structpqxx_1_1no__null.html', 1, 'pqxx']]], │ │ │ │ │ ['no_5fnull_3c_20bytes_20_3e_7', ['no_null< bytes >', ['../structpqxx_1_1no__null.html', 1, 'pqxx']]], │ │ │ │ │ @@ -27,32 +27,32 @@ │ │ │ │ │ ['no_5fnull_3c_20zview_20_3e_18', ['no_null< zview >', ['../structpqxx_1_1no__null.html', 1, 'pqxx']]], │ │ │ │ │ ['no_5frows_19', ['no_rows', ['../classpqxx_1_1result.html#aee29dae44071175c8c6dd4a046a060c5', 1, 'pqxx::result']]], │ │ │ │ │ ['nontransaction_20', ['nontransaction', ['../group__transactions.html#classpqxx_1_1nontransaction', 1, 'pqxx::nontransaction'], │ │ │ │ │ ['../group__transactions.html#ab9cf41ee092dff1c6f1e07df23ba0cfd', 1, 'pqxx::nontransaction::nontransaction()'] │ │ │ │ │ ]], │ │ │ │ │ ['not_5feof_21', ['not_eof', ['../structpqxx_1_1byte__char__traits.html#a7c89d44e821a11f8336b70dc7891d7ac', 1, 'pqxx::byte_char_traits']]], │ │ │ │ │ ['not_5fnull_5fviolation_22', ['not_null_violation', ['../group__exception.html#structpqxx_1_1not__null__violation', 1, 'pqxx']]], │ │ │ │ │ - ['note_23', ['Performance note', ['../prepared.html#autotoc_md8', 1, '']]], │ │ │ │ │ + ['note_23', ['Performance note', ['../prepared.html#autotoc_md11', 1, '']]], │ │ │ │ │ ['nothing_24', ['nothing', ['../namespacepqxx.html#adabe80e8385e85d663acc6e44332070da867e5843857acbeb150fcaf025825a6f', 1, 'pqxx']]], │ │ │ │ │ ['notice_5fwaiters_25', ['notice_waiters', ['../structpqxx_1_1internal_1_1notice__waiters.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['notification_26', ['notification', ['../namespacepqxx.html#structpqxx_1_1notification', 1, 'pqxx']]], │ │ │ │ │ ['notification_5fhandler_27', ['notification_handler', ['../classpqxx_1_1connection.html#a5c68dd44c2a9e64eb2022623659ebc09', 1, 'pqxx::connection']]], │ │ │ │ │ ['notification_5freceiver_28', ['notification_receiver', ['../classpqxx_1_1notification__receiver.html', 1, 'pqxx::notification_receiver'], │ │ │ │ │ ['../classpqxx_1_1notification__receiver.html#a4779f6b712bf7a1d5ab3253b8d274db9', 1, 'pqxx::notification_receiver::notification_receiver(connection &cx, std::string_view channel)'], │ │ │ │ │ ['../classpqxx_1_1notification__receiver.html#a44ffe1ed8ec8020f4106ef8427e09d17', 1, 'pqxx::notification_receiver::notification_receiver(notification_receiver const &)=delete'] │ │ │ │ │ ]], │ │ │ │ │ ['notifications_20and_20receivers_29', ['Notifications and Receivers', ['../group__notification.html', 1, '']]], │ │ │ │ │ ['notify_30', ['notify', ['../group__transactions.html#aff9f3e6d1e0479d8c6774db391bf9b8a', 1, 'pqxx::transaction_base']]], │ │ │ │ │ ['null_31', ['null', ['../structpqxx_1_1nullness_3_01std_1_1variant_3_01T_8_8_8_01_4_01_4.html#a62b23c197cb393e146d9720ed4aed004', 1, 'pqxx::nullness< std::variant< T... > >::null()'], │ │ │ │ │ ['../structpqxx_1_1nullness.html#a475f5e490aabd4934aa63a621ecfd0ab', 1, 'pqxx::nullness::null()'] │ │ │ │ │ ]], │ │ │ │ │ - ['null_20values_32', ['Interlude: null values', ['../streams.html#autotoc_md14', 1, '']]], │ │ │ │ │ + ['null_20values_32', ['Interlude: null values', ['../streams.html#autotoc_md13', 1, '']]], │ │ │ │ │ ['null_5fvalue_33', ['null_value', ['../classpqxx_1_1array__parser.html#a039577d83d313a6daf35fd7c273e189ea9e374dadbd88854fd5b2631a6b83a295', 1, 'pqxx::array_parser']]], │ │ │ │ │ ['nullness_34', ['nullness', ['../structpqxx_1_1nullness.html', 1, 'pqxx']]], │ │ │ │ │ - ['nullness_20tt_35', ['Specialise <tt>nullness</tt>', ['../datatypes.html#autotoc_md20', 1, '']]], │ │ │ │ │ + ['nullness_20tt_35', ['Specialise <tt>nullness</tt>', ['../datatypes.html#autotoc_md21', 1, '']]], │ │ │ │ │ ['nullness_3c_20binarystring_20_3e_36', ['nullness< binarystring >', ['../structpqxx_1_1nullness_3_01binarystring_01_4.html', 1, 'pqxx']]], │ │ │ │ │ ['nullness_3c_20bytes_20_3e_37', ['nullness< bytes >', ['../structpqxx_1_1nullness_3_01bytes_01_4.html', 1, 'pqxx']]], │ │ │ │ │ ['nullness_3c_20bytes_5fview_20_3e_38', ['nullness< bytes_view >', ['../structpqxx_1_1nullness_3_01bytes__view_01_4.html', 1, 'pqxx']]], │ │ │ │ │ ['nullness_3c_20char_20_2a_20_3e_39', ['nullness< char * >', ['../structpqxx_1_1nullness_3_01char_01_5_01_4.html', 1, 'pqxx']]], │ │ │ │ │ ['nullness_3c_20char_20const_20_2a_20_3e_40', ['nullness< char const * >', ['../structpqxx_1_1nullness_3_01char_01const_01_5_01_4.html', 1, 'pqxx']]], │ │ │ │ │ ['nullness_3c_20char_5bn_5d_3e_41', ['nullness< char[N]>', ['../structpqxx_1_1nullness_3_01char_0fN_0e_4.html', 1, 'pqxx']]], │ │ │ │ │ ['nullness_3c_20enum_2c_20std_3a_3aenable_5fif_5ft_3c_20std_3a_3ais_5fenum_5fv_3c_20enum_20_3e_20_3e_20_3e_42', ['nullness< ENUM, std::enable_if_t< std::is_enum_v< ENUM > > >', ['../structpqxx_1_1nullness_3_01ENUM_00_01std_1_1enable__if__t_3_01std_1_1is__enum__v_3_01ENUM_01_4_01_4_01_4.html', 1, 'pqxx']]], │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_d.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,9 +1,9 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ - ['of_20data_0', ['Querying rows of data', ['../accessing-results.html#autotoc_md10', 1, '']]], │ │ │ │ │ + ['of_20data_0', ['Querying rows of data', ['../accessing-results.html#autotoc_md0', 1, '']]], │ │ │ │ │ ['oid_1', ['oid', ['../namespacepqxx.html#ac9eb697318d27a5b023609e0160f1ade', 1, 'pqxx']]], │ │ │ │ │ ['oid_5fnone_2', ['oid_none', ['../namespacepqxx.html#aea8d8e21558dad5b03ac2f73910c93e1', 1, 'pqxx']]], │ │ │ │ │ ['one_5ffield_3', ['one_field', ['../classpqxx_1_1result.html#a2caa168a1984a277b29d70ccbbdf50c4', 1, 'pqxx::result']]], │ │ │ │ │ ['one_5frow_4', ['one_row', ['../classpqxx_1_1result.html#a0c06b4a276d79960cfdbbfb1be070b48', 1, 'pqxx::result']]], │ │ │ │ │ ['oops_5fforbidden_5fconversion_5', ['oops_forbidden_conversion', ['../namespacepqxx.html#a807bfd03b5fb6cf1bbcd9d728f2dd4e0', 1, 'pqxx']]], │ │ │ │ │ ['open_5fr_6', ['open_r', ['../classpqxx_1_1blob.html#a0d4a50c0d8862f98ce728647987f6d51', 1, 'pqxx::blob']]], │ │ │ │ │ ['openmode_7', ['openmode', ['../classpqxx_1_1largeobjectaccess.html#a6b09598014eca3c4c4b8a0c1495185d3', 1, 'pqxx::largeobjectaccess']]], │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_e.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,16 +1,16 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ ['param_5fformat_0', ['param_format', ['../namespacepqxx.html#a9a3f3a97fd46497a008aaca323cc1958', 1, 'pqxx::param_format(std::vector< T, Args... > const &)'], │ │ │ │ │ ['../namespacepqxx.html#a194db2bb59425a2ff10187d2e81189d3', 1, 'pqxx::param_format(std::vector< std::byte, Args... > const &)'], │ │ │ │ │ ['../namespacepqxx.html#a5a183a730292cabcf9e64fdc6eb0faa5', 1, 'pqxx::param_format(std::array< T, args... > const &)'], │ │ │ │ │ ['../namespacepqxx.html#a0eaf71a6f4744e3d401d2f179d477e4a', 1, 'pqxx::param_format(std::array< std::byte, args... > const &)'] │ │ │ │ │ ]], │ │ │ │ │ ['param_5fformat_20tt_1', ['Optional: Specialise <tt>param_format</tt>', ['../datatypes.html#autotoc_md28', 1, '']]], │ │ │ │ │ - ['parameters_2', ['parameters', ['../parameters.html#autotoc_md3', 1, 'Multiple parameters'], │ │ │ │ │ - ['../prepared.html#autotoc_md6', 1, 'Parameters'], │ │ │ │ │ + ['parameters_2', ['parameters', ['../parameters.html#autotoc_md6', 1, 'Multiple parameters'], │ │ │ │ │ + ['../prepared.html#autotoc_md9', 1, 'Parameters'], │ │ │ │ │ ['../parameters.html', 1, 'Statement parameters'] │ │ │ │ │ ]], │ │ │ │ │ ['params_3', ['params', ['../classpqxx_1_1params.html', 1, 'pqxx::params'], │ │ │ │ │ ['../classpqxx_1_1params.html#ad15fdabb428bc93cdb0a6c4354a9069c', 1, 'pqxx::params::params()'] │ │ │ │ │ ]], │ │ │ │ │ ['parse_5fcomposite_4', ['parse_composite', ['../namespacepqxx.html#a0cd702e0c9b6172bf07f0253b238506b', 1, 'pqxx::parse_composite(std::string_view text, T &...fields)'], │ │ │ │ │ ['../namespacepqxx.html#ac634686eb086118eade113cd71c7d5a4', 1, 'pqxx::parse_composite(pqxx::internal::encoding_group enc, std::string_view text, T &...fields)'] │ │ │ │ │ @@ -18,20 +18,20 @@ │ │ │ │ │ ['parse_5fcomposite_5ffield_5', ['parse_composite_field', ['../namespacepqxx_1_1internal.html#a1689cd1502106403a998bd0b2a283432', 1, 'pqxx::internal']]], │ │ │ │ │ ['parse_5fdouble_5fquoted_5fstring_6', ['parse_double_quoted_string', ['../namespacepqxx_1_1internal.html#ad24fb98e5aa3beaecd91d4631321fd4d', 1, 'pqxx::internal']]], │ │ │ │ │ ['parse_5fline_7', ['parse_line', ['../classpqxx_1_1internal_1_1stream__query.html#aad5061fd7b06c89a98e317ce6901ab58', 1, 'pqxx::internal::stream_query']]], │ │ │ │ │ ['parse_5funquoted_5fstring_8', ['parse_unquoted_string', ['../namespacepqxx_1_1internal.html#a93188da7c79d025bae155202f2facb18', 1, 'pqxx::internal']]], │ │ │ │ │ ['payload_9', ['payload', ['../namespacepqxx.html#af4420ee3d9ce36513a5b026903d4b191', 1, 'pqxx::notification']]], │ │ │ │ │ ['perform_10', ['perform', ['../namespacepqxx.html#a9c2faadd143f7c48353eb23b2aa24134', 1, 'pqxx']]], │ │ │ │ │ ['performance_20features_11', ['Performance features', ['../performance.html', 1, '']]], │ │ │ │ │ - ['performance_20note_12', ['Performance note', ['../prepared.html#autotoc_md8', 1, '']]], │ │ │ │ │ + ['performance_20note_12', ['Performance note', ['../prepared.html#autotoc_md11', 1, '']]], │ │ │ │ │ ['pipeline_13', ['pipeline', ['../classpqxx_1_1pipeline.html', 1, 'pqxx::pipeline'], │ │ │ │ │ ['../classpqxx_1_1pipeline.html#a0c80a5e68052b2c35089e384e3c842ce', 1, 'pqxx::pipeline::pipeline(transaction_base &t)'], │ │ │ │ │ ['../classpqxx_1_1pipeline.html#a92463b4b599f681a372016d5dbbe016d', 1, 'pqxx::pipeline::pipeline(transaction_base &t, std::string_view tname)'] │ │ │ │ │ ]], │ │ │ │ │ - ['placeholders_14', ['placeholders', ['../parameters.html#autotoc_md4', 1, 'Generating placeholders'], │ │ │ │ │ + ['placeholders_14', ['placeholders', ['../parameters.html#autotoc_md7', 1, 'Generating placeholders'], │ │ │ │ │ ['../classpqxx_1_1placeholders.html', 1, 'pqxx::placeholders< COUNTER >'] │ │ │ │ │ ]], │ │ │ │ │ ['plpgsql_5ferror_15', ['plpgsql_error', ['../group__exception.html#structpqxx_1_1plpgsql__error', 1, 'pqxx']]], │ │ │ │ │ ['plpgsql_5fno_5fdata_5ffound_16', ['plpgsql_no_data_found', ['../group__exception.html#structpqxx_1_1plpgsql__no__data__found', 1, 'pqxx']]], │ │ │ │ │ ['plpgsql_5fraise_17', ['plpgsql_raise', ['../group__exception.html#structpqxx_1_1plpgsql__raise', 1, 'pqxx']]], │ │ │ │ │ ['plpgsql_5ftoo_5fmany_5frows_18', ['plpgsql_too_many_rows', ['../group__exception.html#structpqxx_1_1plpgsql__too__many__rows', 1, 'pqxx']]], │ │ │ │ │ ['port_19', ['port', ['../classpqxx_1_1connection.html#aa517b7352ea7d8aed937281c295d1f8d', 1, 'pqxx::connection']]], │ │ │ │ │ @@ -41,17 +41,17 @@ │ │ │ │ │ ['pqxx_3a_3ainternal_23', ['internal', ['../namespacepqxx_1_1internal.html', 1, 'pqxx']]], │ │ │ │ │ ['pqxx_3a_3ainternal_3a_3apq_24', ['pq', ['../namespacepqxx_1_1internal_1_1pq.html', 1, 'pqxx::internal']]], │ │ │ │ │ ['pqxx_3a_3aprepare_25', ['prepare', ['../namespacepqxx_1_1prepare.html', 1, 'pqxx']]], │ │ │ │ │ ['prepare_26', ['prepare', ['../classpqxx_1_1connection.html#ac6888103e47fc344e18d17878cdc2bc7', 1, 'pqxx::connection::prepare(char const name[], char const definition[]) &'], │ │ │ │ │ ['../classpqxx_1_1connection.html#a140337eada7fe60e15d8b113b8599f0d', 1, 'pqxx::connection::prepare(char const definition[]) &'], │ │ │ │ │ ['../classpqxx_1_1connection.html#add8ab06057cfd57e509c1e4e1f26e944', 1, 'pqxx::connection::prepare(zview name, zview definition) &'] │ │ │ │ │ ]], │ │ │ │ │ - ['prepared_20statement_27', ['A special prepared statement', ['../prepared.html#autotoc_md7', 1, '']]], │ │ │ │ │ + ['prepared_20statement_27', ['A special prepared statement', ['../prepared.html#autotoc_md10', 1, '']]], │ │ │ │ │ ['prepared_20statements_28', ['Prepared statements', ['../prepared.html', 1, '']]], │ │ │ │ │ - ['preparing_20a_20statement_29', ['Preparing a statement', ['../prepared.html#autotoc_md5', 1, '']]], │ │ │ │ │ + ['preparing_20a_20statement_29', ['Preparing a statement', ['../prepared.html#autotoc_md8', 1, '']]], │ │ │ │ │ ['prepped_30', ['prepped', ['../classpqxx_1_1prepped.html', 1, 'pqxx']]], │ │ │ │ │ ['prior_31', ['prior', ['../classpqxx_1_1cursor__base.html#a94899901ead639033a816cb4aa0fdcd4', 1, 'pqxx::cursor_base']]], │ │ │ │ │ ['process_32', ['process', ['../classpqxx_1_1connecting.html#a58084f41892e19eb2a603a95de4f7dd9', 1, 'pqxx::connecting']]], │ │ │ │ │ ['process_5fnotice_33', ['process_notice', ['../group__transactions.html#a319425c4f02975fa2d5807963ba3dc08', 1, 'pqxx::transaction_base::process_notice(zview msg) const'], │ │ │ │ │ ['../group__transactions.html#afecae4ed72e50dd2a14fbc9c7d365297', 1, 'pqxx::transaction_base::process_notice(char const msg[]) const'], │ │ │ │ │ ['../classpqxx_1_1largeobject__streambuf.html#a9c9d53a14e148dec15f632fcb8f51366', 1, 'pqxx::largeobject_streambuf::process_notice()'], │ │ │ │ │ ['../classpqxx_1_1largeobjectaccess.html#ad539bb1d48ea71532455f56bf118a3ff', 1, 'pqxx::largeobjectaccess::process_notice()'], │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/search/all_f.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,17 +1,17 @@ │ │ │ │ │ var searchData = [ │ │ │ │ │ - ['query_0', ['query', ['../streams.html#autotoc_md18', 1, 'Is streaming right for my query?'], │ │ │ │ │ + ['query_0', ['query', ['../streams.html#autotoc_md15', 1, 'Is streaming right for my query?'], │ │ │ │ │ ['../group__exception.html#af011efdf2ba4459774e1e146a50c398d', 1, 'pqxx::sql_error::query()'], │ │ │ │ │ ['../group__transactions.html#a41080a9f7c8cbf27a888c3cbf3e9c974', 1, 'pqxx::transaction_base::query(prepped statement, params const &parms={})'], │ │ │ │ │ ['../group__transactions.html#ad765133f6133ea8de8255af804e8f81b', 1, 'pqxx::transaction_base::query(zview query, params const &parms)'], │ │ │ │ │ ['../classpqxx_1_1stream__from.html#a062c20b73f6c9d019bfc35806c432ec0', 1, 'pqxx::stream_from::query()'], │ │ │ │ │ ['../classpqxx_1_1result.html#a9d28f84628b9e8a8fecf7849f31bf1a0', 1, 'pqxx::result::query()'], │ │ │ │ │ ['../group__transactions.html#a2b8b6bcc152f542e8cbe8e227db2ef62', 1, 'pqxx::transaction_base::query()'] │ │ │ │ │ ]], │ │ │ │ │ - ['query_20em_1', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md16', 1, '']]], │ │ │ │ │ + ['query_20em_1', ['Streaming data <em>from a query</em>', ['../streams.html#autotoc_md14', 1, '']]], │ │ │ │ │ ['query01_2', ['query01', ['../group__transactions.html#aa5929c0f9068f6569c246063a6428c99', 1, 'pqxx::transaction_base::query01(zview query)'], │ │ │ │ │ ['../group__transactions.html#a40ddd8e96d1dbd58b8e1355d24de5898', 1, 'pqxx::transaction_base::query01(zview query, params const &parms)'] │ │ │ │ │ ]], │ │ │ │ │ ['query1_3', ['query1', ['../group__transactions.html#ad2e069e118bd8b5332e37fecf6648020', 1, 'pqxx::transaction_base::query1(zview query)'], │ │ │ │ │ ['../group__transactions.html#a551bbeaed97a9c3797257dc127e2c3ab', 1, 'pqxx::transaction_base::query1(zview query, params const &parms)'] │ │ │ │ │ ]], │ │ │ │ │ ['query_5fid_4', ['query_id', ['../classpqxx_1_1pipeline.html#af21cf61fd1c13a6729f48a241cbeba37', 1, 'pqxx::pipeline']]], │ │ │ │ │ @@ -20,15 +20,15 @@ │ │ │ │ │ ]], │ │ │ │ │ ['query_5fvalue_6', ['query_value', ['../group__transactions.html#a4a7e907112201a77641d775fcbe49153', 1, 'pqxx::transaction_base::query_value(zview query, std::string_view desc)'], │ │ │ │ │ ['../group__transactions.html#a7167da8b1ac61caa7e2caa0a9b0244c8', 1, 'pqxx::transaction_base::query_value(zview query)'], │ │ │ │ │ ['../group__transactions.html#a2f2f530ab83df00027ad7b09716b3bac', 1, 'pqxx::transaction_base::query_value(zview query, params const &parms)'], │ │ │ │ │ ['../group__transactions.html#a3cd56db0a41e5a08649b3f86e3c3e738', 1, 'pqxx::transaction_base::query_value(prepped statement, params const &parms={})'], │ │ │ │ │ ['../group__transactions.html#a9088693e2337da4d75f8f624ac4fb9bc', 1, 'pqxx::transaction_base::query_value(zview query, std::string_view desc)=delete'] │ │ │ │ │ ]], │ │ │ │ │ - ['querying_20rows_20of_20data_7', ['Querying rows of data', ['../accessing-results.html#autotoc_md10', 1, '']]], │ │ │ │ │ + ['querying_20rows_20of_20data_7', ['Querying rows of data', ['../accessing-results.html#autotoc_md0', 1, '']]], │ │ │ │ │ ['quiet_5ferrorhandler_8', ['quiet_errorhandler', ['../classpqxx_1_1quiet__errorhandler.html', 1, 'pqxx::quiet_errorhandler'], │ │ │ │ │ ['../classpqxx_1_1quiet__errorhandler.html#ac89d9cb68e28649ed53ec9d00ad75550', 1, 'pqxx::quiet_errorhandler::quiet_errorhandler()'] │ │ │ │ │ ]], │ │ │ │ │ ['quote_9', ['quote', ['../group__transactions.html#a6476b6d27bb27a6eb8767080cc3e6a49', 1, 'pqxx::transaction_base::quote()'], │ │ │ │ │ ['../classpqxx_1_1connection.html#aa8dd0b5e748b96a2c82152b8001bdc69', 1, 'pqxx::connection::quote(bytes_view bytes) const'], │ │ │ │ │ ['../classpqxx_1_1connection.html#ae871e3c436af0ed50e1373d9157e7340', 1, 'pqxx::connection::quote(T const &t) const'] │ │ │ │ │ ]], │ │ │ ├── ./usr/share/doc/libpqxx-doc/doxygen-html/streams.html │ │ │ │ @@ -92,48 +92,48 @@ │ │ │ │
│ │ │ │
Streams
│ │ │ │
│ │ │ │
│ │ │ │

Most of the time it's fine to retrieve data from the database using SELECT queries, and store data using INSERT. But for those cases where efficiency matters, there are two data streaming mechanisms to help you do this more efficiently: "streaming queries," for reading query results from the database; and the pqxx::stream_to class, for writing data from the client into a table.

│ │ │ │

These are less flexible than SQL queries. Also, depending on your needs, it may be a problem to lose your connection while you're in mid-stream, not knowing that the query may not complete. But, you get some scalability and memory efficiencies in return.

│ │ │ │

Just like regular querying, these streaming mechanisms do data conversion for you. You deal with the C++ data types, and the database deals with the SQL data types.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Interlude: null values

│ │ │ │

So how do you deal with nulls? It depends on the C++ type you're using. Some types may have a built-in null value. For instance, if you have a char const * value and you convert it to an SQL string, then converting a nullptr will produce a NULL SQL value.

│ │ │ │

But what do you do about C++ types which don't have a built-in null value, such as int? The trick is to wrap it in std::optional. The difference between int and std::optional<int> is that the former always has an int value, and the latter doesn't have to.

│ │ │ │

Actually it's not just std::optional. You can do the same thing with std::unique_ptr or std::shared_ptr. A smart pointer is less efficient than std::optional in most situations because they allocate their value on the heap, but sometimes that's what you want in order to save moving or copying large values around.

│ │ │ │

This part is not generic though. It won't work with just any smart-pointer type, just the ones which are explicitly supported: shared_ptr and unique_ptr. If you really need to, you can build support for additional wrappers and smart pointers by copying the implementation patterns from the existing smart-pointer support.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Streaming data <em>from a query</em>

│ │ │ │

Use transaction_base::stream to read large amounts of data directly from the database. In terms of API it works just like transaction_base::query, but it's faster than the exec and query functions For larger data sets. Also, you won't need to keep your full result set in memory. That can really matter with larger data sets.

│ │ │ │

Another performance advantage is that with a streaming query, you can start processing your data right after the first row of data comes in from the server. With exec() or query() you need to wait to receive all data, and only then can you begin processing. With streaming queries you can be processing data on the client side while the server is still sending you the rest.

│ │ │ │

Not all kinds of queries will work in a stream. Internally the streams make use of PostgreSQL's COPY command, so see the PostgreSQL documentation for COPY for the exact limitations. Basic SELECT and UPDATE ... RETURNING queries will just work, but fancier constructs may not.

│ │ │ │

As you read a row, the stream converts its fields to a tuple type containing the value types you ask for:

│ │ │ │
for (auto [name, score] :
│ │ │ │
tx.stream<std::string_view, int>("SELECT name, points FROM score")
│ │ │ │
)
│ │ │ │
process(name, score);
│ │ │ │

On each iteration, the stream gives you a std::tuple of the column types you specify. It converts the row's fields (which internally arrive at the client in text format) to your chosen types.

│ │ │ │

The auto [name, score] in the example is a structured binding which unpacks the tuple's fields into separate variables. If you prefer, you can choose to receive the tuple instead: for (std::tuple<int, std::string_view> :.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Is streaming right for my query?

│ │ │ │

Here are the things you need to be aware of when deciding whether to stream a query, or just execute it normally.

│ │ │ │

First, when you stream a query, there is no metadata describing how many rows it returned, what the columns are called, and so on. With a regular query you get a result object which contains this metadata as well as the data itself. If you absolutely need this metadata for a particular query, then that means you can't stream the query.

│ │ │ │

Second, under the bonnet, streaming from a query uses a PostgreSQL-specific SQL command COPY (...) TO STDOUT. There are some limitations on what kinds of queries this command can handle. These limitations may change over time, so I won't describe them here. Instead, see PostgreSQL's COPY documentation for the details. (Look for the TO variant, with a query as the data source.)

│ │ │ │

Third: when you stream a query, you start receiving and processing data before you even know whether you will receive all of the data. If you lose your connection to the database halfway through, you will have processed half your data, unaware that the query may never execute to completion. If this is a problem for your application, don't stream that query!

│ │ │ │

The fourth and final factor is performance. If you're interested in streaming, obviously you care about this one.

│ │ │ │

I can't tell you a priori whether streaming will make your query faster. It depends on how many rows you're retrieving, how much data there is in those rows, the speed of your network connection to the database, your client encoding, how much processing you do per row, and the details of the client-side system: hardware speed, CPU load, and available memory.

│ │ │ │

Ultimately, no amount of theory beats real-world measurement for your specific situation so... if it really matters, measure. (And as per Knuth's Law: if it doesn't really matter, don't optimise.)

│ │ │ │

That said, here are a few data points from some toy benchmarks:

│ │ │ │

If your query returns e.g. a hundred small rows, it's not likely to make up a significant portion of your application's run time. Streaming is likely to be slower than regular querying, but most likely the difference just won't amtter.

│ │ │ │

If your query returns a thousand small rows, streaming is probably still going to be a bit slower than regular querying, though "your mileage may vary."

│ │ │ │

If you're querying ten thousand small rows, however, it becomes more likely that streaming will speed it up. The advantage increases as the number of rows increases.

│ │ │ │

That's for small rows, based on a test where each row consisted of just one integer number. If your query returns larger rows, with more columns, I find that streaming seems to become more attractive. In a simple test with 4 columns (two integers and two strings), streaming even just a thousand rows was considerably faster than a regular query.

│ │ │ │

If your network connection to the database is slow, however, that may make streaming a bit less effcient. There is a bit more communication back and forth between the client and the database to set up a stream. This overhead takes a more or less constant amount of time, so for larger data sets it will tend to become insignificant compared to the other performance costs.

│ │ │ │ -

│ │ │ │ +

│ │ │ │ Streaming data <em>into a table</em>

│ │ │ │

Use stream_to to write data directly to a database table. This saves you having to perform an INSERT for every row, and so it can be significantly faster if you want to insert more than just one or two rows at a time.

│ │ │ │

As with stream_from, you can specify the table and the columns, and not much else. You insert tuple-like objects of your choice:

│ │ │ │
│ │ │ │
tx,
│ │ │ │
"score",
│ │ │ │
std::vector<std::string>{"name", "points"}};