| Crates.io | prax-schema |
| lib.rs | prax-schema |
| version | 0.5.0 |
| created_at | 2025-12-20 23:11:44.173484+00 |
| updated_at | 2026-01-07 18:32:27.254379+00 |
| description | Schema parser and AST for the Prax ORM |
| homepage | |
| repository | https://github.com/pegasusheavy/prax-orm |
| max_upload_size | |
| id | 1997082 |
| size | 642,911 |
Schema definition language parser for Prax ORM.
prax-schema provides a Prisma-like schema language parser for defining database models, relations, enums, and views.
.prax schema files with intuitive syntaxmodel User {
id Int @id @auto
email String @unique
name String?
posts Post[]
createdAt DateTime @default(now())
}
model Post {
id Int @id @auto
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
authorId Int
}
use prax_schema::parse_schema;
let schema = parse_schema(r#"
model User {
id Int @id @auto
email String @unique
}
"#)?;
for model in &schema.models {
println!("Model: {}", model.name);
}
Licensed under either of Apache License, Version 2.0 or MIT license at your option.