Skip to content

types: implement API functions for decimal type #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 5, 2024

Conversation

muzarski
Copy link
Collaborator

@muzarski muzarski commented Jul 30, 2024

This PR implements following set of API functions related to decimal/varint types:

  • cass_statement_bind_decimal_*
  • cass_user_type_set_decimal_*
  • cass_tuple_set_decimal
  • cass_value_get_decimal
  • cass_value_is_decimal
  • cass_collection_append_decimal

The other way (I think it's preferred, looking at the integration tests) to bind varint values is treating them as bytes (i.e. cass_statement_bind_bytes). The only thing that is missing is to implement cass_value_get_bytes's support for varint type. This PR does that as well. Thanks to this, we can enable both decimal and varint integration test cases.

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • PR description sums up the changes and reasons why they should be introduced.
  • I have enabled appropriate tests in .github/workflows/build.yml in gtest_filter.
  • I have enabled appropriate tests in .github/workflows/cassandra.yml in gtest_filter.

@muzarski muzarski self-assigned this Jul 30, 2024
@Lorak-mmk Lorak-mmk self-assigned this Jul 30, 2024
@muzarski muzarski requested review from Lorak-mmk and wprzytula July 30, 2024 11:21
@Lorak-mmk Lorak-mmk removed their assignment Jul 31, 2024
@muzarski muzarski requested a review from Lorak-mmk August 4, 2024 20:38
@muzarski muzarski force-pushed the decimal_support branch 2 times, most recently from e95bf13 to c09cb71 Compare August 5, 2024 07:11
@muzarski
Copy link
Collaborator Author

muzarski commented Aug 5, 2024

Rebased on master

@muzarski muzarski requested a review from Lorak-mmk August 5, 2024 07:12
Added binding support for decimal type.
Implemented cass_statement_bind_decimal[_by_name[_n]]
Integration tests make use of cass_value_get_bytes
function to retrieve varint value from row.

This needs to implemented to make these tests pass.
@muzarski muzarski merged commit a7d1633 into scylladb:master Aug 5, 2024
5 checks passed
@muzarski muzarski mentioned this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants