fixing ordering checkpoint

This commit is contained in:
2026-05-14 03:21:12 -04:00
parent 3d918a1acc
commit 3034406706
14 changed files with 89 additions and 85 deletions

View File

@ -1,12 +1,12 @@
use crate::database::object::{SchemaObject, SchemaTypeOrArray};
use crate::database::schema::Schema;
use crate::database::r#enum::Enum;
use std::collections::BTreeMap;
use indexmap::IndexMap;
use std::sync::Arc;
impl Enum {
pub fn compile_condition(&self) -> Schema {
let mut props = BTreeMap::new();
let mut props = IndexMap::new();
let enum_name = &self.name;
let mut eq_obj = SchemaObject::default();

View File

@ -1,4 +1,5 @@
use crate::database::schema::Schema;
use indexmap::IndexMap;
impl Schema {
/// Dynamically infers and compiles all structural database relationships between this Schema
@ -10,10 +11,10 @@ impl Schema {
db: &crate::database::Database,
root_id: &str,
path: &str,
props: &std::collections::BTreeMap<String, std::sync::Arc<Schema>>,
props: &IndexMap<String, std::sync::Arc<Schema>>,
errors: &mut Vec<crate::drop::Error>,
) -> std::collections::BTreeMap<String, crate::database::edge::Edge> {
let mut schema_edges = std::collections::BTreeMap::new();
) -> IndexMap<String, crate::database::edge::Edge> {
let mut schema_edges = IndexMap::new();
// Determine the physical Database Table Name this schema structurally represents
// Plucks the polymorphic discriminator via dot-notation (e.g. extracting "person" from "full.person")

View File

@ -1,7 +1,7 @@
use crate::database::Database;
use crate::database::object::{SchemaObject, SchemaTypeOrArray};
use crate::database::schema::Schema;
use std::collections::BTreeMap;
use indexmap::IndexMap;
use std::sync::Arc;
impl Schema {
@ -12,7 +12,7 @@ impl Schema {
_errors: &mut Vec<crate::drop::Error>,
) -> Option<Schema> {
if let Some(props) = self.obj.compiled_properties.get() {
let mut filter_props = BTreeMap::new();
let mut filter_props = IndexMap::new();
for (key, child) in props {
let mut structural_filter = None;

View File

@ -5,6 +5,7 @@ pub mod filter;
pub mod polymorphism;
use crate::database::schema::Schema;
use indexmap::IndexMap;
impl Schema {
pub fn compile(
@ -48,7 +49,7 @@ impl Schema {
}
}
let mut props = std::collections::BTreeMap::new();
let mut props = IndexMap::new();
// 1. Resolve INHERITANCE dependencies first
if let Some(crate::database::object::SchemaTypeOrArray::Single(t)) = &self.obj.type_ {
@ -124,8 +125,7 @@ impl Schema {
// 4. Set the OnceLock!
let _ = self.obj.compiled_properties.set(props.clone());
let mut names: Vec<String> = props.keys().cloned().collect();
names.sort();
let names: Vec<String> = props.keys().cloned().collect();
let _ = self.obj.compiled_property_names.set(names);
// 5. Compute Edges natively

View File

@ -8,7 +8,7 @@ impl Schema {
path: &str,
errors: &mut Vec<crate::drop::Error>,
) {
let mut options = std::collections::BTreeMap::new();
let mut options = indexmap::IndexMap::new();
let strategy: &str;
if let Some(family) = &self.obj.family {