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

Function get_for_dev_eui

chirpstack/src/storage/tenant.rs:204–215  ·  view source on GitHub ↗
(dev_eui: EUI64)

Source from the content-addressed store, hash-verified

202}
203
204pub async fn get_for_dev_eui(dev_eui: EUI64) -> Result<Tenant, Error> {
205 let t = tenant::dsl::tenant
206 .inner_join(application::table.on(application::tenant_id.eq(tenant::id)))
207 .inner_join(device::table.on(device::application_id.eq(application::id)))
208 .select(tenant::all_columns)
209 .filter(device::dev_eui.eq(dev_eui))
210 .first(&mut get_async_db_conn().await?)
211 .await
212 .map_err(|e| Error::from_diesel(e, dev_eui.to_string()))?;
213
214 Ok(t)
215}
216
217pub async fn get_for_application_id(app_id: Uuid) -> Result<Tenant, Error> {
218 let t = tenant::dsl::tenant

Callers 6

test_mqttFunction · 0.50
device_queue_itemsFunction · 0.50
get_random_dev_addrMethod · 0.50
get_queueMethod · 0.50

Calls 2

to_stringMethod · 0.80
get_async_db_connFunction · 0.70

Tested by 4

test_mqttFunction · 0.40
device_queue_itemsFunction · 0.40