The inputs each of the guild's derived-state rows was observed under, used to skip the [Self::upsert_script_derived] write when nothing changed.
(
&self,
guild_id: Id<GuildMarker>,
)
| 378 | /// The inputs each of the guild's derived-state rows was observed under, |
| 379 | /// used to skip the [Self::upsert_script_derived] write when nothing changed. |
| 380 | pub async fn get_script_derived_freshness( |
| 381 | &self, |
| 382 | guild_id: Id<GuildMarker>, |
| 383 | ) -> ConfigStoreResult<Vec<ScriptDerivedFreshness>> { |
| 384 | let rows = sqlx::query!( |
| 385 | "SELECT script_id, source_hash, settings_hash, runtime_version FROM \ |
| 386 | guild_script_derived WHERE guild_id = $1", |
| 387 | guild_id.get() as i64, |
| 388 | ) |
| 389 | .fetch_all(&self.pool) |
| 390 | .await?; |
| 391 | |
| 392 | Ok(rows |
| 393 | .into_iter() |
| 394 | .map(|row| ScriptDerivedFreshness { |
| 395 | script_id: row.script_id as u64, |
| 396 | source_hash: row.source_hash, |
| 397 | settings_hash: row.settings_hash, |
| 398 | runtime_version: row.runtime_version, |
| 399 | }) |
| 400 | .collect()) |
| 401 | } |
| 402 | |
| 403 | /// Command contributions of the guild's enabled scripts, without dragging |
| 404 | /// script sources along. |
no outgoing calls
no test coverage detected