scylladb / cpp-rust-driver

API-compatible rewrite of https://github.com/scylladb/cpp-driver as a wrapper for Rust driver.
GNU Lesser General Public License v2.1
16 stars 11 forks source link

cass_result: implement missing functions #136

Open muzarski opened 3 months ago

muzarski commented 3 months ago

Fix: https://github.com/scylladb/cpp-rust-driver/issues/35

Implemented two missing CassResult functions:

Also fixed cass_result_first_row implementation.

Pre-review checklist

mykaul commented 3 months ago

Do we have tests to validate this?

muzarski commented 3 months ago

Do we have tests to validate this?

At first, I wasn't sure if there are integration tests checking this - unfortunately, the answer is no (previous implementation of cass_result_first_row would panic in some cases - this bug was never detected). Tomorrow I'll try to implement some cpp integration tests for the cass_result_* API.

muzarski commented 3 months ago

v2: Fixed cass_result_first_row

wprzytula commented 3 months ago

Do we have tests to validate this?

At first, I wasn't sure if there are integration tests checking this - unfortunately, the answer is no (previous implementation of cass_result_first_row would panic in some cases - this bug was never detected). Tomorrow I'll try to implement some cpp integration tests for the cass_result_* API.

WDYT about adding Rust unit tests first? They should be the first layer to detect errors, they have smaller overhead and, probably the most important for convenience of us maintainers, they are written in Rust, not in Datastax C++ test framework.

muzarski commented 3 months ago

v3: implemented unit tests for basic cass_result_* API.

wprzytula commented 2 months ago

In this PR, you should instantly enable related integration tests and/or examples.

muzarski commented 4 weeks ago

This PR is waiting for: https://github.com/scylladb/cpp-rust-driver/pull/143