From 02b6cca10a85bdee62f95180a682d2f13d743a1d Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Wed, 2 Nov 2022 14:01:01 +0800 Subject: [PATCH] Add uuid codegen support --- src/build/manifest.hbs | 1 + src/v2/codegen/emitter.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/build/manifest.hbs b/src/build/manifest.hbs index 1bed5f79d..8275dacb3 100644 --- a/src/build/manifest.hbs +++ b/src/build/manifest.hbs @@ -26,6 +26,7 @@ serde_json = "1.0" serde_yaml = "0.8" tokio-util = \{ version = "0.4", features = ["codec"] } url = "2.1" +uuid = \{ version = "^1.0", features = ["serde"] } {{ if is_cli }} anyhow = "1.0" clap = \{ version = "2.33", features = ["yaml"] } diff --git a/src/v2/codegen/emitter.rs b/src/v2/codegen/emitter.rs index e55210d65..e38afc7e4 100644 --- a/src/v2/codegen/emitter.rs +++ b/src/v2/codegen/emitter.rs @@ -1201,6 +1201,7 @@ fn matching_unit_type( Some(DataTypeFormat::Int64) => Some("i64"), Some(DataTypeFormat::Float) => Some("f32"), Some(DataTypeFormat::Double) => Some("f64"), + Some(DataTypeFormat::Uuid) => Some("uuid::Uuid"), _ => match type_ { Some(DataType::Integer) => Some("i64"), Some(DataType::Number) => Some("f64"),