p2panda_rs/schema/system/
mod.rs1use once_cell::sync::Lazy;
8
9use crate::schema::Schema;
10
11mod blob;
12mod blob_piece;
13mod error;
14mod schema_definition;
15mod schema_field_definition;
16mod schema_views;
17
18pub use error::SystemSchemaError;
19pub use schema_views::{SchemaFieldView, SchemaView};
20
21pub(super) use blob::get_blob;
22pub(super) use blob_piece::get_blob_piece;
23pub(super) use schema_definition::get_schema_definition;
24pub(super) use schema_field_definition::get_schema_field_definition;
25
26pub static SYSTEM_SCHEMAS: Lazy<Vec<&'static Schema>> = Lazy::new(|| {
28 vec![
30 get_schema_definition(1).unwrap(),
31 get_schema_field_definition(1).unwrap(),
32 get_blob(1).unwrap(),
33 get_blob_piece(1).unwrap(),
34 ]
35});
36
37#[cfg(test)]
38mod test {
39 use super::SYSTEM_SCHEMAS;
40
41 #[test]
42 fn test_static_system_schemas() {
43 assert_eq!(SYSTEM_SCHEMAS.len(), 4);
44 }
45}