Skip to content

Commit 19cce8e

Browse files
committed
statement: cass_statement_bind_duration_*
Implemented binding duration value to statements.
1 parent 1d0d7f0 commit 19cce8e

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,11 @@ The driver inherits almost all the features of C/C++ and Rust drivers, such as:
160160
</tr>
161161
<tr>
162162
<td>cass_statement_bind_custom[by_name]</td>
163-
<td rowspan="3">Binding is not implemented for custom types in the Rust driver. <br> Binding Decimal and Duration types requires encoding raw bytes into BigDecimal and CqlDuration types in the Rust driver. <br> <b>Note</b>: The driver does not validate the types of the values passed to queries.</td>
163+
<td rowspan="2">Binding is not implemented for custom types in the Rust driver. <br> Binding Decimal type requires encoding raw bytes into BigDecimal type in the Rust driver. <br> <b>Note</b>: The driver does not validate the types of the values passed to queries.</td>
164164
</tr>
165165
<tr>
166166
<td>cass_statement_bind_decimal[by_name]</td>
167167
</tr>
168-
<tr>
169-
<td>cass_statement_bind_duration[by_name]</td>
170-
</tr>
171168
<tr>
172169
<td colspan=2 align="center" style="font-weight:bold">Future</td>
173170
</tr>

scylla-rust-wrapper/src/statement.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,12 @@ make_binders!(
461461
cass_statement_bind_inet_by_name,
462462
cass_statement_bind_inet_by_name_n
463463
);
464+
make_binders!(
465+
duration,
466+
cass_statement_bind_duration,
467+
cass_statement_bind_duration_by_name,
468+
cass_statement_bind_duration_by_name_n
469+
);
464470
make_binders!(
465471
collection,
466472
cass_statement_bind_collection,

src/testing_unimplemented.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -366,22 +366,6 @@ cass_statement_bind_decimal_by_name(CassStatement* statement,
366366
throw std::runtime_error("UNIMPLEMENTED cass_statement_bind_decimal_by_name\n");
367367
}
368368
CASS_EXPORT CassError
369-
cass_statement_bind_duration(CassStatement* statement,
370-
size_t index,
371-
cass_int32_t months,
372-
cass_int32_t days,
373-
cass_int64_t nanos){
374-
throw std::runtime_error("UNIMPLEMENTED cass_statement_bind_duration\n");
375-
}
376-
CASS_EXPORT CassError
377-
cass_statement_bind_duration_by_name(CassStatement* statement,
378-
const char* name,
379-
cass_int32_t months,
380-
cass_int32_t days,
381-
cass_int64_t nanos){
382-
throw std::runtime_error("UNIMPLEMENTED cass_statement_bind_duration_by_name\n");
383-
}
384-
CASS_EXPORT CassError
385369
cass_statement_set_custom_payload(CassStatement* statement,
386370
const CassCustomPayload* payload){
387371
throw std::runtime_error("UNIMPLEMENTED cass_statement_set_custom_payload\n");

0 commit comments

Comments
 (0)