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

@ -1,6 +1,6 @@
use crate::database::Database;
use crate::drop::{Drop, Error, ErrorDetails};
use std::collections::HashMap;
use indexmap::IndexMap;
use std::sync::Arc;
pub mod compiler;
@ -33,7 +33,7 @@ impl Queryer {
Err(msg) => {
return Drop::with_errors(vec![Error {
code: "FILTER_PARSE_FAILED".to_string(),
values: Some(HashMap::from([
values: Some(IndexMap::from([
("error".to_string(), msg.clone()),
])),
details: ErrorDetails {
@ -140,7 +140,7 @@ impl Queryer {
}
Err(e) => Err(Drop::with_errors(vec![Error {
code: "QUERY_COMPILATION_FAILED".to_string(),
values: Some(HashMap::from([
values: Some(IndexMap::from([
("error".to_string(), e.clone()),
])),
details: ErrorDetails {
@ -169,7 +169,7 @@ impl Queryer {
}
Ok(other) => Drop::with_errors(vec![Error {
code: "QUERY_FAILED".to_string(),
values: Some(HashMap::from([
values: Some(IndexMap::from([
("error".to_string(), format!("Expected array from generic query, got: {:?}", other)),
])),
details: ErrorDetails {
@ -181,7 +181,7 @@ impl Queryer {
}]),
Err(e) => Drop::with_errors(vec![Error {
code: "QUERY_FAILED".to_string(),
values: Some(HashMap::from([
values: Some(IndexMap::from([
("error".to_string(), e.to_string()),
])),
details: ErrorDetails {