XSD schema definitions for describing database structures.
This library provides an XML Schema Definition (XSD) file that establishes a common vocabulary for database-as-code tooling:
schema.xsd — defines a complete database structure (tables, columns, keys, relations, views, functions, procedures, enums, and vendor-specific SQL)Supported databases: H2, PostgreSQL, SQLite, SQL Server.
The library is available as both a Maven artifact (XSDs bundled as JAR resources) and a Rust crate (XSD content embedded as compile-time string constants).
Gradle:
implementation("com.stano:schema-xsd:1.0.0")
Maven:
<dependency>
<groupId>com.stano</groupId>
<artifactId>schema-xsd</artifactId>
<version>1.0.0</version>
</dependency>
Access the XSD files from the JAR classpath:
InputStream schema = getClass().getResourceAsStream("/schema.xsd");
Cargo.toml:
[dependencies]
schema-xsd = "1.0.0"
Usage:
use schema_xsd::SCHEMA_XSD;
// Constant is &'static str containing the full XSD content
println!("{}", SCHEMA_XSD);
schema.xsdDefines a <database> root element containing:
Licensed under either of MIT or Apache 2.0 at your option.