Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • J jz-api-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • jizhi-backend
  • jz-api-core
  • Wiki
  • Home

Home · Changes

Page history
xigua created page: home authored Jul 06, 2017 by xigua's avatar xigua
Hide whitespace changes
Inline Side-by-side
Showing with 46 additions and 0 deletions
+46 -0
  • home.md home.md +46 -0
  • No files found.
home.md
View page @ 9b1110a7
...@@ -64,5 +64,51 @@ export function getEntityById(entityType: string, id: string, fieldsToHide: stri ...@@ -64,5 +64,51 @@ export function getEntityById(entityType: string, id: string, fieldsToHide: stri
*/ */
export function getSingleEntity(entityType: string, query: any, fieldsToHide: string[], fieldsToKeep: string[], context: Context, runHook: boolean = false): object | null export function getSingleEntity(entityType: string, query: any, fieldsToHide: string[], fieldsToKeep: string[], context: Context, runHook: boolean = false): object | null
/**
* return list of entities
* @param query
* @param fields
* @param me
* @param context
*/
export function getEntityList(entityType: string, query: Query, fieldsToHide: string[], fieldsToKeep: string[], context: Context, runHook: boolean = false)
/**
* get list of entities given id array
* @param query
* @param fields
* @param me
* @param context
*/
export function getEntitiesByIds(entityType: string, ids: string[], fieldsToHide: string[], fieldsToKeep: string[], context: Context, useCache: boolean = true, runHook: boolean = false)
/**
* similar to getEntityList but returned result will contain total count from the query, good for pagination
*/
export function getEntityListWithCount(entityType: string, query: Query, fieldsToHide: string[], fieldsToKeep: string[], context: Context, runHook: boolean = false)
export function createEntity(entityType: string, obj: any, context: Context, runHook: boolean = false)
/**
* bulk create documents in given collection in batch. Note that beforeSave and afterSave batch won't be invoked in this case to avoid n+1 issues. Caller should
* handle beforeSave and afterSave logic by writing optimized code if needed.
* @param entityType
* @param objs
* @param context
*/
export function batchCreate(entityType: string, objs: object[], context: Context)
/**
* mainly used by graphql directly, not for normal usage
*/
export function updateEntity(entityType: string, query: any, context: Context, runHook: boolean = false)
export function update(entityType: string, findQuery: object, uQuery: object, context: Context, isMulti: boolean = false)
/**
* refer to mongo aggregate for details
*/
export function aggregate(entityType: string, arr: any[], context: Context)
export function count(entityType: string, args: object, context: Context)
``` ```
\ No newline at end of file
Clone repository
  • Home
  • jz backend project skeleton