书栈网 · BookStack 本次搜索耗时 0.023 秒,为您找到 593 个相关结果.
  • 连接数据库

    1513 2018-03-01 《一起学 Node.js》
    4.6.1 为什么使用 Mongolass node-mongodb-native: Mongoose: Mongolass 扩展阅读 我们使用 Mongolass 这个模块操作 mongodb 进行增删改查。在 myblog 下新建 lib 目录,在该目录下新建 mongo.js,添加如下代码: lib/mongo.js const ...
  • Getters and Setters

    Getters/Setters in Mongoose Getters Setters Differences vs ES6 Getters/Setters Getters/Setters in Mongoose Mongoose getters and setters allow you to execute custom logic when...
  • Promises

    Built-in Promises Queries are not promises Queries are thenable Should You Use exec() With await ? Plugging in your own Promises Library Built-in Promises Mongoose async o...
  • population

    Population Saving refs Population Field selection Populating multiple paths Query conditions and other options Refs to children Updating refs Populating an existing document...
  • quick start

    Getting Started Congratulations Getting Started First be sure you have MongoDB and Node.js installed. Next install Mongoose from the command line using npm : $ npm install...
  • sub docs

    Sub Docs Finding a sub-document Adding sub-docs to arrays Removing subdocs Alternate declaration syntax for arrays Next Up Sub Docs Subdocuments are documents embedded in ...
  • 模型(MongoDB)

    模型(MongoDB) 配置 创建模型 CURD 操作 其他 initDb() model() thinkRequire(‘mongoose’) 模型(MongoDB) ThinkJS 从 1.1.0 版本开始支持 MongoDB ,底层依赖了 mongoose 模块,所以使用 MongoDB 时候需要在项目下安装 mongoose...
  • Quick Start

    Getting Started Congratulations Getting Started First be sure you have MongoDB and Node.js installed. Next install Mongoose from the command line using npm : $ npm install...
  • Models

    Models Compiling your first model Constructing Documents Querying Deleting Updating Change Streams Yet more Next Up Models Models are fancy constructors compiled from ...
  • Queries

    Queries Executing Queries are Not Promises References to other documents Streaming Versus Aggregation Next Up Queries Mongoose models provide several static helper funct...