@webtypen/webframez-core 0.0.24 → 0.0.26
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/WebApplication.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import http from "http";
|
|
1
3
|
export declare class WebApplication {
|
|
2
4
|
private server;
|
|
3
5
|
/**
|
|
4
6
|
* Init the routes and start the http-server
|
|
5
7
|
*/
|
|
6
|
-
boot(options?: any):
|
|
8
|
+
boot(options?: any): http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
|
|
7
9
|
}
|
package/lib/WebApplication.js
CHANGED
package/package.json
CHANGED
|
@@ -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 =
|