书栈网 · BookStack 本次搜索耗时 0.023 秒,为您找到 200 个相关结果.
  • 扩展

    扩展 扩展 这几个扩展可以简化 TypeORM 的使用,并将其与其他模块集成: TypeORM + GraphQL framework TypeORM integration with TypeDI TypeORM integration with routing-controllers 从现有数据库生成模型 - typeorm-mod...
  • 监听器

    监听器 @AfterLoad @BeforeInsert @AfterInsert @BeforeUpdate @AfterUpdate @BeforeRemove @AfterRemove 监听器 任何实体都可以使用具有侦听特定实体事件的自定义逻辑的方法。你必须使用特殊装饰器标记这些方法,具体取决于要侦听的事件。 ...
  • View Entities

    View Entities What is View Entity? View Entity columns Complete example View Entities What is View Entity? View Entity columns Complete example What is View Entity? V...
  • 订阅者和监听者装饰器

    订阅者和监听者装饰器 @AfterLoad @BeforeInsert @AfterInsert @BeforeUpdate @AfterUpdate @BeforeRemove @AfterRemove @EventSubscriber 订阅者和监听者装饰器 @AfterLoad 你可以在实体中定义具有任何名称...
  • Example with Express

    Example using TypeORM with Express Initial setup Adding Express to the application Adding TypeORM to the application Example using TypeORM with Express Initial setup Addin...
  • 运行和还原迁移

    运行和还原迁移 运行和还原迁移 迁移到生产后,可以使用 CLI 命令运行它们: typeorm migration : run typeorm migration:create 和typeorm migration:generate 将创建.ts 文件。 migration:run 和migration:revert 命令仅适用于.js 文件...
  • Usage with JavaScript

    Using with JavaScript app.js entity/Category.js entity/Post.js Using with JavaScript TypeORM can be used not only with TypeScript, but also with JavaScript.Everything is the...
  • Embedded Entities

    Embedded Entities Embedded Entities There is an amazing way to reduce duplication in your app (using composition over inheritance) by using embedded columns .Embedded column is...
  • 数据库连接

    数据库连接 什么是Connection 创建新的连接 使用ConnectionManager 使用连接 数据库连接 什么是Connection 只有在建立连接后才能与数据库进行交互。 TypeORM 的Connection 不会像看起来那样设置单个数据库连接,而是设置连接池。 如果你对数据库连接感兴趣,请参阅QueryRunner ...
  • 快速开始

    快速开始 快速开始 开始使用 TypeORM 的最快方法是使用其 CLI 命令生成启动项目。只有在 NodeJS 应用程序中使用 TypeORM 时,此操作才有效。如果你使用的是其他平台,请继续执行分步指南 。 首先全局安装 TypeORM: npm install typeorm - g 然后转到要创建新项目的目录并运行命令: typ...