azure_devops/work_items/methods/query_by_wiql.rs
1use super::super::models::{Wiql, WorkItemQueryResult};
2use super::super::WorkItemsClient;
3use crate::constants::ApiPath;
4use crate::error::Result;
5
6impl WorkItemsClient<'_> {
7 /// Execute a WIQL (Work Item Query Language) query.
8 ///
9 /// # Arguments
10 ///
11 /// * `project` — The project name to scope the query to.
12 /// * `wiql` — A [`Wiql`] object containing the WIQL query string.
13 ///
14 /// # Returns
15 ///
16 /// A [`WorkItemQueryResult`] with matching work item references.
17 pub async fn query_by_wiql(&self, project: &str, wiql: &Wiql) -> Result<WorkItemQueryResult> {
18 let p = ApiPath::wiql(project);
19 self.http.post(&p, &[], Some(wiql)).await
20 }
21}