书栈网 · BookStack 本次搜索耗时 0.042 秒,为您找到 469 个相关结果.
  • Transactions

    Transactions Managed transaction (auto-callback) Throw errors to rollback Automatically pass transactions to all queries Concurrent/Partial transactions Without CLS enabled Is...
  • 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:单...
  • Creating with Associations

    Creating with Associations BelongsTo / HasMany / HasOne association BelongsTo association with an alias HasMany / BelongsToMany association Creating with Associations An ins...
  • 第七章 数据库迁移 Migrate

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

    Basic Concepts Source & Target Foreign Keys underscored option Cyclic dependencies & Disabling constraints Enforcing a foreign key reference without constraints Basic Conc...
  • SQLite

    SQLite SQLite 由于 SQLite 兼容性,你需要sqlite3@^4.0.0 . 像这样配置 Sequelize: const sequelize = new Sequelize ( 'database' , 'username' , 'password' , { // sqlite! dia...
  • Associations

    Associations One-To-One associations BelongsTo Foreign keys Target keys HasOne Difference between HasOne and BelongsTo One-To-Many associations (hasMany) Belongs-To-Many ass...
  • Transactions

    Transactions Unmanaged transactions Managed transactions Throw errors to rollback Automatically pass transactions to all queries Concurrent/Partial transactions With CLS enable...
  • Advanced Concepts

    Advanced Concepts Scopes 1:n n:m Creating with associations BelongsTo / HasMany / HasOne association BelongsTo association with an alias HasMany / BelongsToMany association ...