Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

typeorm-plus

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typeorm-plus

Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB databases.


Version published
Weekly downloads
101
decreased by-45.11%
Maintainers
1
Weekly downloads
 
Created
Source




TypeORM 是一个 ORM 框架,它可以运行在 NodeJS、Browser、Cordova、PhoneGap、Ionic、React Native、Expo 和 Electron 平台上,可以与 TypeScript 和 JavaScript (ES5,ES6,ES7,ES8)一起使用。 它的目标是始终支持最新的 JavaScript 特性并提供额外的特性以帮助你开发任何使用数据库的(不管是只有几张表的小型应用还是拥有多数据库的大型企业应用)应用程序。

TypeORM+ 是一个TypeORM的第三方增强库。TypeORM+添加了一些TypeORM暂不支持的特性。目前支持的特性如下:

  • 支持软删除
  • 支持根据页码和条数分页
  • 支持唯一性冲突检测
  • 支持设定自定义筛选条件 还有更多...

入门

安装

  1. 通过 npm 安装:

    npm install typeorm-plus --save

  2. 你还需要安装 reflect-metadata:

    npm install reflect-metadata --save

    并且需要在应用程序的全局位置导入(例如在app.ts中)

    import "reflect-metadata";

  3. 你可能还需要安装 node typings(以此来使用 Node 的智能提示):

    npm install @types/node --save

  4. 安装数据库驱动:

    • MySQL 或者 MariaDB

      npm install mysql --save (也可以安装 mysql2)

    • PostgreSQL

      npm install pg --save

    • SQLite

      npm install sqlite3 --save

    • Microsoft SQL Server

      npm install mssql --save

    • sql.js

      npm install sql.js --save

    • Oracle

      npm install oracledb --save

      根据你使用的数据库,仅安装其中一个即可。 要使 Oracle 驱动程序正常工作,需要按照其站点中的安装说明进行操作。

    • MongoDB (试验性)

      npm install mongodb --save

    • NativeScript, react-nativeCordova

      查看 支持的平台

TypeScript 配置

此外,请确保你使用的 TypeScript 编译器版本是2.3或更高版本,并且已经在 tsconfig.json 中启用了以下设置:

"emitDecoratorMetadata": true,
"experimentalDecorators": true,

除此之外,你可能还需要在编译器选项的 lib 中启用 es6,或者安装 es6-shim@types

快速开始

如何快速开始上手 typeorm 请参考typeorm 文档 (https://github.com/typeorm/typeorm)

FAQs

Package last updated on 18 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc