Skip to content

Commit

Permalink
refactor(sys): impl taos_schemaless_insert_raw_ttl
Browse files Browse the repository at this point in the history
  • Loading branch information
qevolg committed Jan 19, 2025
1 parent c318487 commit 2cd596e
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions taos-ws-sys/src/native/sml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub extern "C" fn taos_schemaless_insert_ttl_with_reqid(

#[no_mangle]
#[allow(non_snake_case)]
pub extern "C" fn taos_schemaless_insert_raw_ttl(
pub unsafe extern "C" fn taos_schemaless_insert_raw_ttl(
taos: *mut TAOS,
lines: *mut c_char,
len: c_int,
Expand All @@ -136,7 +136,16 @@ pub extern "C" fn taos_schemaless_insert_raw_ttl(
precision: c_int,
ttl: i32,
) -> *mut TAOS_RES {
todo!();
taos_schemaless_insert_raw_ttl_with_reqid(
taos,
lines,
len,
totalRows,
protocol,
precision,
ttl,
generate_req_id() as i64,
)
}

#[no_mangle]
Expand Down Expand Up @@ -373,6 +382,17 @@ mod tests {
);
assert!(!res.is_null());

let res = taos_schemaless_insert_raw_ttl(
taos,
lines as _,
len,
&mut total_rows as _,
protocol,
precision,
ttl,
);
assert!(!res.is_null());

let res = taos_schemaless_insert_raw_ttl_with_reqid(
taos,
lines as _,
Expand Down

0 comments on commit 2cd596e

Please sign in to comment.