Skip to content

Commit 07168e7

Browse files
committed
Test with libpqxx 7.8
1 parent 7f4161c commit 07168e7

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
make
1717
sudo make install
1818
- run: |
19-
git clone --branch 7.7.5 https://github.com/jtv/libpqxx.git
19+
git clone --branch 7.8.1 https://github.com/jtv/libpqxx.git
2020
cd libpqxx
2121
CXXFLAGS=-std=c++17 ./configure
2222
make

test/pqxx_test.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,9 @@ void test_works(pqxx::connection &conn) {
3131

3232
void test_stream(pqxx::connection &conn) {
3333
pqxx::work txn{conn};
34-
auto stream = pqxx::stream_from::query(txn, "SELECT id, embedding FROM items WHERE embedding IS NOT NULL");
35-
std::tuple<int, pgvector::Vector> row;
36-
while (stream >> row) {
37-
assert(std::get<1>(row).dimensions() == 3);
34+
for (auto [id, embedding] : txn.stream<int, pgvector::Vector>("SELECT id, embedding FROM items WHERE embedding IS NOT NULL")) {
35+
assert(embedding.dimensions() == 3);
3836
}
39-
stream.complete();
4037
txn.commit();
4138
}
4239

0 commit comments

Comments
 (0)