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

Method del_many

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

Source from the content-addressed store, hash-verified

206 }
207
208 pub async fn del_many(
209 &self,
210 guild_id: Id<GuildMarker>,
211 plugin_id: Option<u64>,
212 bucket: String,
213 key_pattern: String,
214 ) -> StoreResult<u64> {
215 let res = sqlx::query!(
216 "DELETE FROM bucket_store WHERE guild_id = $1 AND plugin_id = $2 AND bucket = $3 AND \
217 key ILIKE $4 AND (expires_at IS NULL OR expires_at > now());",
218 guild_id.get() as i64,
219 plugin_id.unwrap_or(0) as i64,
220 bucket,
221 key_pattern,
222 )
223 .execute(&self.pool)
224 .await?;
225
226 Ok(res.rows_affected())
227 }
228
229 pub async fn get_many(
230 &self,

Callers 1

Calls 1

executeMethod · 0.80

Tested by

no test coverage detected