@wxn0brp/db-core 0.0.6 → 0.0.7

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.
@@ -41,11 +41,11 @@ declare class ValtheraClass implements ValtheraCompatible {
41
41
  /**
42
42
  * Find data in a database.
43
43
  */
44
- find<T = Data>(collection: string, search: Search<T>, context?: VContext, dbFindOpts?: DbFindOpts<T>, findOpts?: FindOpts<T>): Promise<T[]>;
44
+ find<T = Data>(collection: string, search?: Search<T>, context?: VContext, dbFindOpts?: DbFindOpts<T>, findOpts?: FindOpts<T>): Promise<T[]>;
45
45
  /**
46
46
  * Find one data entry in a database.
47
47
  */
48
- findOne<T = Data>(collection: string, search: Search<T>, context?: VContext, findOpts?: FindOpts<T>): Promise<T>;
48
+ findOne<T = Data>(collection: string, search?: Search<T>, context?: VContext, findOpts?: FindOpts<T>): Promise<T>;
49
49
  /**
50
50
  * Update data in a database.
51
51
  */
@@ -58,13 +58,13 @@ class ValtheraClass {
58
58
  /**
59
59
  * Find data in a database.
60
60
  */
61
- async find(collection, search, context = {}, dbFindOpts = {}, findOpts = {}) {
61
+ async find(collection, search = {}, context = {}, dbFindOpts = {}, findOpts = {}) {
62
62
  return await this.execute("find", { collection, search, context, dbFindOpts, findOpts });
63
63
  }
64
64
  /**
65
65
  * Find one data entry in a database.
66
66
  */
67
- async findOne(collection, search, context = {}, findOpts = {}) {
67
+ async findOne(collection, search = {}, context = {}, findOpts = {}) {
68
68
  return await this.execute("findOne", { collection, search, context, findOpts });
69
69
  }
70
70
  /**
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = "0.0.6";
1
+ export const version = "0.0.7";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wxn0brp/db-core",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "author": "wxn0brP",