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

Function delete

chirpstack/src/storage/device_profile.rs:370–379  ·  view source on GitHub ↗
(id: &Uuid)

Source from the content-addressed store, hash-verified

368}
369
370pub async fn delete(id: &Uuid) -> Result<(), Error> {
371 let ra = diesel::delete(device_profile::dsl::device_profile.find(&fields::Uuid::from(id)))
372 .execute(&mut get_async_db_conn().await?)
373 .await?;
374 if ra == 0 {
375 return Err(error::Error::NotFound(id.to_string()));
376 }
377 info!(id = %id, "Device-profile deleted");
378 Ok(())
379}
380
381pub async fn get_count(filters: &Filters) -> Result<i64, Error> {
382 let mut q = device_profile::table

Callers 3

delete_vendorFunction · 0.70
delete_deviceFunction · 0.70
test_device_profileFunction · 0.70

Calls 2

to_stringMethod · 0.80
get_async_db_connFunction · 0.70

Tested by 1

test_device_profileFunction · 0.56