Skip to main content

@webda/mongoReadme | API


Class: MongoParameters

Extends

  • StoreParameters

Constructors

new MongoParameters(params, service)

new MongoParameters(params, service): MongoParameters

Parameters

params: any

service: Store<CoreModel, StoreParameters, StoreEvents>

Returns

MongoParameters

Overrides

StoreParameters.constructor

Source

mongodb/src/mongodb.ts:13

Properties

additionalModels?

additionalModels?: string[]

Additional models

Allow this store to manage other models

Default

[]

Inherited from

StoreParameters.additionalModels

Source

core/lib/stores/store.d.ts:388


asyncDelete

asyncDelete: boolean

async delete

Inherited from

StoreParameters.asyncDelete

Source

core/lib/stores/store.d.ts:392


collection

collection: string

Which collection to use

Source

mongodb/src/mongodb.ts:38


database?

database?: string

Source

mongodb/src/mongodb.ts:42


databaseOptions?

databaseOptions?: DbOptions

Mongo Database Options

See

https://www.npmjs.com/package/mongodb

Source

mongodb/src/mongodb.ts:48


defaultModel?

defaultModel?: boolean

When __type model not found, use the model If strict is setup this parameter is not used

Default

true

Inherited from

StoreParameters.defaultModel

Source

core/lib/stores/store.d.ts:414


expose?

expose?: StoreExposeParameters

Expose the service to an urls

Deprecated

will probably be removed in 4.0 in favor of Expose annotation

Inherited from

StoreParameters.expose

Source

core/lib/stores/store.d.ts:398


forceModel?

forceModel?: boolean

If set, Store will ignore the __type

Default

false

Inherited from

StoreParameters.forceModel

Source

core/lib/stores/store.d.ts:420


model?

model?: string

Webda model to use within the Store

Default

"Webda/CoreModel"

Inherited from

StoreParameters.model

Source

core/lib/stores/store.d.ts:380


modelAliases?

modelAliases?: Object

Model Aliases to allow easier rename of Model

Index signature

[key: string]: string

Inherited from

StoreParameters.modelAliases

Source

core/lib/stores/store.d.ts:430


mongoUrl?

mongoUrl?: string

Contains the URL to Mongo Server

Will try to use WEBDA_MONDO_URL environment variable if not defined

Source

mongodb/src/mongodb.ts:27


noCache?

noCache?: boolean

Disable default memory cache

Inherited from

StoreParameters.noCache

Source

core/lib/stores/store.d.ts:436


openapi?

openapi?: OpenAPIWebdaDefinition

OpenAPI override

Schema Ignore

Inherited from

StoreParameters.openapi

Source

core/lib/services/service.d.ts:104


options?

options?: any

Additional options for Mongo connetion

Should be typed with MongoClientOptions but not available due to bug in ts-json-schema-generator https://docs.mongodb.com/manual/reference/connection-string

Source

mongodb/src/mongodb.ts:34


slowQueryThreshold

slowQueryThreshold: number

Slow query threshold

Default

30000

Inherited from

StoreParameters.slowQueryThreshold

Source

core/lib/stores/store.d.ts:426


strict?

strict?: boolean

Allow to load object that does not have the type data

If set to true, then the Store will only managed the defined _model and no model extending this one

Default

false

Inherited from

StoreParameters.strict

Source

core/lib/stores/store.d.ts:407


type

type: string

Type of the service

Inherited from

StoreParameters.type

Source

core/lib/services/service.d.ts:95


url?

url?: string

URL on which to serve the content

Inherited from

StoreParameters.url

Source

core/lib/services/service.d.ts:99