Skip to content

Repository files navigation

pgorm

A fork of SeaORM focused entirely on Postgres support.

Primary differences with SeaORM

  • Supports ONLY Postgres
  • Uses deadpool for the database pool
  • Uses tokio-postgres for the Postgres engine (i.e. no sqlx functionality)
  • More effective use of statements (you pass the arguments with the statement so it is prepared properly)
  • All Postgres-specific functionality is expected to be present
  • Significant performance and stability gains
  • Invalid SQL is a compile error where the type system can make it one: the query and DDL builders refuse to construct statements PostgreSQL would reject, and the render paths do not panic
  • Every rendered statement in the test suite is validated against the real PostgreSQL grammar via libpg_query; the same parser backs the optional sql! macro (compile-time checking of raw SQL) and query fingerprinting in the metrics layer
  • Pared-back migrations: pgorm-migration is a minimal up-only runner with no down migrations or rollback
  • Scoped transactions
  • Opt-in metrics layer in pgorm::metric — wrap a pool to instrument it, pay nothing if you don't (see METRICS.md)
  • set(...) and From<...> for ActiveValue fields: name: set("Apple") and name: "Apple".into() both reach an ActiveValue<String>, so a column value needs no .to_owned()
  • pgorm-query (fork of sea-query) is in-tree and all non-Postgres functionality is removed
  • Failsafe behaviour for insert_many on an empty iterator

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages