Basic usage基本使用 To get the ball rollin' you first have to create an instance of Sequelize. Use it the following way: 使用Sequelize的您必须首先创建一个实例.以下方式使用它: const sequelize = new Sequelize('database', 'username', 'password', { dialect: 'mysql' }); This will
Querying查询 Attributes To select only some attributes, you can use the attributes option. Most often, you pass an array: 为了收集一些属性,可以使用attributes选项: Model.findAll({ attributes: ['foo', 'bar'] }); //等价于 SELECT foo, bar ... Attributes can be renamed usin