@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 +1 -1
- package/src/connection.js +2 -2
package/package.json
CHANGED
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
|
|
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
|
|
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}`)
|