Skip to content

Commit

Permalink
fix parse in one more place
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith committed Nov 28, 2023
1 parent e358324 commit 6f0dc2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/example.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use chrono::{DateTime, Utc};
use duners::{client::DuneClient, parameters::Parameter, parse_utils::datetime_from_str};
use duners::{client::DuneClient, parameters::Parameter, parse_utils::datetime_from_str, parse_utils::f64_from_str};
use serde::Deserialize;

// User must declare the expected query return fields and types!
#[derive(Deserialize, Debug, PartialEq)]
struct ResultStruct {
text_field: String,
#[serde(deserialize_with = "f64_from_str")]
number_field: f64,
#[serde(deserialize_with = "datetime_from_str")]
date_field: DateTime<Utc>,
Expand Down

0 comments on commit 6f0dc2a

Please sign in to comment.