npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cedarjs/record

v2.5.0

Published

RedwoodRecord is an ORM ([Object-Relational Mapping](https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping)) built on top of Prisma. It may be extended in the future to wrap other database access packages.

Readme

RedwoodRecord

RedwoodRecord is an ORM (Object-Relational Mapping) built on top of Prisma. It may be extended in the future to wrap other database access packages.

RedwoodRecord is heavily inspired by ActiveRecord which ships with Ruby on Rails. It presents a natural interface to the underlying data in your database, without worry about the particulars of SQL syntax.

Usage

Usage documentation is available at https://cedarjs.com/docs/redwoodrecord

Package Structure

RedwoodRecord is composed of 5 classes total:

  1. Core - provides core database access for a single model, enabling CRUD actions
  2. Reflection - parses the Prisma data schema and determines what relations exist to other models
  3. RelationProxy - provides access to related models reveales by the Reflection class
  4. ValidationMixin - adds validation support, adding error messages
  5. RedwoodRecord - combines the functionality of the other four classes into the standard base class that all models should extend from

There is also an errors.js file which contains all error messages that RedwoodRecord could throw.

Tasks

RedwoodRecord depends on reading the Prisma schema file to determine relations to other tables. In order to avoid the async wait when parsing the schema with Prisma's built-in function, we have a task which parses the schema file and then saves out a JSON version to the cache .redwood directory. This task also creates an index.js file in your api/src/models directory that imports the models themselves and also adds some configuration to support relations without a circular dependency. The models are then re-exported.

This task is run with:

yarn rw record init

This task needs to be run whenever you create a new model, or change your database schema in a way that would add/remove a relation to another model.

We plan to make the task run automatically, watching for changes to your schema.prisma or models directory. But for now you'll need to run it manually!