@toa.io/storages.mongodb 0.2.1-dev.3 → 0.2.1-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/storages.mongodb",
3
- "version": "0.2.1-dev.3",
3
+ "version": "0.2.1-dev.4",
4
4
  "description": "Toa MongoDB Storage Connector",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
package/src/connection.js CHANGED
@@ -27,7 +27,7 @@ class Connection extends Connector {
27
27
  this.#client = new MongoClient(pointer.reference, OPTIONS)
28
28
  }
29
29
 
30
- async connection () {
30
+ async open () {
31
31
  await this.#client.connect()
32
32
 
33
33
  this.#collection = this.#client.db(this.#pointer.db).collection(this.#pointer.collection)
@@ -35,7 +35,7 @@ class Connection extends Connector {
35
35
  console.info(`Storage Mongo connected to ${this.#pointer.label}/${this.#pointer.db}/${this.#pointer.collection}`)
36
36
  }
37
37
 
38
- async disconnection () {
38
+ async close () {
39
39
  await this.#client.close()
40
40
 
41
41
  console.info(`Storage Mongo disconnected from ${this.#pointer.label}/${this.#pointer.db}/${this.#pointer.collection}`)