Removed into_future artifacts.
This commit is contained in:
Родитель
6690392abe
Коммит
9797f8a5b9
|
@ -164,10 +164,7 @@ async fn to_struct(args: &Args, client: &KustoClient) -> Result<(), Box<dyn Erro
|
||||||
}), true, 0.99, "zxcv", 9223372036854775805, guid(d8e3575c-a7a0-47b3-8c73-9a7a6aaabc12),
|
}), true, 0.99, "zxcv", 9223372036854775805, guid(d8e3575c-a7a0-47b3-8c73-9a7a6aaabc12),
|
||||||
]"#;
|
]"#;
|
||||||
|
|
||||||
let response = client
|
let response = client.execute_query(args.database.clone(), query).await?;
|
||||||
.execute_query(args.database.clone(), query)
|
|
||||||
.into_future()
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
let results = response.into_primary_results().next()?;
|
let results = response.into_primary_results().next()?;
|
||||||
|
|
||||||
|
|
|
@ -236,7 +236,6 @@ impl KustoClient {
|
||||||
/// ConnectionString::with_default_auth("https://mycluster.region.kusto.windows.net/"),
|
/// ConnectionString::with_default_auth("https://mycluster.region.kusto.windows.net/"),
|
||||||
/// KustoClientOptions::default())?;
|
/// KustoClientOptions::default())?;
|
||||||
///
|
///
|
||||||
/// // Once the [IntoFuture] trait is stabilized, we can drop the call the `into_future()` here
|
|
||||||
/// let result = client.execute_query_to_struct("some_database", "MyTable | take 10").await?;
|
/// let result = client.execute_query_to_struct("some_database", "MyTable | take 10").await?;
|
||||||
/// println!("{:?}", result); // prints [MyStruct { name: "foo", age: 42 }, MyStruct { name: "bar", age: 43 }]
|
/// println!("{:?}", result); // prints [MyStruct { name: "foo", age: 42 }, MyStruct { name: "bar", age: 43 }]
|
||||||
///
|
///
|
||||||
|
|
|
@ -425,7 +425,7 @@ impl KustoResponseDataSetV2 {
|
||||||
/// table_name: "table_1".to_string(),
|
/// table_name: "table_1".to_string(),
|
||||||
/// table_kind: TableKind::PrimaryResult,
|
/// table_kind: TableKind::PrimaryResult,
|
||||||
/// columns: vec![Column{column_name: "col1".to_string(), column_type: ColumnType::Long}],
|
/// columns: vec![Column{column_name: "col1".to_string(), column_type: ColumnType::Long}],
|
||||||
/// rows: vec![vec![Value::from(3u64)]],
|
/// rows: vec![Value::Array(vec![Value::from(3u64)])],
|
||||||
/// }),
|
/// }),
|
||||||
/// V2QueryResult::TableHeader(TableHeader {
|
/// V2QueryResult::TableHeader(TableHeader {
|
||||||
/// table_id: 1,
|
/// table_id: 1,
|
||||||
|
@ -435,7 +435,7 @@ impl KustoResponseDataSetV2 {
|
||||||
/// }),
|
/// }),
|
||||||
/// V2QueryResult::TableFragment(TableFragment {
|
/// V2QueryResult::TableFragment(TableFragment {
|
||||||
/// table_id: 1,
|
/// table_id: 1,
|
||||||
/// rows: vec![vec![Value::from("first")], vec![Value::from("second")]],
|
/// rows: vec![Value::Array(vec![Value::from("first")]), Value::Array(vec![Value::from("second")])],
|
||||||
/// field_count: Some(1),
|
/// field_count: Some(1),
|
||||||
/// table_fragment_type: TableFragmentType::DataAppend,
|
/// table_fragment_type: TableFragmentType::DataAppend,
|
||||||
/// }),
|
/// }),
|
||||||
|
@ -530,16 +530,6 @@ impl TryFrom<HttpResponse> for KustoResponseDataSetV1 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO enable once in stable
|
|
||||||
// #[cfg(feature = "into_future")]
|
|
||||||
// impl std::future::IntoFuture for ExecuteQueryBuilder {
|
|
||||||
// type IntoFuture = ExecuteQuery;
|
|
||||||
// type Output = <ExecuteQuery as std::future::Future>::Output;
|
|
||||||
// fn into_future(self) -> Self::IntoFuture {
|
|
||||||
// Self::into_future(self)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
pub fn prepare_request(url: Url, http_method: Method) -> Request {
|
pub fn prepare_request(url: Url, http_method: Method) -> Request {
|
||||||
const API_VERSION: &str = "2019-02-13";
|
const API_VERSION: &str = "2019-02-13";
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче