Skip to main content

Crate parse_rust_schema

Crate parse_rust_schema 

Source
Expand description

Field types, inference, validation, and the _SCHEMA storage format.

Parse’s schema is implicit: the first write that mentions a field decides its type, and every later write is checked against that decision. This crate owns that machinery. It performs no I/O; loading and persisting a schema belongs to the storage adapter.

storage_format is the highest-risk module in the crate, because _SCHEMA is shared with any parse-server reading the same database and both of its failure modes are silent.

Re-exports§

pub use clp_validate::validate_clp;
pub use clp_validate::ClpValidation;
pub use clp_validate::ObjectIdForm;
pub use clp_validate::Unenforceable;
pub use controller::apply;
pub use controller::default_schema;
pub use controller::validate_required_columns;
pub use controller::validate_write;
pub use controller::validate_write_fields;
pub use controller::SchemaDelta;
pub use infer::class_name_is_valid;
pub use infer::field_name_is_valid;
pub use infer::infer_op_type;
pub use infer::infer_type;
pub use infer::SYSTEM_CLASSES;
pub use infer::VOLATILE_CLASSES;
pub use schema_api::check_default_value_type;
pub use schema_api::plan_update;
pub use schema_api::validate_new_class;
pub use schema_api::FieldChange;
pub use schema_api::SchemaMutation;
pub use schema_api::SetField;

Modules§

clp_validate
Validating a class-level-permissions block, with upstream’s exact messages.
controller
Enforcing a schema against a write, and growing it implicitly.
infer
Type inference, name validation, and default columns.
schema_api
Validation for POST /schemas/:className and PUT /schemas/:className.
storage_format
The _SCHEMA document format.

Structs§

ClassSchema
The shape of one class: what a transform needs to lower or raise a document.

Enums§

FieldType
A Parse field type.