@rosepg/rose

v0.0.12
Type-safe query builder DSL, data mapper, and mini ORM for PostgreSQL

rose

codecov

rose is a PostgreSQL query builder and row mapper for TypeScript.

To get started, please read the online documentation:

https://laurence-myers.github.io/rose/

Goals

  • Type safe interface between PostgreSQL and TypeScript (Node.js) applications.
  • Flexible query interface, that can return arbitrary objects, not restricted to a single object graph (i.e. one class).
  • Multiple layers of capabilities:
    • Generating TypeScript interfaces from your database schema.
    • Type-safe query builder.
    • ORM layer on top of the query builder. (Not yet implemented.)
  • Composable queries.
  • Reusable queries; support caching built queries and generated SQL, so application code just passes in parameters.
  • No chance for SQL injection, through the sole use of parameterised queries.

Out of scope

  • DDL statements.
    • You should construct your database outside of your consuming application, using SQL.
  • Support for other databases.
    • By focusing on PostgreSQL, we can provide more sophisticated capabilities, and we're not limited to only supporting functionality common to all databases.
npm i @rosepg/[email protected]

Metadata

  • MIT
  • Whatever
  • Laurence Dougal Myers
  • released 8/8/2020

Downloads

Maintainers