@storecraft/database-mongodb 1.0.8 → 1.0.9

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": "@storecraft/database-mongodb",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Storecraft database driver for mongodb on node / bun / deno platform",
5
5
  "license": "MIT",
6
6
  "author": "Tomer Shalev (https://github.com/store-craft)",
package/src/con.search.js CHANGED
@@ -100,7 +100,7 @@ export const quicksearch = (driver) => {
100
100
  }
101
101
  ];
102
102
 
103
- const db = driver.mongo_client.db();
103
+ const db = driver.mongo_client.db(driver.name);
104
104
 
105
105
  /** @type {import('@storecraft/core/api').QuickSearchResource[]} */
106
106
  const items = await db.collection(tables_filtered[0]).aggregate(
@@ -17,7 +17,7 @@ export const create_app = async () => {
17
17
  new MongoDB(
18
18
  {
19
19
  db_name: 'test222',//process.env.MONGODB_NAME,
20
- url: process.env.MONGODB_URL
20
+ url: process.env.MONGODB_URL,
21
21
  }
22
22
  )
23
23
  )
@@ -30,8 +30,6 @@ async function test() {
30
30
 
31
31
  await migrateToLatest(app.db, false);
32
32
 
33
- // api.collections_list.create(app).run();
34
-
35
33
  Object.entries(api).slice(0, -1).forEach(
36
34
  ([name, runner]) => {
37
35
  runner.create(app).run();