4 tests are failing

This commit is contained in:
filipriec
2025-06-22 22:15:08 +02:00
parent 1b1e7b7205
commit 7403b3c3f8
2 changed files with 5 additions and 2 deletions

View File

@@ -182,7 +182,7 @@ pub async fn post_table_data(
"BOOLEAN" => params.add(None::<bool>),
"TEXT" => params.add(None::<String>),
"TIMESTAMPTZ" => params.add(None::<DateTime<Utc>>),
"BIGINT" => params.add(None::<i64>),
"BIGINT" | "INTEGER" => params.add(None::<i64>),
s if s.starts_with("NUMERIC") => params.add(None::<Decimal>),
_ => return Err(Status::invalid_argument(format!("Unsupported type for null value: {}", sql_type))),
}.map_err(|e| Status::internal(format!("Failed to add null parameter for {}: {}", col, e)))?;
@@ -223,7 +223,7 @@ pub async fn post_table_data(
} else {
return Err(Status::invalid_argument(format!("Expected ISO 8601 string for column '{}'", col)));
}
} else if sql_type == "BIGINT" {
} else if sql_type == "BIGINT" || sql_type == "INTEGER" {
if let Kind::NumberValue(val) = kind {
if val.fract() != 0.0 {
return Err(Status::invalid_argument(format!("Expected integer for column '{}', but got a float", col)));