Skip to content

Commit 9f1f53a

Browse files
committed
user_type: implement cass_user_type_set_duration_*
Implemented cass_user_type_set_duration_* functions.
1 parent c3e415d commit 9f1f53a

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

README.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,11 @@ The driver inherits almost all the features of C/C++ and Rust drivers, such as:
197197
</tr>
198198
<tr>
199199
<td>cass_user_type_set_custom[by_name]</td>
200-
<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>
200+
<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>
201201
</tr>
202202
<tr>
203203
<td>cass_user_type_set_decimal[by_name]</td>
204204
</tr>
205-
<tr>
206-
<td>cass_user_type_set_duration[by_name]</td>
207-
</tr>
208205
<tr>
209206
<td colspan=2 align="center" style="font-weight:bold">Value</td>
210207
</tr>

scylla-rust-wrapper/src/user_type.rs

+6
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ make_binders!(
181181
cass_user_type_set_inet_by_name,
182182
cass_user_type_set_inet_by_name_n
183183
);
184+
make_binders!(
185+
duration,
186+
cass_user_type_set_duration,
187+
cass_user_type_set_duration_by_name,
188+
cass_user_type_set_duration_by_name_n
189+
);
184190
make_binders!(
185191
collection,
186192
cass_user_type_set_collection,

src/testing_unimplemented.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -456,14 +456,6 @@ cass_user_type_set_decimal_by_name(CassUserType* user_type,
456456
throw std::runtime_error("UNIMPLEMENTED cass_user_type_set_decimal_by_name\n");
457457
}
458458
CASS_EXPORT CassError
459-
cass_user_type_set_duration_by_name(CassUserType* user_type,
460-
const char* name,
461-
cass_int32_t months,
462-
cass_int32_t days,
463-
cass_int64_t nanos){
464-
throw std::runtime_error("UNIMPLEMENTED cass_user_type_set_duration_by_name\n");
465-
}
466-
CASS_EXPORT CassError
467459
cass_value_get_decimal(const CassValue* value,
468460
const cass_byte_t** varint,
469461
size_t* varint_size,

0 commit comments

Comments
 (0)