上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 64 下一页
摘要: Querying查询 Attributes To select only some attributes, you can use the attributes option. Most often, you pass an array: 为了收集一些属性,可以使用attributes选项: Att 阅读全文
posted @ 2018-12-05 16:26 慢行厚积 阅读(3381) 评论(0) 推荐(0) 编辑
摘要: Model usage模型使用 Data retrieval / Finders Finder methods are intended to query data from the database. They do not return plain objects but instead ret 阅读全文
posted @ 2018-12-05 16:26 慢行厚积 阅读(858) 评论(0) 推荐(0) 编辑
摘要: Model definition模型定义 To define mappings between a model and a table, use the define method.定义模型和表之间的映射,使用定义方法 即project表的模型定义为有两个字段title和description,并且 阅读全文
posted @ 2018-12-05 16:26 慢行厚积 阅读(1530) 评论(0) 推荐(0) 编辑
摘要: Hooks钩子 Hooks (also known as lifecycle events), are functions which are called before and after calls in sequelize are executed. For example, if you w 阅读全文
posted @ 2018-12-05 16:25 慢行厚积 阅读(1400) 评论(0) 推荐(0) 编辑
摘要: Scopes作用域 Scoping allows you to define commonly used queries that you can easily use later. Scopes can include all the same attributes as regular find 阅读全文
posted @ 2018-12-05 16:25 慢行厚积 阅读(615) 评论(0) 推荐(0) 编辑
摘要: Transactions事务 Sequelize supports two ways of using transactions: Sequelize支持两种使用transactions的方法 One which will automatically commit or rollback the t 阅读全文
posted @ 2018-12-05 16:25 慢行厚积 阅读(1739) 评论(0) 推荐(0) 编辑
摘要: Associations关联性 This section describes the various association types in sequelize. When calling a method such as User.hasOne(Project), we say that the 阅读全文
posted @ 2018-12-05 16:25 慢行厚积 阅读(896) 评论(0) 推荐(0) 编辑
摘要: Sequelize is a promise-based ORM for Node.js v4 and up. It supports the dialects PostgreSQL, MySQL, SQLite and MSSQL and features solid transaction su 阅读全文
posted @ 2018-12-05 16:24 慢行厚积 阅读(491) 评论(0) 推荐(0) 编辑
摘要: Working with legacy tables使用遗留表 While out of the box Sequelize will seem a bit opinionated it's trivial to both legacy and forward proof your applicat 阅读全文
posted @ 2018-12-05 16:24 慢行厚积 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Migrations迁移 Just like you use Git / SVN to manage changes in your source code, you can use migrations to keep track of changes to the database. With 阅读全文
posted @ 2018-12-05 16:24 慢行厚积 阅读(3747) 评论(0) 推荐(0) 编辑
上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 64 下一页