MCPcopy Create free account
hub / github.com/Botloader/botloader / del

Method del

components/stores/src/bucketstore.rs:185–206  ·  view source on GitHub ↗
(
        &self,
        guild_id: Id<GuildMarker>,
        plugin_id: Option<u64>,
        bucket: String,
        key: String,
    )

Source from the content-addressed store, hash-verified

183 }
184
185 pub async fn del(
186 &self,
187 guild_id: Id<GuildMarker>,
188 plugin_id: Option<u64>,
189 bucket: String,
190 key: String,
191 ) -> StoreResult<Option<Entry>> {
192 let res = sqlx::query_as!(
193 DbEntry,
194 "DELETE FROM bucket_store WHERE guild_id = $1 AND plugin_id = $2 AND bucket = $3 AND \
195 key = $4 AND (expires_at IS NULL OR expires_at > now()) RETURNING guild_id, \
196 plugin_id, bucket, key, created_at, updated_at, expires_at, value_json, value_float;",
197 guild_id.get() as i64,
198 plugin_id.unwrap_or(0) as i64,
199 bucket,
200 key,
201 )
202 .fetch_optional(&self.pool)
203 .await?;
204
205 Ok(res.map(Into::into))
206 }
207
208 pub async fn del_many(
209 &self,

Callers 5

check_broken_sessionFunction · 0.45
tags.tsFile · 0.45
moderation.tsFile · 0.45
reaction_roles.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected