MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / delete

Function delete

chirpstack/src/storage/device.rs:622–631  ·  view source on GitHub ↗
(dev_eui: &EUI64)

Source from the content-addressed store, hash-verified

620}
621
622pub async fn delete(dev_eui: &EUI64) -> Result<(), Error> {
623 let ra = diesel::delete(device::dsl::device.find(&dev_eui))
624 .execute(&mut get_async_db_conn().await?)
625 .await?;
626 if ra == 0 {
627 return Err(Error::NotFound(dev_eui.to_string()));
628 }
629 info!(dev_eui = %dev_eui, "Device deleted");
630 Ok(())
631}
632
633pub async fn get_count(filters: &Filters) -> Result<i64, Error> {
634 let mut q = device::dsl::device

Callers 1

test_deviceFunction · 0.70

Calls 2

to_stringMethod · 0.80
get_async_db_connFunction · 0.70

Tested by 1

test_deviceFunction · 0.56