@webtypen/webframez-core 0.0.23 → 0.0.25

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.
@@ -16,6 +16,7 @@ export declare class QueryBuilder {
16
16
  get(options?: any): Promise<any>;
17
17
  first(options?: any): Promise<any>;
18
18
  paginate(count: number, options?: any): Promise<any>;
19
+ count(options?: any): Promise<any>;
19
20
  delete(options?: {
20
21
  mode: string;
21
22
  }): Promise<boolean>;
@@ -102,6 +102,12 @@ class QueryBuilder {
102
102
  : null;
103
103
  });
104
104
  }
105
+ count(options) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ this.mode = "count";
108
+ return yield DBConnection_1.DBConnection.runQuery(this);
109
+ });
110
+ }
105
111
  delete(options) {
106
112
  return __awaiter(this, void 0, void 0, function* () {
107
113
  this.mode =
package/lib/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./BaseKernelWeb";
5
5
  export * from "./BaseKernelConsole";
6
6
  export * from "./Controller/Controller";
7
7
  export * from "./Database/Model";
8
+ export * from "./Database/DBConnection";
8
9
  export * from "./ConsoleApplication";
9
10
  export * from "./WebApplication";
10
11
  export * from "./Router/Route";
package/lib/index.js CHANGED
@@ -21,6 +21,7 @@ __exportStar(require("./BaseKernelWeb"), exports);
21
21
  __exportStar(require("./BaseKernelConsole"), exports);
22
22
  __exportStar(require("./Controller/Controller"), exports);
23
23
  __exportStar(require("./Database/Model"), exports);
24
+ __exportStar(require("./Database/DBConnection"), exports);
24
25
  __exportStar(require("./ConsoleApplication"), exports);
25
26
  __exportStar(require("./WebApplication"), exports);
26
27
  __exportStar(require("./Router/Route"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webtypen/webframez-core",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "The core package of the typescript based webframez (web-framework) by webtypen.de",
5
5
  "homepage": "https://webtypen.de/",
6
6
  "license": "MIT",
@@ -103,6 +103,12 @@ export class QueryBuilder {
103
103
  ? result
104
104
  : null;
105
105
  }
106
+
107
+ async count(options?: any) {
108
+ this.mode = "count";
109
+
110
+ return await DBConnection.runQuery(this);
111
+ }
106
112
 
107
113
  async delete(options?: { mode: string }) {
108
114
  this.mode =
package/src/index.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./BaseKernelWeb";
5
5
  export * from "./BaseKernelConsole";
6
6
  export * from "./Controller/Controller";
7
7
  export * from "./Database/Model";
8
+ export * from "./Database/DBConnection";
8
9
  export * from "./ConsoleApplication";
9
10
  export * from "./WebApplication";
10
11
  export * from "./Router/Route";