cratestack-pg 0.4.2

CrateStack server facade — Postgres (sqlx) backend with Axum HTTP bindings, generated Rust client runtime, and the shared schema/parser/policy/SQL surface. Pick this crate via `cratestack = { package = "cratestack-pg" }` for backend services.
Documentation
datasource db {
  provider = "postgresql"
  url = env("DATABASE_URL")
}

auth Principal {
  id Int
  role String?
}

mixin AuditFields {
  createdAt DateTime @default(dbgenerated())
  updatedAt DateTime @default(dbgenerated())
}

model Article {
  @use(AuditFields)

  id Int @id
  title String
  body String
  published Boolean @default(false)
  authorId Int

  @@allow("read", auth() != null)
  @@allow("update", auth().id == authorId)
}