Skip to content

Commit

Permalink
default to sql type: TEXT for unknown datatypes
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcmicu committed Feb 5, 2024
1 parent 844d656 commit c857bd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> {
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")) {
Expand Down

0 comments on commit c857bd7

Please sign in to comment.