Function wmi::query::build_query
source · pub fn build_query<'de, T>(
filters: Option<&HashMap<String, FilterValue>>
) -> WMIResult<String>where
T: Deserialize<'de>,
Expand description
Build an SQL query for the given filters, over the given type (using its name and fields). For example, for:
Examples
For a struct such as:
ⓘ
#[derive(Deserialize, Debug)]
#[serde(rename = "Win32_OperatingSystem")]
#[serde(rename_all = "PascalCase")]
struct OperatingSystem {
caption: String,
debug: bool,
}
The resulting query (with no filters) will look like:
"SELECT Caption, Debug FROM Win32_OperatingSystem";