awesome-repositories.com
Blog
MCP
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
bookshelf avatar

bookshelf/bookshelf

0
View on GitHub↗
6,352 Stars·575 Forks·JavaScript·MIT·3 Aufrufebookshelfjs.org↗

Bookshelf

Bookshelf is a JavaScript ORM for Node.js that provides a structured way to define and interact with database models. It centers on a model-driven approach where developers register models, define their relations, and manage data persistence through a consistent interface.

The library distinguishes itself through its comprehensive handling of model relationships and data transformations. It supports defining one-to-one, one-to-many, many-to-many, and polymorphic associations, with the ability to eager load related models in a single query to avoid performance pitfalls. Bookshelf also automates common data tasks such as converting between snake_case database columns and camelCase model properties, generating UUIDs for new records, parsing and stringifying JSON columns, and applying custom value transformations on assignment.

For data lifecycle management, Bookshelf offers soft deletion to preserve records for recovery, cascade deletion of related models, row-level locking during transactional fetches, and event hooks that fire on create, update, and delete operations. It wraps multiple database operations in transactions that commit or roll back as a single unit, and includes a plugin system for extending functionality. Debug logging of SQL statements is available for development, and password hashing with bcrypt can be integrated directly into model lifecycle hooks.

Features

  • Database Transactions - Wraps multiple queries in a transaction that commits on success or rolls back on failure.
  • Model Registries - Registers models by name so they can be referenced as strings in relations and retrieved later.
  • Eager Loading - Fetches related models in a single query to prevent N+1 query problems.
  • Polymorphic Relations - Defines one-to-one, one-to-many, many-to-many, and polymorphic database associations.
  • Case-Conversion Mappings - Automatically translates between snake_case database columns and camelCase model properties.
  • Data Format Transformations - Parses and formats attribute values when reading from or writing to the database for data normalization.
  • Cascade Deletions - Automatically removes associated records when a parent model is destroyed.
  • Property Value Transformers - Applies custom processor functions to transform values whenever assigned to a model property.
  • Soft Deletion - Marks records as deleted instead of removing them permanently, preserving data for recovery or auditing.
  • Database Column Serialization - Handles serialization and deserialization of JSON data stored in database columns without manual hooks.
  • Bcrypt Implementations - Integrates bcrypt password hashing directly into model lifecycle hooks for secure credential storage.
  • Computed Properties - Defines computed properties on models that behave like regular attributes without database persistence.
  • Plugin Loaders - Ships a plugin system that loads third-party or custom extensions by name, function, or array.
  • Direct Database Debugging - Logs all SQL statements executed by the ORM when debug mode is enabled.
  • Model - Automatically assigns a unique identifier to each model instance on creation.
  • Model Lifecycle Hooks - Hooks into lifecycle events on models to execute custom logic when records are created, updated, or deleted.
  • Datenbanken - Backbone.js-style ORM for SQL databases.
  • Object Relational Mappers - ORM for PostgreSQL, MySQL, and SQLite.

Star-Verlauf

Star-Verlauf für bookshelf/bookshelfStar-Verlauf für bookshelf/bookshelf

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Häufig gestellte Fragen

Was macht bookshelf/bookshelf?

Bookshelf is a JavaScript ORM for Node.js that provides a structured way to define and interact with database models. It centers on a model-driven approach where developers register models, define their relations, and manage data persistence through a consistent interface.

Was sind die Hauptfunktionen von bookshelf/bookshelf?

Die Hauptfunktionen von bookshelf/bookshelf sind: Database Transactions, Model Registries, Eager Loading, Polymorphic Relations, Case-Conversion Mappings, Data Format Transformations, Cascade Deletions, Property Value Transformers.

Welche Open-Source-Alternativen gibt es zu bookshelf/bookshelf?

Open-Source-Alternativen zu bookshelf/bookshelf sind unter anderem: vincit/objection.js — Objection.js is an object-relational mapper for Node.js that maps SQL database tables to classes and rows to model… go-pg/pg — pg is a PostgreSQL object-relational mapper (ORM) for Go that maps Go structs to database tables and provides a fluent… sequelize/sequelize — Sequelize is an object-relational mapping library that provides a unified interface for managing relational data… dotnet/efcore — Entity Framework Core is an object-relational mapper that enables developers to interact with database systems using… typeorm/typeorm — TypeORM is an object-relational mapper for TypeScript and JavaScript that bridges the gap between object-oriented… jeremyevans/sequel — Sequel is a relational database toolkit for Ruby that provides object-relational mapping, a fluent SQL query builder,…

Open-Source-Alternativen zu Bookshelf

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Bookshelf.
  • vincit/objection.jsAvatar von Vincit

    Vincit/objection.js

    7,343Auf GitHub ansehen↗

    Objection.js is an object-relational mapper for Node.js that maps SQL database tables to classes and rows to model instances. It functions as a high-level abstraction layer built on top of the Knex.js query builder to provide structured model definitions and relational data mapping. The project distinguishes itself through its ability to manage complex object graphs, allowing for the persistence and eager-loading of deeply nested related data in single operations. It incorporates a data integrity layer that uses JSON schema validation to verify model instances before they are persisted to the

    JavaScript
    Auf GitHub ansehen↗7,343
  • go-pg/pgAvatar von go-pg

    go-pg/pg

    5,785Auf GitHub ansehen↗

    pg is a PostgreSQL object-relational mapper (ORM) for Go that maps Go structs to database tables and provides a fluent query builder for constructing SQL statements programmatically. At its core, it automatically generates CREATE TABLE statements from Go struct definitions using struct tags and naming conventions, and builds queries through method chaining with placeholder-based parameter binding to prevent SQL injection. The library distinguishes itself through relation-aware join generation that automatically constructs JOIN clauses for has-one, has-many, many-to-many, and polymorphic assoc

    Go
    Auf GitHub ansehen↗5,785
  • sequelize/sequelizeAvatar von sequelize

    sequelize/sequelize

    30,349Auf GitHub ansehen↗

    Sequelize is an object-relational mapping library that provides a unified interface for managing relational data through code. By implementing the Active Record pattern, it maps database tables to application objects, allowing developers to perform standard create, read, update, and delete operations using high-level method calls. The library abstracts complex database interactions by translating these calls into optimized, engine-specific SQL statements, ensuring consistent behavior across different database systems. The project distinguishes itself through a comprehensive suite of tools for

    TypeScriptdb2-ibm-ifeature-richjavascript
    Auf GitHub ansehen↗30,349
  • dotnet/efcoreAvatar von dotnet

    dotnet/efcore

    14,587Auf GitHub ansehen↗

    Entity Framework Core is an object-relational mapper that enables developers to interact with database systems using strongly-typed code. It serves as a comprehensive data access framework, providing a unified interface for mapping application objects to relational and non-relational database schemas while managing the lifecycle of data operations through a central context. The project distinguishes itself through a provider-based architecture that decouples core data access logic from specific database engines, allowing for consistent interaction across diverse storage systems. It features a

    C#aspnet-productc-sharpdatabase
    Auf GitHub ansehen↗14,587
  • Alle 30 Alternativen zu Bookshelf anzeigen→