API Reference

Model Class

Description

This module is used to manage all models used in Hexo.

Constructor

Model

(db)

This module is used to manage all models used in Hexo.

Parameters

  • db Warehouse

Methods

register

(name, [schema], [method])

Register a model.

Parameters

  • name String

    Model name. The model name should be written in CamelCase.

  • schema Schema optional

    Model schema.

  • method Object optional

save

(dest, callback)

Save database.

Parameters

Properties

Schema

static