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

Function delete

chirpstack/src/storage/application.rs:361–375  ·  view source on GitHub ↗
(id: &Uuid)

Source from the content-addressed store, hash-verified

359}
360
361pub async fn delete(id: &Uuid) -> Result<(), Error> {
362 let ra = diesel::delete(application::dsl::application.find(fields::Uuid::from(id)))
363 .execute(&mut get_async_db_conn().await?)
364 .await?;
365 if ra == 0 {
366 return Err(Error::NotFound(id.to_string()));
367 }
368
369 info!(
370 application_id = %id,
371 "Application deleted"
372 );
373
374 Ok(())
375}
376
377pub async fn get_count(filters: &Filters) -> Result<i64, Error> {
378 let mut q = application::table.select(dsl::count_star()).into_boxed();

Callers 2

delete_integrationFunction · 0.70
test_applicationFunction · 0.70

Calls 2

to_stringMethod · 0.80
get_async_db_connFunction · 0.70

Tested by 1

test_applicationFunction · 0.56