use-sql-constraint 0.1.0

SQL constraint kind, name, and schema metadata primitives for RustUse
Documentation
  • Coverage
  • 54.55%
    12 out of 22 items documented1 out of 12 items with examples
  • Size
  • Source code size: 8.86 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 597.71 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-sql
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-sql-constraint

SQL constraint kind, name, and schema metadata primitives for RustUse.

Experimental

use-sql-constraint is experimental while use-sql remains below 0.3.0.

Example

use use_sql_constraint::{SqlConstraint, SqlConstraintKind};

let constraint = SqlConstraint::new(SqlConstraintKind::PrimaryKey);

assert_eq!(constraint.kind(), SqlConstraintKind::PrimaryKey);
assert_eq!(constraint.to_string(), "PRIMARY KEY");

Scope

  • Primary key, foreign key, unique, not null, check, default, and generated labels.
  • Optional constraint names.
  • Schema metadata containers.

Non-goals

  • Migration engines.
  • DDL generation frameworks.
  • Database introspection.

License

Licensed under either Apache-2.0 or MIT.