added limit 1 to arrays treated as a single value in schemas
This commit is contained in:
@ -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(¬ify_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 {
|
||||
|
||||
Reference in New Issue
Block a user