-
Notifications
You must be signed in to change notification settings - Fork 11
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
types: Implement API functions for duration
type
#135
Conversation
@Lorak-mmk @wprzytula Do you know how to enable the tests for the duration type? I see there is a |
I see that the duration tests were run in CI: |
To be honest I'm not sure how those tests work. I can see that both duration and decimal have some special handling.
And later some registration for types excluding duration: cpp-rust-driver/tests/src/integration/tests/test_cassandra_types.cpp Lines 884 to 891 in 805ef4c
There is also some instantiation that includes decimal: cpp-rust-driver/tests/src/integration/tests/test_cassandra_types.cpp Lines 925 to 930 in 805ef4c
|
Where do you see that? I don't see any occurence of decimal or duration in CI logs. |
build job, step |
I see. Ctrl + f seems to be quite unreliable in those logs... |
61de690
to
9f1f53a
Compare
v2: rebased on master |
9f1f53a
to
77228b2
Compare
v3:
|
Long ago, duration type was not supported by rust driver. This is not true anymore. This commit implements two API functions: - cass_value_get_duration - cass_value_is_duration
Implemented binding macros for duration type. Each duration API function accepts 3 value parameters: - months: i32 - days: i32 - nanoseconds: i64 They are put into CqlDuration structure which is directly encapsulated by CqlValue::Duration.
Implemented cass_collection_append_duration.
Implemented binding duration value to statements.
Implemented cass_tuple_set_duration function.
Implemented cass_user_type_set_duration_* functions.
cpp-driver does that check for some reason.
previously, we would not consider null collections
77228b2
to
e89b178
Compare
v3.1: rebased on master |
One more question: before you mentioned some tests that were incorrectly skipped. Is that fixed now? |
Yes, there is an issue for that: #144. Do you want me to fix it before merging this PR? |
It can be a separate PR - but I don't want to postpone it too long. |
This PR implements following set of API functions related to
duration
type:Pre-review checklist
[ ] I have enabled appropriate tests in.github/workflows/build.yml
ingtest_filter
.[ ] I have enabled appropriate tests in.github/workflows/cassandra.yml
ingtest_filter
.