logologo
Get Started
Guide
Development
Plugins
API
English
简体中文
Get Started
Guide
Development
Plugins
API
English
简体中文
logologo
API Overview

@nocobase/auth

AuthManager
Auth
BaseAuth

@nocobase/cli

NocoBase CLI
Global Environment Variables

@nocobase/client

Application
Plugin

@nocobase/database

Collection
Field

interfaces

BaseInterface
Filter Operators

RelationRepository

BelongsToManyRepository
belongs-to-repository
HasManyRepository
HasOneRepository
Repository

shared

create-options
destroy-options
find-one
find-options
transaction
update-options

@nocobase/flow-engine

DataSourceManager
FlowContext
FlowEngine
FlowModel
FlowResource

@nocobase/server

AppCommand
Application
AuditManager
Context
Migration
Plugin

@nocobase/sdk

Auth
Storage
Next PageAPI Overview

#IRepository

The Repository interface defines a series of model operation methods for adapting the CRUD operations of the data source.

#API

#find()

Returns a list of models that match the query parameters.

#Signature

  • find(options?: any): Promise<IModel[]>

#findOne()

Returns a model that matches the query parameters. If there are multiple matching models, only the first one is returned.

#Signature

  • findOne(options?: any): Promise<IModel>

#count()

Returns the number of models that match the query parameters.

#Signature

  • count(options?: any): Promise<Number>

#findAndCount()

Returns the list and count of models that match the query parameters.

#Signature

  • findAndCount(options?: any): Promise<[IModel[], Number]>

#create()

Creates a model data object.

#Signature

  • create(options: any): void

#update()

Updates a model data object based on the query conditions.

#Signature

  • update(options: any): void

#destroy()

Deletes a model data object based on the query conditions.

#Signature

  • destroy(options: any): void