Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Datastore

Hierarchy

  • Datastore

Index

Constructors

constructor

  • Parameters

    Returns Datastore

Properties

app

app: App

client

client: MongoClient

db

db: Db

Methods

aggregate

  • aggregate(collection_name: string, pipeline: QueryStage[], _?: {}, output_options?: OutputOptions): Promise<any[]>
  • Parameters

    • collection_name: string
    • pipeline: QueryStage[]
    • Default value _: {} = {}
    • Default value output_options: OutputOptions = {}

    Returns Promise<any[]>

createIndex

  • createIndex(collection_name: string, index: any, options?: Parameters<MongoCollection["createIndex"]>[1]): Promise<string>
  • Parameters

    • collection_name: string
    • index: any
    • Optional options: Parameters<MongoCollection["createIndex"]>[1]

    Returns Promise<string>

create_index

  • create_index(collection: Collection): Promise<void>
  • Parameters

    Returns Promise<void>

find

  • find(collection_name: string, query: any, options?: Parameters<MongoCollection["find"]>[1], output_options?: OutputOptions): Promise<any[]>
  • Parameters

    • collection_name: string
    • query: any
    • Default value options: Parameters<MongoCollection["find"]>[1] = {}
    • Default value output_options: OutputOptions = {}

    Returns Promise<any[]>

insert

  • insert(collection_name: string, to_insert: any, options?: Parameters<MongoCollection["insertOne"]>[1]): Promise<any>
  • Parameters

    • collection_name: string
    • to_insert: any
    • Optional options: Parameters<MongoCollection["insertOne"]>[1]

    Returns Promise<any>

post_start

  • post_start(): Promise<void>
  • Returns Promise<void>

remove

  • remove(collection_name: string, query: any, just_one: boolean): Promise<DeleteWriteOpResultObject>
  • Parameters

    • collection_name: string
    • query: any
    • just_one: boolean

    Returns Promise<DeleteWriteOpResultObject>

start

  • start(): Promise<void>
  • Returns Promise<void>

stop

  • stop(): void
  • Returns void

update

  • update(collection_name: string, query: any, new_value: any): Promise<UpdateWriteOpResult>
  • Parameters

    • collection_name: string
    • query: any
    • new_value: any

    Returns Promise<UpdateWriteOpResult>

Generated using TypeDoc