首页 > 编程语言 >Node.js ORM ODM All In One

Node.js ORM ODM All In One

时间:2022-10-13 18:44:36浏览次数:65  
标签:Node www sequelize ORM ODM https xgqfrms com

Node.js ORM ODM All In One

Node.js

Sequelize

Sequelize is a modern TypeScript and Node.js ORM for Oracle, Postgres, MySQL, MariaDB, SQLite and SQL Server, and more.

$ npm install sequelize sqlite3
# or
$ yarn add sequelize sqlite3
import { Sequelize, Model, DataTypes } from 'sequelize';

const sequelize = new Sequelize('sqlite::memory:');
const User = sequelize.define('User', {
  username: DataTypes.STRING,
  birthday: DataTypes.DATE,
});
const jane = await User.create({
  username: 'janedoe',
  birthday: new Date(1980, 6, 20),
});

const users = await User.findAll();

https://sequelize.org/

https://github.com/sequelize/sequelize

https://www.npmjs.com/package/sequelize

TypeScript

TypeORM

https://typeorm.io/

https://github.com/typeorm/typeorm

https://www.npmjs.com/package/typeorm

ORM

ORM DadaBases

MySQL

SQLite

ODM

ODM DadaBases

MongoDB

Redis ?

refs

https://www.cnblogs.com/xgqfrms/p/12861528.html

https://www.cnblogs.com/xgqfrms/p/12009776.html

https://www.cnblogs.com/xgqfrms/p/13595464.html



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载

标签:Node,www,sequelize,ORM,ODM,https,xgqfrms,com
From: https://www.cnblogs.com/xgqfrms/p/16789241.html

相关文章