Skip to content

Commit

Permalink
user_type: implement cass_user_type_set_duration_*
Browse files Browse the repository at this point in the history
Implemented cass_user_type_set_duration_* functions.
  • Loading branch information
muzarski committed Jul 2, 2024
1 parent 48fef7c commit 61de690
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,11 @@ The driver inherits almost all the features of C/C++ and Rust drivers, such as:
</tr>
<tr>
<td>cass_user_type_set_custom[by_name]</td>
<td rowspan="3">Unimplemented because of the same reasons as binding for statements.<br> <b>Note</b>: The driver does not check whether the type of the value being set for a field of the UDT is compatible with the field's actual type.</td>
<td rowspan="2">Unimplemented because of the same reasons as binding for statements.<br> <b>Note</b>: The driver does not check whether the type of the value being set for a field of the UDT is compatible with the field's actual type.</td>
</tr>
<tr>
<td>cass_user_type_set_decimal[by_name]</td>
</tr>
<tr>
<td>cass_user_type_set_duration[by_name]</td>
</tr>
<tr>
<td colspan=2 align="center" style="font-weight:bold">Value</td>
</tr>
Expand Down
6 changes: 6 additions & 0 deletions scylla-rust-wrapper/src/user_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ make_binders!(
cass_user_type_set_inet_by_name,
cass_user_type_set_inet_by_name_n
);
make_binders!(
duration,
cass_user_type_set_duration,
cass_user_type_set_duration_by_name,
cass_user_type_set_duration_by_name_n
);
make_binders!(
collection,
cass_user_type_set_collection,
Expand Down
8 changes: 0 additions & 8 deletions src/testing_unimplemented.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,14 +456,6 @@ cass_user_type_set_decimal_by_name(CassUserType* user_type,
throw std::runtime_error("UNIMPLEMENTED cass_user_type_set_decimal_by_name\n");
}
CASS_EXPORT CassError
cass_user_type_set_duration_by_name(CassUserType* user_type,
const char* name,
cass_int32_t months,
cass_int32_t days,
cass_int64_t nanos){
throw std::runtime_error("UNIMPLEMENTED cass_user_type_set_duration_by_name\n");
}
CASS_EXPORT CassError
cass_value_get_decimal(const CassValue* value,
const cass_byte_t** varint,
size_t* varint_size,
Expand Down

0 comments on commit 61de690

Please sign in to comment.