From c857bd78cd3dfbf90100d3a321c6cb6632b5e94a Mon Sep 17 00:00:00 2001 From: Michael Cuffaro Date: Mon, 5 Feb 2024 14:16:27 -0500 Subject: [PATCH] default to sql type: TEXT for unknown datatypes --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 1a14ad7b..6e0a8622 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2623,7 +2623,7 @@ pub fn compile_condition( /// the database type, climb the datatype tree (as required), and return the first 'SQL type' found. pub fn get_sql_type(dt_config: &SerdeMap, datatype: &String, pool: &AnyPool) -> Option { if !dt_config.contains_key(datatype) { - return None; + return Some("TEXT".to_string()); } if let Some(sql_type) = dt_config.get(datatype).and_then(|d| d.get("SQL type")) {