Sequelize v7 API Documentation

website·Indexed 40 days ago

https://sequelize.org

API reference for Sequelize v7, featuring detailed documentation for core modules, internal types, interfaces, and utility functions including @sequelize/core, @sequelize/validator.js, and @sequelize/utils.

Tokens
758.9K
Snippets
4.5K
Records
6.2K
Agent score
65%

What's inside Sequelize

  1. Overview of Sequelize ORM

    v6
    Sequelize is a promise-based Node.js ORM (Object-Relational Mapping) tool that supports multiple databases including Postgres, MySQL, MariaDB, SQLite, Microsoft SQL Server, Oracle, Amazon Redshift, and Snowflake. It supports Node v10 and above and features transaction support, relations, eager/lazy loading, and read replication.
  2. Overview of Sequelize QueryInterface

    v6
    The QueryInterface class in Sequelize serves as the abstract interface that Sequelize uses to communicate with all supported database dialects. It provides a set of methods for executing direct database queries and performing schema manipulations. Specific implementations for different databases are handled by dialect-specific subclasses such as PostgresQueryInterface, MySQLQueryInterface, MSSqlQueryInterface, SQLiteQueryInterface, Db2QueryInterface, OracleQueryInterface, and SnowflakeQueryInterface.
  3. Overview of Sequelize QueryInterface

    v4
    The QueryInterface class is the low-level interface Sequelize uses to communicate directly with supported databases. It is primarily used for schema manipulation (creating/dropping tables, adding/removing columns) and bulk data operations that bypass the Model layer.
  4. Overview of Sequelize ORM

    v7
    Sequelize is a promise-based Node.js ORM (Object-Relational Mapping) tool. It provides support for various databases including Postgres, MySQL, MariaDB, SQLite, DB2, Microsoft SQL Server, Snowflake, Oracle DB, and Db2 for IBM i. Key features include transaction support, relations, eager and lazy loading, and read replication.
  5. Overview of ModelRepository in Sequelize

    v7
    The ModelRepository<M> class is designed to house static methods currently found on the Model class, enabling a true Repository Mode for Sequelize. Unlike ModelDefinition, it is possible to have multiple different repositories for the same model, allowing users to provide their own implementations. Note that this class is currently in transition and may still have dependencies on ModelStatic as migration progresses.
  6. Overview of Sequelize Error Hierarchy

    v2
    All Sequelize custom errors inherit from BaseError (aliased as Error), which in turn inherits from the standard JavaScript Error object. These classes are exposed on the sequelize object and the sequelize constructor to facilitate easier debugging and type-checking in catch blocks.
  7. Overview of the Sequelize Model class

    v2
    In Sequelize v2, a Model represents a table in the database. Models should not be instantiated directly; instead, they are created using sequelize.define or loaded using sequelize.import.
  8. Overview of AbstractDialect class

    v7
    The AbstractDialect class is the base abstract class for all database dialects in Sequelize. It provides a standardized interface for managing database connections, generating queries, and handling dialect-specific configurations. It uses two generic type parameters: Options for dialect-specific options and TConnectionOptions for connection-specific options.
  9. Overview of Sequelize Promise class

    v2
    The Sequelize Promise class is a slightly modified version of Bluebird promises. It is compatible with other A+/thenable libraries; however, to propagate SQL events across .then() or .all() calls, you must use Sequelize promises exclusively. The primary addition over standard promises is the ability to attach listeners that trigger whenever a query is executed to capture the generated SQL.