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
47
48
49
50
51
52
//! Data access helpers and Supabase clients.
//!
//! Provides functions to construct preconfigured `SupabaseClient` instances for
//! Athena and Suitsbooks projects, loaded from environment variables.
use serde::{Deserialize, Serialize};
use serde_json::Value;
pub mod admission_events;
pub mod api_keys;
pub mod api_registry;
pub mod athena_router;
pub mod calculate;
pub mod client_configs;
pub mod client_connections;
pub mod clients;
pub mod cluster;
pub mod events;
pub mod public_routes;
pub mod query_optimization;
pub mod vacuum_health;
pub mod parse {
pub mod strip_nulls;
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DataTimeseries {
pub data: Vec<Value>,
pub interval: String,
pub date_key: String,
}
impl DataTimeseries {
/// Creates a new DataTimeseries instance
///
/// # Arguments
///
/// * `data` - The data to be stored in the DataTimeseries instance
/// * `interval` - The interval of the data
/// * `date_key` - The date key of the data
///
/// # Returns
///
/// A new DataTimeseries instance
///
pub fn new(data: Vec<Value>, interval: String, date_key: String) -> Self {
DataTimeseries {
data,
interval,
date_key,
}
}
}