diff --git a/src/sql.rs b/src/sql.rs index a862ab5..682e06b 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -58,15 +58,22 @@ struct SqlResponse { #[derive(Debug, Serialize, Deserialize)] struct FreshnessState { - pub last_considered_xact_id: String, - pub last_processed_xact_id: String, + #[serde(default)] + pub last_considered_xact_id: Option, + #[serde(default)] + pub last_processed_xact_id: Option, } #[derive(Debug, Serialize, Deserialize)] struct RealtimeState { - pub actual_xact_id: String, - pub minimum_xact_id: String, - pub read_bytes: u64, + #[serde(default)] + pub actual_xact_id: Option, + #[serde(default)] + pub minimum_xact_id: Option, + #[serde(default)] + pub read_bytes: Option, + #[serde(default)] + pub timeout_ms: Option, #[serde(rename = "type")] pub state_type: String, }