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
13 stars 11 forks source link

Add RowIterator implementation #64

Closed Gor027 closed 1 year ago

Gor027 commented 2 years ago

This PR is dependent upon #63

As the C++ driver interface requires functions cass_iterator_from_result and cass_iterator_from_row to return CassIterator, this PR modifies already existing CassIterator struct to be enum and to contain CassResultIterator and CassRowIterator. Additionally, some necessary functions were implemented in order to have at least 1 passing integration test. So, it should pass a basic test called BasicsTests.Integration_Cassandra_RowsInRowsOut.

piodul commented 1 year ago

Please avoid addressing review comments by adding commits that fix bugs introduced in previous commits. In particular, the first commit still has the issue with the lifetime of the value returned from cass_value_data_type. You should first change the CassValue to store CassDataType so that you can correctly implement cass_value_data_type in the next commit.

Moreover, please add commit descriptions. Each description should explain what is changed in the commit and why.