@wxn0brp/db-core 0.8.0 → 0.8.2

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.
@@ -63,6 +63,7 @@ export class ValtheraClass {
63
63
  */
64
64
  add(query) {
65
65
  query.control ||= {};
66
+ query.id_gen ??= true;
66
67
  return this.execute("add", query);
67
68
  }
68
69
  /**
@@ -124,7 +125,7 @@ export class ValtheraClass {
124
125
  query.context ||= {};
125
126
  query.add_arg ||= {};
126
127
  query.control ||= {};
127
- query.id_gen ||= true;
128
+ query.id_gen ??= true;
128
129
  return this.execute("updateOneOrAdd", query);
129
130
  }
130
131
  /**
@@ -2,7 +2,7 @@ import { Collection } from "../helpers/collection.js";
2
2
  import { Data } from "./data.js";
3
3
  import { AddQuery, FindOneQuery, FindQuery, RemoveQuery, ToggleOneQuery, ToggleOneResult, UpdateOneOrAddQuery, UpdateOneOrAddResult, UpdateQuery } from "./query.js";
4
4
  export interface ValtheraCompatible {
5
- c(collection: string): Collection;
5
+ c<T = Data>(collection: string): Collection<T>;
6
6
  getCollections(): Promise<string[]>;
7
7
  ensureCollection(collection: string): Promise<boolean>;
8
8
  issetCollection(collection: string): Promise<boolean>;
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = "0.8.0";
1
+ export const version = "0.8.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wxn0brp/db-core",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "author": "wxn0brP",