Merge pull request #18 from Azure/refactor_request_options

Some refactoring
This commit is contained in:
AsafMah 2022-06-08 10:35:38 +03:00 коммит произвёл GitHub
Родитель 3b96e4fc5d c3fbca31dc
Коммит 0f81cc0cc4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
19 изменённых файлов: 181 добавлений и 780 удалений

Просмотреть файл

@ -37,6 +37,7 @@ time = { version = "0.3.9", features = [
"macros",
"serde-well-known",
] }
derive_builder = "0.11.2"
[dev-dependencies]
arrow = { version = "13", features = ["prettyprint"] }

Просмотреть файл

@ -1,8 +1,7 @@
use crate::authorization_policy::AuthorizationPolicy;
use crate::connection_string::{ConnectionString, ConnectionStringBuilder};
use crate::error::Result;
use crate::operations::mgmt::ManagementQueryBuilder;
use crate::operations::query::ExecuteQueryBuilder;
use crate::operations::query::{QueryRunner, QueryRunnerBuilder, V1QueryRunner, V2QueryRunner};
use azure_core::auth::TokenCredential;
use azure_core::prelude::*;
use azure_core::{ClientOptions, Context, Pipeline, Request};
@ -69,6 +68,12 @@ pub struct KustoClient {
management_url: String,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum QueryKind {
Management,
Query,
}
impl KustoClient {
pub fn new_with_options<T>(
url: T,
@ -99,6 +104,21 @@ impl KustoClient {
&self.management_url
}
pub fn execute<DB, Q>(&self, database: DB, query: Q, kind: QueryKind) -> QueryRunner
where
DB: Into<String>,
Q: Into<String>,
{
QueryRunnerBuilder::default()
.with_kind(kind)
.with_client(self.clone())
.with_database(database.into())
.with_query(query.into())
.with_context(Context::new())
.build()
.unwrap()
}
/// Execute a KQL query.
/// To learn more about KQL go to https://docs.microsoft.com/en-us/azure/kusto/query/
///
@ -106,20 +126,20 @@ impl KustoClient {
///
/// * `database` - Name of the database in scope that is the target of the query
/// * `query` - Text of the query to execute
pub fn execute_query<DB, Q>(&self, database: DB, query: Q) -> ExecuteQueryBuilder
pub fn execute_query<DB, Q>(&self, database: DB, query: Q) -> V2QueryRunner
where
DB: Into<String>,
Q: Into<String>,
{
ExecuteQueryBuilder::new(self.clone(), database.into(), query.into(), Context::new())
V2QueryRunner(self.execute(database, query, QueryKind::Query))
}
pub fn execute_command<DB, Q>(&self, database: DB, query: Q) -> ManagementQueryBuilder
pub fn execute_command<DB, Q>(&self, database: DB, query: Q) -> V1QueryRunner
where
DB: Into<String>,
Q: Into<String>,
{
ManagementQueryBuilder::new(self.clone(), database.into(), query.into(), Context::new())
V1QueryRunner(self.execute(database, query, QueryKind::Management))
}
pub(crate) fn prepare_request(&self, uri: Uri, http_method: http::Method) -> Request {

Просмотреть файл

@ -1,169 +0,0 @@
use crate::client::KustoClient;
use crate::error::InvalidArgumentError;
use crate::models::{QueryBody, RequestProperties, TableV1};
use crate::request_options::RequestOptions;
use async_convert::TryFrom;
use azure_core::prelude::*;
use azure_core::setters;
use azure_core::{collect_pinned_stream, Response as HttpResponse};
use futures::future::BoxFuture;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
type ManagementQuery = BoxFuture<'static, crate::error::Result<KustoResponseDataSetV1>>;
#[derive(Debug, Clone)]
pub struct ManagementQueryBuilder {
client: KustoClient,
database: String,
query: String,
client_request_id: Option<ClientRequestId>,
app: Option<App>,
user: Option<User>,
parameters: Option<HashMap<String, serde_json::Value>>,
options: Option<RequestOptions>,
context: Context,
}
impl ManagementQueryBuilder {
pub(crate) fn new(
client: KustoClient,
database: String,
query: String,
context: Context,
) -> Self {
Self {
client,
database,
query: query.trim().into(),
client_request_id: None,
app: None,
user: None,
parameters: None,
options: None,
context,
}
}
setters! {
client_request_id: ClientRequestId => Some(client_request_id),
app: App => Some(app),
user: User => Some(user),
options: RequestOptions => Some(options),
parameters: HashMap<String, serde_json::Value> => Some(parameters),
query: String => query,
database: String => database,
context: Context => context,
}
pub fn into_future(self) -> ManagementQuery {
let this = self.clone();
let ctx = self.context.clone();
Box::pin(async move {
let url = this.client.management_url();
let mut request = this.client.prepare_request(
url.parse().map_err(InvalidArgumentError::InvalidUri)?,
http::Method::POST,
);
if let Some(request_id) = &this.client_request_id {
request.insert_headers(request_id);
};
if let Some(app) = &this.app {
request.insert_headers(app);
};
if let Some(user) = &this.user {
request.insert_headers(user);
};
let body = QueryBody {
db: this.database,
csl: this.query,
Properties: Some(RequestProperties {
options: this.options,
parameters: this.parameters,
}),
};
let bytes = bytes::Bytes::from(serde_json::to_string(&body)?);
request.insert_headers(&ContentLength::new(bytes.len() as i32));
request.set_body(bytes.into());
let response = self
.client
.pipeline()
.send(&mut ctx.clone(), &mut request)
.await?;
<KustoResponseDataSetV1 as TryFrom<HttpResponse>>::try_from(response).await
})
}
}
#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
#[serde(rename_all = "PascalCase")]
pub struct KustoResponseDataSetV1 {
pub tables: Vec<TableV1>,
}
impl KustoResponseDataSetV1 {
pub fn table_count(&self) -> usize {
self.tables.len()
}
}
#[async_convert::async_trait]
impl async_convert::TryFrom<HttpResponse> for KustoResponseDataSetV1 {
type Error = crate::error::Error;
async fn try_from(response: HttpResponse) -> Result<Self, crate::error::Error> {
let (_status_code, _header_map, pinned_stream) = response.deconstruct();
let data = collect_pinned_stream(pinned_stream).await?;
Ok(serde_json::from_slice(&data.to_vec())?)
}
}
// TODO enable once in stable
// #[cfg(feature = "into_future")]
// impl std::future::IntoFuture for ManagementQueryBuilder {
// type IntoFuture = ManagementQuery;
// type Output = <ManagementQuery as std::future::Future>::Output;
// fn into_future(self) -> Self::IntoFuture {
// Self::into_future(self)
// }
// }
#[cfg(test)]
mod tests {
use super::*;
use std::path::PathBuf;
#[test]
fn load_response_data() {
let data = r#"{
"Tables": [{
"TableName": "Table_0",
"Columns": [{
"ColumnName": "Text",
"DataType": "String",
"ColumnType": "string"
}],
"Rows": [["Hello, World!"]]
}]
}"#;
let parsed = serde_json::from_str::<KustoResponseDataSetV1>(data);
assert!(parsed.is_ok())
}
#[test]
fn load_adminthenquery_response() {
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
path.push("tests/inputs/adminthenquery.json");
let data = std::fs::read_to_string(path).unwrap();
let parsed = serde_json::from_str::<KustoResponseDataSetV1>(&data).unwrap();
assert_eq!(parsed.table_count(), 4)
}
}

Просмотреть файл

@ -1,2 +1 @@
pub mod mgmt;
pub mod query;

Просмотреть файл

@ -1,73 +1,72 @@
#[cfg(feature = "arrow")]
use crate::arrow::convert_table;
use crate::client::KustoClient;
use crate::error::InvalidArgumentError;
use crate::client::{KustoClient, QueryKind};
use crate::error::{Error, InvalidArgumentError};
use crate::models::{
DataSetCompletion, DataSetHeader, DataTable, QueryBody, RequestProperties, TableKind,
DataSetCompletion, DataSetHeader, DataTable, QueryBody, RequestProperties, TableKind, TableV1,
};
use crate::request_options::RequestOptions;
#[cfg(feature = "arrow")]
use arrow::record_batch::RecordBatch;
use async_convert::TryFrom;
use azure_core::prelude::*;
use azure_core::setters;
use azure_core::{collect_pinned_stream, Response as HttpResponse};
use futures::future::BoxFuture;
use futures::TryFutureExt;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
type ExecuteQuery = BoxFuture<'static, crate::error::Result<KustoResponseDataSetV2>>;
type QueryRun = BoxFuture<'static, crate::error::Result<KustoResponse>>;
type V1QueryRun = BoxFuture<'static, crate::error::Result<KustoResponseDataSetV1>>;
type V2QueryRun = BoxFuture<'static, crate::error::Result<KustoResponseDataSetV2>>;
#[derive(Debug, Clone)]
pub struct ExecuteQueryBuilder {
#[derive(Debug, Clone, derive_builder::Builder)]
#[builder(setter(into, strip_option, prefix = "with"))]
pub struct QueryRunner {
client: KustoClient,
database: String,
query: String,
kind: QueryKind,
#[builder(default)]
client_request_id: Option<ClientRequestId>,
#[builder(default)]
app: Option<App>,
#[builder(default)]
user: Option<User>,
#[builder(default)]
parameters: Option<HashMap<String, serde_json::Value>>,
#[builder(default)]
options: Option<RequestOptions>,
context: Context,
}
pub struct V1QueryRunner(pub QueryRunner);
impl ExecuteQueryBuilder {
pub(crate) fn new(
client: KustoClient,
database: String,
query: String,
context: Context,
) -> Self {
Self {
client,
database,
query: query.trim().into(),
client_request_id: None,
app: None,
user: None,
parameters: None,
options: None,
context,
}
pub struct V2QueryRunner(pub QueryRunner);
impl V1QueryRunner {
pub fn into_future(self) -> V1QueryRun {
let V1QueryRunner(query_runner) = self;
Box::pin(query_runner.into_future().map_ok(|e| e.try_into().unwrap()))
}
}
setters! {
client_request_id: ClientRequestId => Some(client_request_id),
app: App => Some(app),
user: User => Some(user),
options: RequestOptions => Some(options),
parameters: HashMap<String, serde_json::Value> => Some(parameters),
query: String => query,
database: String => database,
context: Context => context,
impl V2QueryRunner {
pub fn into_future(self) -> V2QueryRun {
let V2QueryRunner(query_runner) = self;
Box::pin(query_runner.into_future().map_ok(|e| e.try_into().unwrap()))
}
}
pub fn into_future(self) -> ExecuteQuery {
impl QueryRunner {
pub fn into_future(self) -> QueryRun {
let this = self.clone();
let ctx = self.context.clone();
Box::pin(async move {
let url = this.client.query_url();
let url = match this.kind {
QueryKind::Management => this.client.management_url(),
QueryKind::Query => this.client.query_url(),
};
let mut request = this.client.prepare_request(
url.parse().map_err(InvalidArgumentError::InvalidUri)?,
http::Method::POST,
@ -101,7 +100,18 @@ impl ExecuteQueryBuilder {
.send(&mut ctx.clone(), &mut request)
.await?;
<KustoResponseDataSetV2 as TryFrom<HttpResponse>>::try_from(response).await
Ok(match this.kind {
QueryKind::Management => {
<KustoResponseDataSetV1 as TryFrom<HttpResponse>>::try_from(response)
.map_ok(KustoResponse::V1)
.await?
}
QueryKind::Query => {
<KustoResponseDataSetV2 as TryFrom<HttpResponse>>::try_from(response)
.map_ok(KustoResponse::V2)
.await?
}
})
})
}
}
@ -115,11 +125,39 @@ pub enum ResultTable {
DataSetCompletion(DataSetCompletion),
}
#[derive(Debug, Clone)]
pub enum KustoResponse {
V1(KustoResponseDataSetV1),
V2(KustoResponseDataSetV2),
}
#[derive(Debug, Clone)]
pub struct KustoResponseDataSetV2 {
pub tables: Vec<ResultTable>,
}
impl std::convert::TryFrom<KustoResponse> for KustoResponseDataSetV2 {
type Error = Error;
fn try_from(value: KustoResponse) -> Result<Self, Self::Error> {
match value {
KustoResponse::V2(v2) => Ok(v2),
_ => Err(Error::ConversionError("KustoResponseDataSetV2".to_string())),
}
}
}
impl std::convert::TryFrom<KustoResponse> for KustoResponseDataSetV1 {
type Error = Error;
fn try_from(value: KustoResponse) -> Result<Self, Self::Error> {
match value {
KustoResponse::V1(v1) => Ok(v1),
_ => Err(Error::ConversionError("KustoResponseDataSetV2".to_string())),
}
}
}
impl KustoResponseDataSetV2 {
pub fn table_count(&self) -> usize {
self.tables.len()
@ -141,11 +179,23 @@ impl KustoResponseDataSetV2 {
}
}
#[async_convert::async_trait]
impl async_convert::TryFrom<HttpResponse> for KustoResponseDataSetV2 {
type Error = crate::error::Error;
#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
#[serde(rename_all = "PascalCase")]
pub struct KustoResponseDataSetV1 {
pub tables: Vec<TableV1>,
}
async fn try_from(response: HttpResponse) -> Result<Self, crate::error::Error> {
impl KustoResponseDataSetV1 {
pub fn table_count(&self) -> usize {
self.tables.len()
}
}
#[async_convert::async_trait]
impl TryFrom<HttpResponse> for KustoResponseDataSetV2 {
type Error = Error;
async fn try_from(response: HttpResponse) -> Result<Self, Error> {
let (_status_code, _header_map, pinned_stream) = response.deconstruct();
let data = collect_pinned_stream(pinned_stream).await?;
let tables: Vec<ResultTable> = serde_json::from_slice(&data.to_vec())?;
@ -153,6 +203,17 @@ impl async_convert::TryFrom<HttpResponse> for KustoResponseDataSetV2 {
}
}
#[async_convert::async_trait]
impl TryFrom<HttpResponse> for KustoResponseDataSetV1 {
type Error = Error;
async fn try_from(response: HttpResponse) -> Result<Self, Error> {
let (_status_code, _header_map, pinned_stream) = response.deconstruct();
let data = collect_pinned_stream(pinned_stream).await?;
Ok(serde_json::from_slice(&data.to_vec())?)
}
}
// TODO enable once in stable
// #[cfg(feature = "into_future")]
// impl std::future::IntoFuture for ExecuteQueryBuilder {
@ -162,3 +223,38 @@ impl async_convert::TryFrom<HttpResponse> for KustoResponseDataSetV2 {
// Self::into_future(self)
// }
// }
#[cfg(test)]
mod tests {
use super::*;
use std::path::PathBuf;
#[test]
fn load_response_data() {
let data = r#"{
"Tables": [{
"TableName": "Table_0",
"Columns": [{
"ColumnName": "Text",
"DataType": "String",
"ColumnType": "string"
}],
"Rows": [["Hello, World!"]]
}]
}"#;
let parsed = serde_json::from_str::<KustoResponseDataSetV1>(data);
assert!(parsed.is_ok())
}
#[test]
fn load_adminthenquery_response() {
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
path.push("tests/inputs/adminthenquery.json");
let data = std::fs::read_to_string(path).unwrap();
let parsed = serde_json::from_str::<KustoResponseDataSetV1>(&data).unwrap();
assert_eq!(parsed.table_count(), 4)
}
}

Просмотреть файл

@ -13,8 +13,9 @@
pub use crate::client::{KustoClient, KustoClientOptions};
pub use crate::connection_string::ConnectionStringBuilder;
pub use crate::operations::mgmt::KustoResponseDataSetV1;
pub use crate::operations::query::{KustoResponseDataSetV2, ResultTable};
pub use crate::operations::query::{
KustoResponse, KustoResponseDataSetV1, KustoResponseDataSetV2, ResultTable,
};
// Token credentials are re-exported for user convenience
pub use azure_identity::token_credentials::{
AutoRefreshingTokenCredential, AzureCliCredential, ClientSecretCredential,

Просмотреть файл

@ -26,7 +26,8 @@ pub enum QueryConsistency {
Databaseaffinitizedweakconsistency,
}
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
#[derive(Serialize, Deserialize, Debug, Clone, Default, derive_builder::Builder)]
#[builder(setter(into, strip_option, prefix = "with"), default)]
pub struct RequestOptions {
/// If set and positive, indicates the maximum number of HTTP redirects that the client will process.
client_max_redirect_count: Option<i64>,
@ -134,416 +135,3 @@ pub struct RequestOptions {
/// Validates user's permissions to perform the query and doesn't run the query itself.
validate_permissions: Option<bool>,
}
#[derive(Default)]
pub struct RequestOptionsBuilder(RequestOptions);
impl RequestOptionsBuilder {
/// If set and positive, indicates the maximum number of HTTP redirects that the client will process.
pub fn with_client_max_redirect_count(&mut self, count: i64) -> &mut Self {
self.0.client_max_redirect_count = Some(count);
self
}
/// If true, disables reporting partial query failures as part of the result set
pub fn with_defer_partial_query_failures(
&mut self,
defer_partial_query_failures: bool,
) -> &mut Self {
self.0.deferpartialqueryfailures = Some(defer_partial_query_failures);
self
}
/// A hint to use shuffle strategy for materialized views that are referenced in the query.
/// The property is an array of materialized views names and the shuffle keys to use.
/// Examples: 'dynamic([ { "Name": "V1", "Keys" : [ "K1", "K2" ] } ])' (shuffle view V1 by K1, K2) or 'dynamic([ { "Name": "V1" } ])' (shuffle view V1 by all keys)
pub fn with_materialized_view_shuffle(
&mut self,
materialized_view_shuffle: serde_json::Value,
) -> &mut Self {
self.0.materialized_view_shuffle = Some(materialized_view_shuffle);
self
}
/// Overrides the default maximum amount of memory a whole query may allocate per node
pub fn with_max_memory_consumption_per_query_per_node(
&mut self,
max_memory_consumption_per_query_per_node: u64,
) -> &mut Self {
self.0.max_memory_consumption_per_query_per_node =
Some(max_memory_consumption_per_query_per_node);
self
}
/// Overrides the default maximum amount of memory a query operator may allocate.
pub fn with_max_memory_consumption_per_iterator(
&mut self,
max_memory_consumption_per_iterator: u64,
) -> &mut Self {
self.0.maxmemoryconsumptionperiterator = Some(max_memory_consumption_per_iterator);
self
}
/// Overrides the default maximum number of columns a query is allowed to produce.
pub fn with_max_output_columns(&mut self, max_output_columns: u64) -> &mut Self {
self.0.maxoutputcolumns = Some(max_output_columns);
self
}
/// Enables setting the request timeout to its maximum value.
pub fn with_no_request_timeout(&mut self, no_request_timeout: bool) -> &mut Self {
self.0.norequesttimeout = Some(no_request_timeout);
self
}
/// Enables suppressing truncation of the query results returned to the caller.
pub fn with_no_truncation(&mut self, no_truncation: bool) -> &mut Self {
self.0.notruncation = Some(no_truncation);
self
}
/// If true, push simple selection through aggregation
pub fn with_push_selection_through_aggregation(
&mut self,
push_selection_through_aggregation: bool,
) -> &mut Self {
self.0.push_selection_through_aggregation = Some(push_selection_through_aggregation);
self
}
/// When evaluating the bin_auto() function, the start value to use.
pub fn with_query_bin_auto_at(&mut self, query_bin_auto_at: impl Into<String>) -> &mut Self {
self.0.query_bin_auto_at = Some(query_bin_auto_at.into());
self
}
/// When evaluating the bin_auto() function, the bin size value to use.
pub fn with_query_bin_auto_size(
&mut self,
query_bin_auto_size: impl Into<String>,
) -> &mut Self {
self.0.query_bin_auto_size = Some(query_bin_auto_size.into());
self
}
/// The default parameter value of the cursor_after() function when called without parameters.
pub fn with_query_cursor_after_default(
&mut self,
query_cursor_after_default: impl Into<String>,
) -> &mut Self {
self.0.query_cursor_after_default = Some(query_cursor_after_default.into());
self
}
/// The default parameter value of the cursor_before_or_at() function when called without parameters.
pub fn with_query_cursor_before_or_at_default(
&mut self,
query_cursor_before_or_at_default: impl Into<String>,
) -> &mut Self {
self.0.query_cursor_before_or_at_default = Some(query_cursor_before_or_at_default.into());
self
}
/// Overrides the cursor value returned by the cursor_current() or current_cursor() functions.
pub fn with_query_cursor_current(
&mut self,
query_cursor_current: impl Into<String>,
) -> &mut Self {
self.0.query_cursor_current = Some(query_cursor_current.into());
self
}
/// Disables usage of cursor functions in the context of the query.
pub fn with_query_cursor_disabled(&mut self, query_cursor_disabled: bool) -> &mut Self {
self.0.query_cursor_disabled = Some(query_cursor_disabled);
self
}
/// List of table names that should be scoped to cursor_after_default .. cursor_before_or_at_default (upper bound is optional).
pub fn with_query_cursor_scoped_tables(
&mut self,
query_cursor_scoped_tables: Vec<String>,
) -> &mut Self {
self.0.query_cursor_scoped_tables = Some(query_cursor_scoped_tables);
self
}
/// // Controls the query's datascope -- whether the query applies to all data or just part of it.
pub fn with_query_datascope(&mut self, query_datascope: DataScope) -> &mut Self {
self.0.query_datascope = Some(query_datascope);
self
}
/// Controls the column name for the query's datetime scope (query_datetimescope_to / query_datetimescope_from).
pub fn with_query_datetimescope_column(
&mut self,
query_datetimescope_column: impl Into<String>,
) -> &mut Self {
self.0.query_datetimescope_column = Some(query_datetimescope_column.into());
self
}
/// Controls the query's datetime scope (earliest)
/// used as auto-applied filter on query_datetimescope_column only (if defined).
pub fn with_query_datetimescope_from(
&mut self,
query_datetimescope_from: impl Into<KustoDateTime>,
) -> &mut Self {
self.0.query_datetimescope_from = Some(query_datetimescope_from.into());
self
}
/// Controls the query's datetime scope (latest)
/// used as auto-applied filter on query_datetimescope_column only (if defined).
pub fn with_query_datetimescope_to(
&mut self,
query_datetimescope_to: impl Into<KustoDateTime>,
) -> &mut Self {
self.0.query_datetimescope_to = Some(query_datetimescope_to.into());
self
}
/// If set, controls the way the subquery merge behaves: the executing node will introduce an additional
/// level in the query hierarchy for each subgroup of nodes; the size of the subgroup is set by this option.
pub fn with_query_distribution_nodes_span(
&mut self,
query_distribution_nodes_span: i32,
) -> &mut Self {
self.0.query_distribution_nodes_span = Some(query_distribution_nodes_span);
self
}
/// The percentage of nodes to fan out execution to.
pub fn with_query_fanout_nodes_percent(
&mut self,
query_fanout_nodes_percent: i32,
) -> &mut Self {
self.0.query_fanout_nodes_percent = Some(query_fanout_nodes_percent);
self
}
/// The percentage of threads to fan out execution to.
pub fn with_query_fanout_threads_percent(
&mut self,
query_fanout_threads_percent: i32,
) -> &mut Self {
self.0.query_fanout_threads_percent = Some(query_fanout_threads_percent);
self
}
/// If specified, forces Row Level Security rules, even if row_level_security policy is disabled
pub fn with_query_force_row_level_security(
&mut self,
query_force_row_level_security: bool,
) -> &mut Self {
self.0.query_force_row_level_security = Some(query_force_row_level_security);
self
}
/// Controls how the query text is to be interpreted.
pub fn with_query_language(&mut self, query_language: QueryLanguage) -> &mut Self {
self.0.query_language = Some(query_language);
self
}
/// Enables logging of the query parameters, so that they can be viewed later in the .show queries journal.
pub fn with_query_log_query_parameters(
&mut self,
query_log_query_parameters: bool,
) -> &mut Self {
self.0.query_log_query_parameters = Some(query_log_query_parameters);
self
}
/// Overrides the default maximum number of entities in a union.
pub fn with_query_max_entities_in_union(
&mut self,
query_max_entities_in_union: i64,
) -> &mut Self {
self.0.query_max_entities_in_union = Some(query_max_entities_in_union);
self
}
/// Overrides the datetime value returned by the now(0s) function.
pub fn with_query_now(&mut self, query_now: impl Into<KustoDateTime>) -> &mut Self {
self.0.query_now = Some(query_now.into());
self
}
/// If set, generate python debug query for the enumerated python node (default first).
pub fn with_query_python_debug(&mut self, query_python_debug: i32) -> &mut Self {
self.0.query_python_debug = Some(query_python_debug);
self
}
/// If set, retrieves the schema of each tabular data in the results of the query instead of the data itself.
pub fn with_query_results_apply_getschema(
&mut self,
query_results_apply_getschema: bool,
) -> &mut Self {
self.0.query_results_apply_getschema = Some(query_results_apply_getschema);
self
}
/// If positive, controls the maximum age of the cached query results the service is allowed to return
pub fn with_query_results_cache_max_age(
&mut self,
query_results_cache_max_age: impl Into<KustoDuration>,
) -> &mut Self {
self.0.query_results_cache_max_age = Some(query_results_cache_max_age.into());
self
}
/// If set, enables per-shard query cache.
pub fn with_query_results_cache_per_shard(
&mut self,
query_results_cache_per_shard: bool,
) -> &mut Self {
self.0.query_results_cache_per_shard = Some(query_results_cache_per_shard);
self
}
/// Hint for Kusto as to how many records to send in each update
/// (takes effect only if OptionResultsProgressiveEnabled is set)
pub fn with_query_results_progressive_row_count(
&mut self,
query_results_progressive_row_count: i64,
) -> &mut Self {
self.0.query_results_progressive_row_count = Some(query_results_progressive_row_count);
self
}
/// Hint for Kusto as to how often to send progress frames
/// (takes effect only if OptionResultsProgressiveEnabled is set)
pub fn with_query_results_progressive_update_period(
&mut self,
query_results_progressive_update_period: i32,
) -> &mut Self {
self.0.query_results_progressive_update_period =
Some(query_results_progressive_update_period);
self
}
/// Enables limiting query results to this number of records.
pub fn with_query_take_max_records(&mut self, query_take_max_records: i64) -> &mut Self {
self.0.query_take_max_records = Some(query_take_max_records);
self
}
/// Controls query consistency
pub fn with_query_consistency(&mut self, query_consistency: QueryConsistency) -> &mut Self {
self.0.queryconsistency = Some(query_consistency);
self
}
/// Request application name to be used in the reporting (e.g. show queries).
pub fn with_request_app_name(&mut self, request_app_name: impl Into<String>) -> &mut Self {
self.0.request_app_name = Some(request_app_name.into());
self
}
/// If specified, blocks access to tables for which row_level_security policy is enabled
pub fn with_request_block_row_level_security(
&mut self,
request_block_row_level_security: bool,
) -> &mut Self {
self.0.request_block_row_level_security = Some(request_block_row_level_security);
self
}
/// If specified, indicates that the request can't call-out to a user-provided service.
pub fn with_request_callout_disabled(&mut self, request_callout_disabled: bool) -> &mut Self {
self.0.request_callout_disabled = Some(request_callout_disabled);
self
}
/// Arbitrary text that the author of the request wants to include as the request description.
pub fn with_request_description(
&mut self,
request_description: impl Into<String>,
) -> &mut Self {
self.0.request_description = Some(request_description.into());
self
}
/// If specified, indicates that the request can't invoke code in the ExternalTable.
pub fn with_request_external_table_disabled(
&mut self,
request_external_table_disabled: bool,
) -> &mut Self {
self.0.request_external_table_disabled = Some(request_external_table_disabled);
self
}
/// If specified, indicates that the service should not impersonate the caller's identity.
pub fn with_request_impersonation_disabled(
&mut self,
request_impersonation_disabled: bool,
) -> &mut Self {
self.0.request_impersonation_disabled = Some(request_impersonation_disabled);
self
}
/// If specified, indicates that the request can't write anything.
pub fn with_request_readonly(&mut self, request_readonly: bool) -> &mut Self {
self.0.request_readonly = Some(request_readonly);
self
}
/// If specified, indicates that the request can't access remote databases and clusters.
pub fn with_request_remote_entities_disabled(
&mut self,
request_remote_entities_disabled: bool,
) -> &mut Self {
self.0.request_remote_entities_disabled = Some(request_remote_entities_disabled);
self
}
/// If specified, indicates that the request can't invoke code in the sandbox.
pub fn with_request_sandboxed_execution_disabled(
&mut self,
request_sandboxed_execution_disabled: bool,
) -> &mut Self {
self.0.request_sandboxed_execution_disabled = Some(request_sandboxed_execution_disabled);
self
}
/// Request user to be used in the reporting (e.g. show queries).
pub fn with_request_user(&mut self, request_user: impl Into<String>) -> &mut Self {
self.0.request_user = Some(request_user.into());
self
}
/// If set, enables the progressive query stream
pub fn with_results_progressive_enabled(
&mut self,
results_progressive_enabled: bool,
) -> &mut Self {
self.0.results_progressive_enabled = Some(results_progressive_enabled);
self
}
/// Overrides the default request timeout.
pub fn with_server_timeout(&mut self, server_timeout: impl Into<KustoDuration>) -> &mut Self {
self.0.servertimeout = Some(server_timeout.into());
self
}
/// Overrides the default maximum number of records a query is allowed to return to the caller (truncation).
pub fn with_truncation_max_records(&mut self, truncation_max_records: i64) -> &mut Self {
self.0.truncationmaxrecords = Some(truncation_max_records);
self
}
/// Overrides the default maximum data size a query is allowed to return to the caller (truncation).
pub fn with_truncation_max_size(&mut self, truncation_max_size: i64) -> &mut Self {
self.0.truncationmaxsize = Some(truncation_max_size);
self
}
/// Validates user's permissions to perform the query and doesn't run the query itself.
pub fn with_validate_permissions(&mut self, validate_permissions: bool) -> &mut Self {
self.0.validate_permissions = Some(validate_permissions);
self
}
}

Просмотреть файл

@ -1,15 +1 @@
{
"uri": "/v2/rest/query",
"method": "POST",
"headers": {
"accept": "application/json",
"accept-encoding": "gzip",
"authorization": "<<STRIPPED>>",
"content-length": "499",
"content-type": "application/json; charset=utf-8",
"user-agent": "azsdk-rust-azure-kusto-data/0.1.0 (1.59.0; linux; x86_64)",
"x-ms-client-version": "Kusto.Rust.Client:0.1.0",
"x-ms-version": "2019-02-13"
},
"body": "eyJkYiI6ImN0bmEiLCJjc2wiOiJkYXRhdGFibGUoXG4gICAgICAgICAgICBpZDppbnQsXG4gICAgICAgICAgICBzdHJpbmdfY29sOnN0cmluZyxcbiAgICAgICAgICAgIGJvb2xfY29sOmJvb2wsXG4gICAgICAgICAgICBpbnRfY29sOmludCxcbiAgICAgICAgICAgIGJpZ2ludF9jb2w6bG9uZyxcbiAgICAgICAgICAgIGZsb2F0X2NvbDpyZWFsLFxuICAgICAgICAgICAgdGltZXN0YW1wX2NvbDpkYXRldGltZSxcbiAgICAgICAgICAgIGR1cmF0aW9uX2NvbDp0aW1lc3BhblxuICAgICAgICApIFtcbiAgICAgICAgICAgIDYsICdIZWxsbycsIHRydWUsIDAsIDAsIDAsIGRhdGV0aW1lKDIwMDktMDQtMDEgMDA6MDA6MDApLCB0aW1lc3BhbigxLjAwOjAwOjAwLjAwMDAwMDEpLFxuICAgICAgICAgICAgNywgJ1dvcmxkJywgZmFsc2UsIDEsIDEwLCAxLjEsIGRhdGV0aW1lKDIwMDktMDQtMDEgMDA6MDE6MDApLCB0aW1lc3BhbigtMDA6MDE6MDAuMDAwMTAwMSksXG4gICAgICAgIF0ifQ=="
}
{"uri":"/v2/rest/query","method":"POST","headers":{"accept":"application/json","accept-encoding":"gzip","authorization":"<<STRIPPED>>","content-length":"563","content-type":"application/json; charset=utf-8","user-agent":"azsdk-rust-azure-kusto-data/0.1.0 (1.58.1; windows; x86_64)","x-ms-client-version":"Kusto.Rust.Client:0.1.0","x-ms-version":"2019-02-13"},"body":"eyJkYiI6IkRhdGEiLCJjc2wiOiJcbiAgICAgICAgZGF0YXRhYmxlKFxuICAgICAgICAgICAgaWQ6aW50LFxuICAgICAgICAgICAgc3RyaW5nX2NvbDpzdHJpbmcsXG4gICAgICAgICAgICBib29sX2NvbDpib29sLFxuICAgICAgICAgICAgaW50X2NvbDppbnQsXG4gICAgICAgICAgICBiaWdpbnRfY29sOmxvbmcsXG4gICAgICAgICAgICBmbG9hdF9jb2w6cmVhbCxcbiAgICAgICAgICAgIHRpbWVzdGFtcF9jb2w6ZGF0ZXRpbWUsXG4gICAgICAgICAgICBkdXJhdGlvbl9jb2w6dGltZXNwYW5cbiAgICAgICAgKSBbXG4gICAgICAgICAgICA2LCAnSGVsbG8nLCB0cnVlLCAwLCAwLCAwLCBkYXRldGltZSgyMDA5LTA0LTAxIDAwOjAwOjAwKSwgdGltZXNwYW4oMS4wMDowMDowMC4wMDAwMDAxKSxcbiAgICAgICAgICAgIDcsICdXb3JsZCcsIGZhbHNlLCAxLCAxMCwgMS4xLCBkYXRldGltZSgyMDA5LTA0LTAxIDAwOjAxOjAwKSwgdGltZXNwYW4oLTAwOjAxOjAwLjAwMDEwMDEpLFxuICAgICAgICBdXG4gICAgIiwiUHJvcGVydGllcyI6eyJQYXJhbWV0ZXJzIjpudWxsLCJPcHRpb25zIjpudWxsfX0="}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1 +1 @@
ctna
Data

Просмотреть файл

@ -1,15 +1 @@
{
"uri": "/v1/rest/mgmt",
"method": "POST",
"headers": {
"accept": "application/json",
"accept-encoding": "gzip",
"authorization": "<<STRIPPED>>",
"content-length": "84",
"content-type": "application/json; charset=utf-8",
"user-agent": "azsdk-rust-azure-kusto-data/0.1.0 (1.59.0; linux; x86_64)",
"x-ms-client-version": "Kusto.Rust.Client:0.1.0",
"x-ms-version": "2019-02-13"
},
"body": "eyJkYiI6ImN0bmEiLCJjc2wiOiIuc2V0IEt1c3RvUnNUZXN0IDx8IGxldCB0ZXh0PVwiSGVsbG8sIFdvcmxkIVwiOyBwcmludCBzdHI9dGV4dCJ9"
}
{"uri":"/v1/rest/mgmt","method":"POST","headers":{"accept":"application/json","accept-encoding":"gzip","authorization":"<<STRIPPED>>","content-length":"132","content-type":"application/json; charset=utf-8","user-agent":"azsdk-rust-azure-kusto-data/0.1.0 (1.58.1; windows; x86_64)","x-ms-client-version":"Kusto.Rust.Client:0.1.0","x-ms-version":"2019-02-13"},"body":"eyJkYiI6IkRhdGEiLCJjc2wiOiIuc2V0IEt1c3RvUnNUZXN0IDx8IGxldCB0ZXh0PVwiSGVsbG8sIFdvcmxkIVwiOyBwcmludCBzdHI9dGV4dCIsIlByb3BlcnRpZXMiOnsiUGFyYW1ldGVycyI6bnVsbCwiT3B0aW9ucyI6bnVsbH19"}

Просмотреть файл

@ -1,14 +1 @@
{
"status": 200,
"headers": {
"content-type": "application/json; charset=UTF-8",
"date": "Sun, 24 Apr 2022 11:57:15 GMT",
"server": "Microsoft-HTTPAPI/2.0",
"strict-transport-security": "max-age=15724800; includeSubDomains",
"transfer-encoding": "chunked",
"vary": "Accept-Encoding",
"x-ms-activity-id": "ce94942c-8fd7-434b-ab39-de8e34ee5f78",
"x-ms-client-request-id": "unspecified;8e8f905d-af26-4f34-b0ed-6d2d6d881531"
},
"body": "eyJUYWJsZXMiOlt7IlRhYmxlTmFtZSI6IlRhYmxlXzAiLCJDb2x1bW5zIjpbeyJDb2x1bW5OYW1lIjoiRXh0ZW50SWQiLCJEYXRhVHlwZSI6Ikd1aWQiLCJDb2x1bW5UeXBlIjoiZ3VpZCJ9LHsiQ29sdW1uTmFtZSI6Ik9yaWdpbmFsU2l6ZSIsIkRhdGFUeXBlIjoiRG91YmxlIiwiQ29sdW1uVHlwZSI6InJlYWwifSx7IkNvbHVtbk5hbWUiOiJFeHRlbnRTaXplIiwiRGF0YVR5cGUiOiJEb3VibGUiLCJDb2x1bW5UeXBlIjoicmVhbCJ9LHsiQ29sdW1uTmFtZSI6IkNvbXByZXNzZWRTaXplIiwiRGF0YVR5cGUiOiJEb3VibGUiLCJDb2x1bW5UeXBlIjoicmVhbCJ9LHsiQ29sdW1uTmFtZSI6IkluZGV4U2l6ZSIsIkRhdGFUeXBlIjoiRG91YmxlIiwiQ29sdW1uVHlwZSI6InJlYWwifSx7IkNvbHVtbk5hbWUiOiJSb3dDb3VudCIsIkRhdGFUeXBlIjoiSW50NjQiLCJDb2x1bW5UeXBlIjoibG9uZyJ9XSwiUm93cyI6W1siNDI1ODEzMjItMzFiYS00ZTk1LTkzZTgtYmZkM2FhM2JjMzQ3IiwyMS4wLDMzNS4wLDEyOC4wLDIwNy4wLDFdXX1dfQ=="
}
{"status":200,"headers":{"content-type":"application/json","date":"Wed, 08 Jun 2022 05:46:30 GMT","server":"Kestrel","strict-transport-security":"max-age=2592000; includeSubDomains","transfer-encoding":"chunked","vary":"Accept-Encoding","x-ms-activity-id":"29b1ada2-8503-4fa7-becc-50bb336aa168","x-ms-client-request-id":"unspecified;b3626d7f-93bf-4271-9737-b158838c2309"},"body":"eyJUYWJsZXMiOlt7IlRhYmxlTmFtZSI6IlRhYmxlXzAiLCJDb2x1bW5zIjpbeyJDb2x1bW5OYW1lIjoiRXh0ZW50SWQiLCJEYXRhVHlwZSI6Ikd1aWQiLCJDb2x1bW5UeXBlIjoiZ3VpZCJ9LHsiQ29sdW1uTmFtZSI6Ik9yaWdpbmFsU2l6ZSIsIkRhdGFUeXBlIjoiRG91YmxlIiwiQ29sdW1uVHlwZSI6InJlYWwifSx7IkNvbHVtbk5hbWUiOiJFeHRlbnRTaXplIiwiRGF0YVR5cGUiOiJEb3VibGUiLCJDb2x1bW5UeXBlIjoicmVhbCJ9LHsiQ29sdW1uTmFtZSI6IkNvbXByZXNzZWRTaXplIiwiRGF0YVR5cGUiOiJEb3VibGUiLCJDb2x1bW5UeXBlIjoicmVhbCJ9LHsiQ29sdW1uTmFtZSI6IkluZGV4U2l6ZSIsIkRhdGFUeXBlIjoiRG91YmxlIiwiQ29sdW1uVHlwZSI6InJlYWwifSx7IkNvbHVtbk5hbWUiOiJSb3dDb3VudCIsIkRhdGFUeXBlIjoiSW50NjQiLCJDb2x1bW5UeXBlIjoibG9uZyJ9XSwiUm93cyI6W1siZDFiODY5NzktNDg4YS00MDQyLTg1MmQtNDM2NWU4NDBmYWI2IiwyMS4wLDgwMC4wLDI0Ni4wLDU1NC4wLDFdXX1dfQ=="}

Просмотреть файл

@ -1,15 +1 @@
{
"uri": "/v1/rest/mgmt",
"method": "POST",
"headers": {
"accept": "application/json",
"accept-encoding": "gzip",
"authorization": "<<STRIPPED>>",
"content-length": "71",
"content-type": "application/json; charset=utf-8",
"user-agent": "azsdk-rust-azure-kusto-data/0.1.0 (1.59.0; linux; x86_64)",
"x-ms-client-version": "Kusto.Rust.Client:0.1.0",
"x-ms-version": "2019-02-13"
},
"body": "eyJkYiI6ImN0bmEiLCJjc2wiOiIuc2hvdyB0YWJsZXMgfCB3aGVyZSBUYWJsZU5hbWUgPT0gXCJLdXN0b1JzVGVzdFwiIn0="
}
{"uri":"/v1/rest/mgmt","method":"POST","headers":{"accept":"application/json","accept-encoding":"gzip","authorization":"<<STRIPPED>>","content-length":"119","content-type":"application/json; charset=utf-8","user-agent":"azsdk-rust-azure-kusto-data/0.1.0 (1.58.1; windows; x86_64)","x-ms-client-version":"Kusto.Rust.Client:0.1.0","x-ms-version":"2019-02-13"},"body":"eyJkYiI6IkRhdGEiLCJjc2wiOiIuc2hvdyB0YWJsZXMgfCB3aGVyZSBUYWJsZU5hbWUgPT0gXCJLdXN0b1JzVGVzdFwiIiwiUHJvcGVydGllcyI6eyJQYXJhbWV0ZXJzIjpudWxsLCJPcHRpb25zIjpudWxsfX0="}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,15 +1 @@
{
"uri": "/v2/rest/query",
"method": "POST",
"headers": {
"accept": "application/json",
"accept-encoding": "gzip",
"authorization": "<<STRIPPED>>",
"content-length": "42",
"content-type": "application/json; charset=utf-8",
"user-agent": "azsdk-rust-azure-kusto-data/0.1.0 (1.59.0; linux; x86_64)",
"x-ms-client-version": "Kusto.Rust.Client:0.1.0",
"x-ms-version": "2019-02-13"
},
"body": "eyJkYiI6ImN0bmEiLCJjc2wiOiJLdXN0b1JzVGVzdCB8IHRha2UgMSJ9"
}
{"uri":"/v2/rest/query","method":"POST","headers":{"accept":"application/json","accept-encoding":"gzip","authorization":"<<STRIPPED>>","content-length":"90","content-type":"application/json; charset=utf-8","user-agent":"azsdk-rust-azure-kusto-data/0.1.0 (1.58.1; windows; x86_64)","x-ms-client-version":"Kusto.Rust.Client:0.1.0","x-ms-version":"2019-02-13"},"body":"eyJkYiI6IkRhdGEiLCJjc2wiOiJLdXN0b1JzVGVzdCB8IHRha2UgMSIsIlByb3BlcnRpZXMiOnsiUGFyYW1ldGVycyI6bnVsbCwiT3B0aW9ucyI6bnVsbH19"}

Просмотреть файл

@ -1,14 +1 @@
{
"status": 200,
"headers": {
"content-type": "application/json; charset=UTF-8",
"date": "Sun, 24 Apr 2022 11:57:17 GMT",
"server": "Microsoft-HTTPAPI/2.0",
"strict-transport-security": "max-age=15724800; includeSubDomains",
"transfer-encoding": "chunked",
"vary": "Accept-Encoding",
"x-ms-activity-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iwiSGFzRXJyb3JzIjpmYWxzZSwiQ2FuY2VsbGVkIjpmYWxzZX1d"
}
{"status":200,"headers":{"content-type":"application/json","date":"Wed, 08 Jun 2022 05:46:34 GMT","server":"Kestrel","strict-transport-security":"max-age=2592000; includeSubDomains","transfer-encoding":"chunked","vary":"Accept-Encoding","x-ms-activity-id":"dda8f0b6-958b-4613-b039-216fec5f6bd2","x-ms-client-request-id":"unspecified;4229e206-7b2b-47f1-ae75-b57e5c537ccf"},"body":"W3siRnJhbWVUeXBlIjoiRGF0YVNldEhlYWRlciIsIklzUHJvZ3Jlc3NpdmUiOmZhbHNlLCJWZXJzaW9uIjoidjIuMCJ9LHsiRnJhbWVUeXBlIjoiRGF0YVRhYmxlIiwiVGFibGVJZCI6MCwiVGFibGVLaW5kIjoiUXVlcnlQcm9wZXJ0aWVzIiwiVGFibGVOYW1lIjoiQEV4dGVuZGVkUHJvcGVydGllcyIsIkNvbHVtbnMiOlt7IkNvbHVtbk5hbWUiOiJUYWJsZUlkIiwiQ29sdW1uVHlwZSI6ImludCJ9LHsiQ29sdW1uTmFtZSI6IktleSIsIkNvbHVtblR5cGUiOiJzdHJpbmcifSx7IkNvbHVtbk5hbWUiOiJWYWx1ZSIsIkNvbHVtblR5cGUiOiJkeW5hbWljIn1dLCJSb3dzIjpbWzEsIlZpc3VhbGl6YXRpb24iLCJ7XCJWaXN1YWxpemF0aW9uXCI6bnVsbCxcIlRpdGxlXCI6bnVsbCxcIlhDb2x1bW5cIjpudWxsLFwiU2VyaWVzXCI6bnVsbCxcIllDb2x1bW5zXCI6bnVsbCxcIkFub21hbHlDb2x1bW5zXCI6bnVsbCxcIlhUaXRsZVwiOm51bGwsXCJZVGl0bGVcIjpudWxsLFwiWEF4aXNcIjpudWxsLFwiWUF4aXNcIjpudWxsLFwiTGVnZW5kXCI6bnVsbCxcIllTcGxpdFwiOm51bGwsXCJBY2N1bXVsYXRlXCI6ZmFsc2UsXCJJc1F1ZXJ5U29ydGVkXCI6ZmFs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sXCJxdWVyaWVzX3NwZWNpYWxpemVkXCI6MH19LFwiZGF0YXNldF9zdGF0aXN0aWNzXCI6W3tcInRhYmxlX3Jvd19jb3VudFwiOjEsXCJ0YWJsZV9zaXplXCI6MTN9XX0iXV19LHsiRnJhbWVUeXBlIjoiRGF0YVNldENvbXBsZXRpb24iLCJIYXNFcnJvcnMiOmZhbHNlLCJDYW5jZWxsZWQiOmZhbHNlfV0="}

Просмотреть файл

@ -1,15 +1 @@
{
"uri": "/v1/rest/mgmt",
"method": "POST",
"headers": {
"accept": "application/json",
"accept-encoding": "gzip",
"authorization": "<<STRIPPED>>",
"content-length": "82",
"content-type": "application/json; charset=utf-8",
"user-agent": "azsdk-rust-azure-kusto-data/0.1.0 (1.59.0; linux; x86_64)",
"x-ms-client-version": "Kusto.Rust.Client:0.1.0",
"x-ms-version": "2019-02-13"
},
"body": "eyJkYiI6ImN0bmEiLCJjc2wiOiIuZHJvcCB0YWJsZSBLdXN0b1JzVGVzdCB8IHdoZXJlIFRhYmxlTmFtZSA9PSBcIkt1c3RvUnNUZXN0XCIifQ=="
}
{"uri":"/v1/rest/mgmt","method":"POST","headers":{"accept":"application/json","accept-encoding":"gzip","authorization":"<<STRIPPED>>","content-length":"130","content-type":"application/json; charset=utf-8","user-agent":"azsdk-rust-azure-kusto-data/0.1.0 (1.58.1; windows; x86_64)","x-ms-client-version":"Kusto.Rust.Client:0.1.0","x-ms-version":"2019-02-13"},"body":"eyJkYiI6IkRhdGEiLCJjc2wiOiIuZHJvcCB0YWJsZSBLdXN0b1JzVGVzdCB8IHdoZXJlIFRhYmxlTmFtZSA9PSBcIkt1c3RvUnNUZXN0XCIiLCJQcm9wZXJ0aWVzIjp7IlBhcmFtZXRlcnMiOm51bGwsIk9wdGlvbnMiOm51bGx9fQ=="}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1 +1 @@
ctna
Data