pub async fn delete_snapshots_after(
        &mut self,
        last_retained_l1_batch_number: L1BatchNumber,
    ) -> DalResult<Vec<SnapshotMetadata>> {
        sqlx::query_as!(
            StorageSnapshotMetadata,
            r#"
            DELETE FROM snapshots
            WHERE
                l1_batch_number > $1
            RETURNING
            version,
            l1_batch_number,
            factory_deps_filepath,
            storage_logs_filepaths
            "#,
            last_retained_l1_batch_number.0 as i32
        )
        .try_map(SnapshotMetadata::try_from)
        .instrument("delete_snapshots_after")
        .with_arg(
            "last_retained_l1_batch_number",
            &last_retained_l1_batch_number,
        )
        .fetch_all(self.storage)
        .await
    }
Deletes all snapshots after the specified L1 batch number and returns their metadata.
core/lib/dal/src/snapshots_dal.rs