added limit 1 to arrays treated as a single value in schemas

This commit is contained in:
2026-07-16 13:43:08 -04:00
parent 1fedf5253c
commit c4bf6bde58
47 changed files with 616 additions and 586 deletions

View File

@ -7,7 +7,7 @@ use crate::database::Database;
use crate::database::r#type::Type;
use crate::drop::{Drop, Error, ErrorDetails};
use serde_json::Value;
use std::collections::HashMap;
use indexmap::IndexMap;
use std::sync::Arc;
pub struct Merger {
@ -31,7 +31,7 @@ impl Merger {
None => {
return Drop::with_errors(vec![Error {
code: "SCHEMA_NOT_FOUND".to_string(),
values: Some(HashMap::from([
values: Some(IndexMap::from([
("schema".to_string(), schema_id.to_string()),
])),
details: ErrorDetails {
@ -78,7 +78,7 @@ impl Merger {
return Drop::with_errors(vec![Error {
code: final_code,
values: Some(HashMap::from([
values: Some(IndexMap::from([
("error".to_string(), final_message),
])),
details: ErrorDetails {
@ -96,7 +96,7 @@ impl Merger {
if let Err(e) = self.db.execute(&notify_sql, None) {
return Drop::with_errors(vec![Error {
code: "MERGE_FAILED".to_string(),
values: Some(HashMap::from([
values: Some(IndexMap::from([
("error".to_string(), e.to_string()),
])),
details: ErrorDetails {