1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Hotdata API
*
* Powerful data platform API for managed databases, queries, and analytics.
*
* The version of the OpenAPI document: 1.0.0
* Contact: developers@hotdata.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// TableSortKey : One key of a table's sort order. Rows are written in this order, which keeps the values in each file within a narrow range and lets queries filtering on those columns skip files entirely. Most useful on columns you filter by ranges, such as a timestamp.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TableSortKey {
#[serde(rename = "column")]
pub column: String,
/// `asc` (the default) or `desc`. Null when the table was declared without an explicit direction for this key.
#[serde(
rename = "direction",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub direction: Option<Option<String>>,
/// Where nulls are placed: `first` or `last`. Defaults to the SQL default for the chosen direction. Null when the table was declared without an explicit placement for this key.
#[serde(
rename = "nulls",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub nulls: Option<Option<String>>,
}
impl TableSortKey {
/// One key of a table's sort order. Rows are written in this order, which keeps the values in each file within a narrow range and lets queries filtering on those columns skip files entirely. Most useful on columns you filter by ranges, such as a timestamp.
pub fn new(column: String) -> TableSortKey {
TableSortKey {
column,
direction: None,
nulls: None,
}
}
}