书栈网 · BookStack 本次搜索耗时 0.034 秒,为您找到 464 个相关结果.
  • Dialect-Specific Things

    Dialect-Specific Things Underlying Connector Libraries MySQL MariaDB SQLite PostgreSQL MSSQL MSSQL Domain Account Data type: TIMESTAMP WITHOUT TIME ZONE - PostgreSQL only D...
  • TypeScript

    TypeScript 安装 使用 使用非严格类型 使用 sequelize.define TypeScript 从 v5 开始,Sequelize 提供了自己的 TypeScript 定义. 请注意,仅支持 TS >= 3.1. 由于 Sequelize 严重依赖于运行时属性分配,因此 TypeScript 在开箱即用时不会很有用. 为...
  • Model Querying - Basics

    Model Querying - Basics Simple INSERT queries Simple SELECT queries Specifying attributes for SELECT queries Applying WHERE clauses The basics Operators Shorthand syntax for Op...
  • Isolation levels

    Isolation levels Isolation levels The possible isolations levels to use when starting a transaction: Sequelize . Transaction . ISOLATION_LEVELS . READ_UNCOMMITTED // "READ UN...
  • 建立连接

    建立连接 注意: 设置 SQLite 注意: 连接池 (生产环境) 建立连接 要连接到数据库,你必须创建 Sequelize 实例. 这可以通过将连接参数分别传递给 Sequelize 构造函数或传递单个连接 URI 来完成: const Sequelize = require ( 'sequelize' ); //方法1:单...
  • Raw Queries

    Raw Queries “Dotted” attributes and the nest option Replacements Bind Parameter Raw Queries As there are often use cases in which it is just easier to execute raw / already...
  • Constraints & Circularities - 约束 & 循环

    Constraints & Circularities - 约束 & 循环 不受限制地强制执行外键引用 Constraints & Circularities - 约束 & 循环 在表之间添加约束意味着使用 sequelize.sync 时必须在数据库中以一定顺序创建表. 如果 Task 具有对 User 的引用,则必须先创建 User ...
  • 第七章 数据库迁移 Migrate

    1024 2020-01-12 《Sequelize ORM 实践》
    Migrate 初始化 查看如何创建一个模型 定义一下关系 解决无法关联的问题 再次修改并,保存一下联系 seeder 填充 Migrate 首先安装以下工具 (工具不提供 ts 支持) npm install - g sequelize - cli mkdir models && cd models npm init...
  • Working with legacy tables

    Working with legacy tables Tables Fields Primary keys Foreign keys Working with legacy tables While out of the box Sequelize will seem a bit opinionated it's trivial to bot...
  • Working with legacy tables

    Tables Fields Primary keys Foreign keys While out of the box Sequelize will seem a bit opinionated it's trivial to both legacy and forward proof your application by defining ...