Crate kotoba_schema

Crate kotoba_schema 

Source
Expand description

§kotoba-schema

Graph Schema Definition and Validation for Kotoba プロセスネットワーク as GTS(DPO)+OpenGraph with Merkle DAG & PG view

§Overview

This crate provides comprehensive schema management for graph databases:

  • Schema definition and validation
  • Property type system with constraints
  • Schema registry and management
  • Migration and evolution support
  • JSON Schema integration

§Example

use kotoba_schema::{GraphSchema, SchemaManager};
use kotoba_storage::StorageManager;

// Create schema
let schema = GraphSchema::new(
    "my_schema".to_string(),
    "My Graph Schema".to_string(),
    "1.0.0".to_string(),
);

// Create storage and schema manager
let storage = StorageManager::default().await?;
let backend = std::sync::Arc::new(storage.backend().clone());
let mut manager = SchemaManager::new(backend);

// Register schema
manager.register_schema(schema).await?;

Re-exports§

pub use schema::*;
pub use validator::*;
pub use manager::*;
pub use registry::*;
pub use migration::*;
pub use export::*;

Modules§

export
Schema Export/Import
features
Feature flags
manager
Schema Manager
migration
Schema Migration
prelude
Prelude module for convenient imports
registry
Schema Registry
schema
Graph Schema Definition
validator
Schema Validation Engine

Constants§

VERSION
Version information

Functions§

health_check
Health check for the schema system
version
Get the current version of kotoba-schema