fixed ordering of all things sql

This commit is contained in:
2026-05-14 05:58:38 -04:00
parent ce9c9baac9
commit 2a8b991269
12 changed files with 2334 additions and 1799 deletions

View File

@ -1,3 +1,4 @@
use indexmap::IndexSet;
use crate::database::schema::Schema;
impl Schema {
@ -65,10 +66,10 @@ impl Schema {
}
}
} else if let Some(one_of) = &self.obj.one_of {
let mut type_vals = std::collections::HashSet::new();
let mut kind_vals = std::collections::HashSet::new();
let mut type_vals = IndexSet::new();
let mut kind_vals = IndexSet::new();
let mut disjoint_base = true;
let mut structural_types = std::collections::HashSet::new();
let mut structural_types = IndexSet::new();
for c in one_of {
let mut child_id = String::new();

View File

@ -1,4 +1,5 @@
use crate::database::schema::Schema;
use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
@ -10,5 +11,5 @@ pub struct Enum {
pub source: String,
pub values: Vec<String>,
#[serde(default)]
pub schemas: std::collections::BTreeMap<String, Arc<Schema>>,
pub schemas: IndexMap<String, Arc<Schema>>,
}

View File

@ -1,5 +1,6 @@
use crate::database::page::Page;
use crate::database::schema::Schema;
use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
@ -18,5 +19,5 @@ pub struct Punc {
pub save: Option<String>,
pub page: Option<Page>,
#[serde(default)]
pub schemas: std::collections::BTreeMap<String, Arc<Schema>>,
pub schemas: IndexMap<String, Arc<Schema>>,
}

View File

@ -1,4 +1,4 @@
use std::collections::HashSet;
use indexmap::{IndexMap, IndexSet};
use crate::database::schema::Schema;
use serde::{Deserialize, Serialize};
@ -25,7 +25,7 @@ pub struct Type {
#[serde(default)]
pub hierarchy: Vec<String>,
#[serde(default)]
pub variations: HashSet<String>,
pub variations: IndexSet<String>,
#[serde(default)]
pub relationship: bool,
#[serde(default)]
@ -39,5 +39,5 @@ pub struct Type {
pub default_fields: Vec<String>,
pub field_types: Option<Value>,
#[serde(default)]
pub schemas: std::collections::BTreeMap<String, Arc<Schema>>,
pub schemas: IndexMap<String, Arc<Schema>>,
}