tspace-mysql 1.2.9 → 1.3.1
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/README.md +64 -14
- package/dist/cli/dump/db.d.ts +4 -4
- package/dist/cli/dump/db.js +25 -25
- package/dist/cli/generate/make.d.ts +4 -4
- package/dist/cli/generate/make.js +45 -45
- package/dist/cli/generate/model.d.ts +2 -2
- package/dist/cli/generate/model.js +6 -6
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +58 -58
- package/dist/cli/migrate/make.d.ts +4 -4
- package/dist/cli/migrate/make.js +30 -30
- package/dist/cli/models/make.d.ts +4 -4
- package/dist/cli/models/make.js +51 -51
- package/dist/cli/models/model.d.ts +2 -2
- package/dist/cli/models/model.js +20 -11
- package/dist/cli/query/index.d.ts +4 -4
- package/dist/cli/query/index.js +7 -7
- package/dist/cli/tables/make.d.ts +4 -4
- package/dist/cli/tables/make.js +26 -26
- package/dist/cli/tables/table.d.ts +2 -2
- package/dist/cli/tables/table.js +6 -6
- package/dist/lib/connection/index.d.ts +30 -30
- package/dist/lib/connection/index.js +144 -143
- package/dist/lib/connection/options.d.ts +15 -4
- package/dist/lib/connection/options.js +43 -42
- package/dist/lib/constants/index.d.ts +5 -8
- package/dist/lib/constants/index.js +162 -158
- package/dist/lib/index.d.ts +8 -8
- package/dist/lib/index.js +36 -36
- package/dist/lib/tspace/{AbstractDatabase.d.ts → AbstractBuilder.d.ts} +124 -116
- package/dist/lib/tspace/{AbstractDatabase.js → AbstractBuilder.js} +36 -34
- package/dist/lib/tspace/AbstractDB.d.ts +18 -18
- package/dist/lib/tspace/AbstractDB.js +11 -11
- package/dist/lib/tspace/AbstractModel.d.ts +41 -41
- package/dist/lib/tspace/AbstractModel.js +11 -11
- package/dist/lib/tspace/Blueprint.d.ts +136 -136
- package/dist/lib/tspace/Blueprint.js +228 -228
- package/dist/lib/tspace/{Database.d.ts → Builder.d.ts} +833 -706
- package/dist/lib/tspace/{Database.js → Builder.js} +2556 -2363
- package/dist/lib/tspace/DB.d.ts +152 -126
- package/dist/lib/tspace/DB.js +373 -264
- package/dist/lib/tspace/Interface.d.ts +110 -109
- package/dist/lib/tspace/Interface.js +2 -2
- package/dist/lib/tspace/Logger.d.ts +8 -8
- package/dist/lib/tspace/Logger.js +49 -49
- package/dist/lib/tspace/Model.d.ts +708 -609
- package/dist/lib/tspace/Model.js +2520 -2477
- package/dist/lib/tspace/ProxyHandler.d.ts +14 -14
- package/dist/lib/tspace/ProxyHandler.js +31 -31
- package/dist/lib/tspace/Schema.d.ts +8 -8
- package/dist/lib/tspace/Schema.js +45 -44
- package/dist/lib/tspace/index.d.ts +15 -15
- package/dist/lib/tspace/index.js +20 -20
- package/dist/lib/utils/index.d.ts +15 -15
- package/dist/lib/utils/index.js +155 -165
- package/package.json +2 -4
|
@@ -1,158 +1,162 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONSTANTS = void 0;
|
|
4
|
-
const CONSTANTS = {
|
|
5
|
-
ID: 'ID',
|
|
6
|
-
SHOW: 'SHOW',
|
|
7
|
-
SHOW_TABLES: 'SHOW TABLES',
|
|
8
|
-
FIELDS: 'FIELDS',
|
|
9
|
-
COLUMNS: 'COLUMNS',
|
|
10
|
-
WHERE: 'WHERE',
|
|
11
|
-
BETWEEN: 'BETWEEN',
|
|
12
|
-
AND: 'AND',
|
|
13
|
-
IS_NULL: 'IS NULL',
|
|
14
|
-
IS_NOT_NULL: 'IS NOT NULL',
|
|
15
|
-
OR: 'OR',
|
|
16
|
-
LIKE: 'LIKE',
|
|
17
|
-
SELECT: 'SELECT',
|
|
18
|
-
SELECTED: '*',
|
|
19
|
-
DISTINCT: 'DISTINCT',
|
|
20
|
-
FROM: 'FROM',
|
|
21
|
-
OFFSET: 'OFFSET',
|
|
22
|
-
GROUP_BY: 'GROUP BY',
|
|
23
|
-
GROUP_CONCAT: 'GROUP_CONCAT',
|
|
24
|
-
ORDER_BY: 'ORDER BY',
|
|
25
|
-
DESC: 'DESC',
|
|
26
|
-
ASC: 'ASC',
|
|
27
|
-
INNER_JOIN: 'INNER JOIN',
|
|
28
|
-
LEFT_JOIN: 'LEFT JOIN',
|
|
29
|
-
RIGHT_JOIN: 'RIGHT JOIN',
|
|
30
|
-
CROSS_JOIN: 'CROSS JOIN',
|
|
31
|
-
ON: 'ON',
|
|
32
|
-
LIMIT: 'LIMIT',
|
|
33
|
-
HAVING: 'HAVING',
|
|
34
|
-
COUNT: 'COUNT',
|
|
35
|
-
AVG: 'AVG',
|
|
36
|
-
SUM: 'SUM',
|
|
37
|
-
MAX: 'MAX',
|
|
38
|
-
MIN: 'MIN',
|
|
39
|
-
AS: 'AS',
|
|
40
|
-
IN: 'IN',
|
|
41
|
-
ALL: 'ALL',
|
|
42
|
-
ANY: 'ANY',
|
|
43
|
-
NOT_IN: 'NOT IN',
|
|
44
|
-
SET: 'SET',
|
|
45
|
-
NOT: 'NOT',
|
|
46
|
-
DUPLICATE: 'DUPLICATE',
|
|
47
|
-
KEY: 'KEY',
|
|
48
|
-
RAW: '$RAW',
|
|
49
|
-
WHEN: 'WHEN',
|
|
50
|
-
THEN: 'THEN',
|
|
51
|
-
ELSE: 'ELSE',
|
|
52
|
-
CASE: 'CASE',
|
|
53
|
-
END: 'END',
|
|
54
|
-
WHERE_NOT_EXISTS: 'WHERE NOT EXISTS',
|
|
55
|
-
EXISTS: 'EXISTS',
|
|
56
|
-
VALUES: 'VALUES',
|
|
57
|
-
UPDATE: 'UPDATE',
|
|
58
|
-
DELETE: 'DELETE',
|
|
59
|
-
INSERT: 'INSERT INTO',
|
|
60
|
-
DROP_TABLE: 'DROP TABLE',
|
|
61
|
-
TRUNCATE_TABLE: 'TRUNCATE TABLE',
|
|
62
|
-
CREATE_DATABASE: 'CREATE DATABASE',
|
|
63
|
-
CREATE_DATABASE_NOT_EXISTS: 'CREATE DATABASE IF NOT EXISTS',
|
|
64
|
-
CREATE_TABLE: 'CREATE TABLE',
|
|
65
|
-
CREATE_TABLE_NOT_EXISTS: 'CREATE TABLE IF NOT EXISTS',
|
|
66
|
-
ENGINE: 'ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8',
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONSTANTS = void 0;
|
|
4
|
+
const CONSTANTS = Object.freeze({
|
|
5
|
+
ID: 'ID',
|
|
6
|
+
SHOW: 'SHOW',
|
|
7
|
+
SHOW_TABLES: 'SHOW TABLES',
|
|
8
|
+
FIELDS: 'FIELDS',
|
|
9
|
+
COLUMNS: 'COLUMNS',
|
|
10
|
+
WHERE: 'WHERE',
|
|
11
|
+
BETWEEN: 'BETWEEN',
|
|
12
|
+
AND: 'AND',
|
|
13
|
+
IS_NULL: 'IS NULL',
|
|
14
|
+
IS_NOT_NULL: 'IS NOT NULL',
|
|
15
|
+
OR: 'OR',
|
|
16
|
+
LIKE: 'LIKE',
|
|
17
|
+
SELECT: 'SELECT',
|
|
18
|
+
SELECTED: '*',
|
|
19
|
+
DISTINCT: 'DISTINCT',
|
|
20
|
+
FROM: 'FROM',
|
|
21
|
+
OFFSET: 'OFFSET',
|
|
22
|
+
GROUP_BY: 'GROUP BY',
|
|
23
|
+
GROUP_CONCAT: 'GROUP_CONCAT',
|
|
24
|
+
ORDER_BY: 'ORDER BY',
|
|
25
|
+
DESC: 'DESC',
|
|
26
|
+
ASC: 'ASC',
|
|
27
|
+
INNER_JOIN: 'INNER JOIN',
|
|
28
|
+
LEFT_JOIN: 'LEFT JOIN',
|
|
29
|
+
RIGHT_JOIN: 'RIGHT JOIN',
|
|
30
|
+
CROSS_JOIN: 'CROSS JOIN',
|
|
31
|
+
ON: 'ON',
|
|
32
|
+
LIMIT: 'LIMIT',
|
|
33
|
+
HAVING: 'HAVING',
|
|
34
|
+
COUNT: 'COUNT',
|
|
35
|
+
AVG: 'AVG',
|
|
36
|
+
SUM: 'SUM',
|
|
37
|
+
MAX: 'MAX',
|
|
38
|
+
MIN: 'MIN',
|
|
39
|
+
AS: 'AS',
|
|
40
|
+
IN: 'IN',
|
|
41
|
+
ALL: 'ALL',
|
|
42
|
+
ANY: 'ANY',
|
|
43
|
+
NOT_IN: 'NOT IN',
|
|
44
|
+
SET: 'SET',
|
|
45
|
+
NOT: 'NOT',
|
|
46
|
+
DUPLICATE: 'DUPLICATE',
|
|
47
|
+
KEY: 'KEY',
|
|
48
|
+
RAW: '$RAW',
|
|
49
|
+
WHEN: 'WHEN',
|
|
50
|
+
THEN: 'THEN',
|
|
51
|
+
ELSE: 'ELSE',
|
|
52
|
+
CASE: 'CASE',
|
|
53
|
+
END: 'END',
|
|
54
|
+
WHERE_NOT_EXISTS: 'WHERE NOT EXISTS',
|
|
55
|
+
EXISTS: 'EXISTS',
|
|
56
|
+
VALUES: 'VALUES',
|
|
57
|
+
UPDATE: 'UPDATE',
|
|
58
|
+
DELETE: 'DELETE',
|
|
59
|
+
INSERT: 'INSERT INTO',
|
|
60
|
+
DROP_TABLE: 'DROP TABLE',
|
|
61
|
+
TRUNCATE_TABLE: 'TRUNCATE TABLE',
|
|
62
|
+
CREATE_DATABASE: 'CREATE DATABASE',
|
|
63
|
+
CREATE_DATABASE_NOT_EXISTS: 'CREATE DATABASE IF NOT EXISTS',
|
|
64
|
+
CREATE_TABLE: 'CREATE TABLE',
|
|
65
|
+
CREATE_TABLE_NOT_EXISTS: 'CREATE TABLE IF NOT EXISTS',
|
|
66
|
+
ENGINE: 'ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8',
|
|
67
|
+
RAND: 'RAND()',
|
|
68
|
+
RELATIONSHIP: {
|
|
69
|
+
hasOne: 'hasOne',
|
|
70
|
+
hasMany: 'hasMany',
|
|
71
|
+
belongsTo: 'belongsTo',
|
|
72
|
+
belongsToMany: 'belongsToMany'
|
|
73
|
+
},
|
|
74
|
+
PATTERN: {
|
|
75
|
+
snake_case: 'snake_case',
|
|
76
|
+
camelCase: 'camelCase'
|
|
77
|
+
},
|
|
78
|
+
DB: {
|
|
79
|
+
PRIMARY_KEY: 'id',
|
|
80
|
+
VOID: false,
|
|
81
|
+
RESULT: null,
|
|
82
|
+
DISTINCT: '',
|
|
83
|
+
PLUCK: '',
|
|
84
|
+
SAVE: '',
|
|
85
|
+
DELETE: '',
|
|
86
|
+
UPDATE: '',
|
|
87
|
+
INSERT: '',
|
|
88
|
+
SELECT: '',
|
|
89
|
+
ONLY: [],
|
|
90
|
+
EXCEPT: [],
|
|
91
|
+
CHUNK: 0,
|
|
92
|
+
COUNT: '',
|
|
93
|
+
FROM: '',
|
|
94
|
+
JOIN: '',
|
|
95
|
+
WHERE: '',
|
|
96
|
+
TEST: [],
|
|
97
|
+
GROUP_BY: '',
|
|
98
|
+
ORDER_BY: '',
|
|
99
|
+
LIMIT: '',
|
|
100
|
+
OFFSET: '',
|
|
101
|
+
HAVING: '',
|
|
102
|
+
TABLE_NAME: '',
|
|
103
|
+
UUID_CUSTOM: '',
|
|
104
|
+
HIDDEN: [],
|
|
105
|
+
DEBUG: false,
|
|
106
|
+
UUID: false,
|
|
107
|
+
PAGE: 1,
|
|
108
|
+
PER_PAGE: 1,
|
|
109
|
+
HOOK: []
|
|
110
|
+
},
|
|
111
|
+
MODEL: {
|
|
112
|
+
PRIMARY_KEY: 'id',
|
|
113
|
+
VOID: false,
|
|
114
|
+
SELECT: '',
|
|
115
|
+
DELETE: '',
|
|
116
|
+
UPDATE: '',
|
|
117
|
+
INSERT: '',
|
|
118
|
+
ONLY: [],
|
|
119
|
+
EXCEPT: [],
|
|
120
|
+
CHUNK: 0,
|
|
121
|
+
COUNT: '',
|
|
122
|
+
FROM: '',
|
|
123
|
+
JOIN: '',
|
|
124
|
+
WHERE: '',
|
|
125
|
+
GROUP_BY: '',
|
|
126
|
+
ORDER_BY: '',
|
|
127
|
+
LIMIT: '',
|
|
128
|
+
OFFSET: '',
|
|
129
|
+
HAVING: '',
|
|
130
|
+
TABLE_NAME: '',
|
|
131
|
+
UUID_FORMAT: 'uuid',
|
|
132
|
+
HIDDEN: [],
|
|
133
|
+
DEBUG: false,
|
|
134
|
+
UUID: false,
|
|
135
|
+
SOFT_DELETE: false,
|
|
136
|
+
SOFT_DELETE_FORMAT: 'deleted_at',
|
|
137
|
+
SOFT_DELETE_RELATIONS: false,
|
|
138
|
+
RELATION: [],
|
|
139
|
+
PAGE: 1,
|
|
140
|
+
PER_PAGE: 1,
|
|
141
|
+
REGISTRY: {},
|
|
142
|
+
RESULT: null,
|
|
143
|
+
PATTERN: 'snake_case',
|
|
144
|
+
DISTINCT: '',
|
|
145
|
+
PLUCK: '',
|
|
146
|
+
SAVE: '',
|
|
147
|
+
HOOK: [],
|
|
148
|
+
RELATIONS: [],
|
|
149
|
+
RELATIONS_TRASHED: false,
|
|
150
|
+
RELATIONS_EXISTS: false,
|
|
151
|
+
RELATIONS_EXISTS_NOT_ID: [],
|
|
152
|
+
TIMESTAMP: false,
|
|
153
|
+
TIMESTAMP_FORMAT: {
|
|
154
|
+
CREATED_AT: 'created_at',
|
|
155
|
+
UPDATED_AT: 'updated_at'
|
|
156
|
+
},
|
|
157
|
+
SCHEMA: null,
|
|
158
|
+
FUNCTION_RELATION: false
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
exports.CONSTANTS = CONSTANTS;
|
|
162
|
+
exports.default = CONSTANTS;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The entry point.
|
|
3
|
-
*
|
|
4
|
-
* @module tspace-mysql
|
|
5
|
-
*/
|
|
6
|
-
import * as tspace from './tspace';
|
|
7
|
-
export * from './tspace';
|
|
8
|
-
export default tspace;
|
|
1
|
+
/**
|
|
2
|
+
* The entry point.
|
|
3
|
+
*
|
|
4
|
+
* @module tspace-mysql
|
|
5
|
+
*/
|
|
6
|
+
import * as tspace from './tspace';
|
|
7
|
+
export * from './tspace';
|
|
8
|
+
export default tspace;
|
package/dist/lib/index.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
/**
|
|
30
|
-
* The entry point.
|
|
31
|
-
*
|
|
32
|
-
* @module tspace-mysql
|
|
33
|
-
*/
|
|
34
|
-
const tspace = __importStar(require("./tspace"));
|
|
35
|
-
__exportStar(require("./tspace"), exports);
|
|
36
|
-
exports.default = tspace;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
/**
|
|
30
|
+
* The entry point.
|
|
31
|
+
*
|
|
32
|
+
* @module tspace-mysql
|
|
33
|
+
*/
|
|
34
|
+
const tspace = __importStar(require("./tspace"));
|
|
35
|
+
__exportStar(require("./tspace"), exports);
|
|
36
|
+
exports.default = tspace;
|
|
@@ -1,116 +1,124 @@
|
|
|
1
|
-
import { Pagination } from './Interface';
|
|
2
|
-
declare abstract class
|
|
3
|
-
protected $setters: string[];
|
|
4
|
-
protected $utils: {
|
|
5
|
-
[key: string]: Function;
|
|
6
|
-
};
|
|
7
|
-
protected $constants: Function;
|
|
8
|
-
protected $state: {
|
|
9
|
-
original: Function;
|
|
10
|
-
get: Function;
|
|
11
|
-
set: Function;
|
|
12
|
-
clone: Function;
|
|
13
|
-
};
|
|
14
|
-
protected $pool: {
|
|
15
|
-
query: Function;
|
|
16
|
-
set: Function;
|
|
17
|
-
get: Function;
|
|
18
|
-
};
|
|
19
|
-
protected $logger: {
|
|
20
|
-
get: Function;
|
|
21
|
-
set: (value: string) => void;
|
|
22
|
-
check: (value: string) => boolean;
|
|
23
|
-
};
|
|
24
|
-
protected $attributes: {
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
} | null;
|
|
27
|
-
abstract void(): this;
|
|
28
|
-
abstract debug(): this;
|
|
29
|
-
abstract dd(): this;
|
|
30
|
-
abstract select(...columns: string[]): this;
|
|
31
|
-
abstract distinct(...columns: string[]): this;
|
|
32
|
-
abstract whereNull(column: string): this;
|
|
33
|
-
abstract whereNotNull(column: string): this;
|
|
34
|
-
abstract where(column: string, operator: string, value: string): this;
|
|
35
|
-
abstract whereSensitive(column: string, operator: string, value: string): this;
|
|
36
|
-
abstract whereRaw(sql: string): this;
|
|
37
|
-
abstract whereId(id: number): this;
|
|
38
|
-
abstract whereUser(id: number): this;
|
|
39
|
-
abstract whereEmail(value: string): this;
|
|
40
|
-
abstract whereQuery(callback: Function): this;
|
|
41
|
-
abstract orWhere(column: string, operator: string, value: string): this;
|
|
42
|
-
abstract whereIn(column: string, arrayValues: Array<any>): this;
|
|
43
|
-
abstract orWhereIn(column: string, arrayValues: Array<any>): this;
|
|
44
|
-
abstract whereNotIn(column: string, arrayValues: Array<any>): this;
|
|
45
|
-
abstract whereSubQuery(column: string, subQuery: string): this;
|
|
46
|
-
abstract whereNotSubQuery(column: string, subQuery: string): this;
|
|
47
|
-
abstract orWhereSubQuery(column: string, subQuery: string): this;
|
|
48
|
-
abstract whereBetween(column: string, arrayValue: Array<any>): this;
|
|
49
|
-
abstract having(condition: string): this;
|
|
50
|
-
abstract
|
|
51
|
-
abstract
|
|
52
|
-
abstract
|
|
53
|
-
abstract
|
|
54
|
-
abstract
|
|
55
|
-
abstract
|
|
56
|
-
abstract
|
|
57
|
-
abstract
|
|
58
|
-
abstract
|
|
59
|
-
abstract
|
|
60
|
-
abstract
|
|
61
|
-
abstract
|
|
62
|
-
abstract
|
|
63
|
-
abstract
|
|
64
|
-
abstract
|
|
65
|
-
abstract
|
|
66
|
-
abstract
|
|
67
|
-
abstract
|
|
68
|
-
abstract
|
|
69
|
-
abstract
|
|
70
|
-
abstract
|
|
71
|
-
abstract
|
|
72
|
-
abstract
|
|
73
|
-
abstract
|
|
74
|
-
abstract
|
|
75
|
-
abstract
|
|
76
|
-
abstract
|
|
77
|
-
abstract
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
abstract
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}): Promise<
|
|
92
|
-
abstract
|
|
93
|
-
abstract
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
abstract
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
abstract
|
|
100
|
-
abstract
|
|
101
|
-
abstract
|
|
102
|
-
abstract
|
|
103
|
-
abstract
|
|
104
|
-
abstract
|
|
105
|
-
abstract
|
|
106
|
-
abstract
|
|
107
|
-
abstract
|
|
108
|
-
abstract
|
|
109
|
-
abstract
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
abstract
|
|
113
|
-
abstract
|
|
114
|
-
abstract
|
|
115
|
-
|
|
116
|
-
|
|
1
|
+
import { Pagination } from './Interface';
|
|
2
|
+
declare abstract class AbstractBuilder {
|
|
3
|
+
protected $setters: string[];
|
|
4
|
+
protected $utils: {
|
|
5
|
+
[key: string]: Function;
|
|
6
|
+
};
|
|
7
|
+
protected $constants: Function;
|
|
8
|
+
protected $state: {
|
|
9
|
+
original: Function;
|
|
10
|
+
get: Function;
|
|
11
|
+
set: Function;
|
|
12
|
+
clone: Function;
|
|
13
|
+
};
|
|
14
|
+
protected $pool: {
|
|
15
|
+
query: Function;
|
|
16
|
+
set: Function;
|
|
17
|
+
get: Function;
|
|
18
|
+
};
|
|
19
|
+
protected $logger: {
|
|
20
|
+
get: Function;
|
|
21
|
+
set: (value: string) => void;
|
|
22
|
+
check: (value: string) => boolean;
|
|
23
|
+
};
|
|
24
|
+
protected $attributes: {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
} | null;
|
|
27
|
+
abstract void(): this;
|
|
28
|
+
abstract debug(): this;
|
|
29
|
+
abstract dd(): this;
|
|
30
|
+
abstract select(...columns: string[]): this;
|
|
31
|
+
abstract distinct(...columns: string[]): this;
|
|
32
|
+
abstract whereNull(column: string): this;
|
|
33
|
+
abstract whereNotNull(column: string): this;
|
|
34
|
+
abstract where(column: string, operator: string, value: string): this;
|
|
35
|
+
abstract whereSensitive(column: string, operator: string, value: string): this;
|
|
36
|
+
abstract whereRaw(sql: string): this;
|
|
37
|
+
abstract whereId(id: number): this;
|
|
38
|
+
abstract whereUser(id: number): this;
|
|
39
|
+
abstract whereEmail(value: string): this;
|
|
40
|
+
abstract whereQuery(callback: Function): this;
|
|
41
|
+
abstract orWhere(column: string, operator: string, value: string): this;
|
|
42
|
+
abstract whereIn(column: string, arrayValues: Array<any>): this;
|
|
43
|
+
abstract orWhereIn(column: string, arrayValues: Array<any>): this;
|
|
44
|
+
abstract whereNotIn(column: string, arrayValues: Array<any>): this;
|
|
45
|
+
abstract whereSubQuery(column: string, subQuery: string): this;
|
|
46
|
+
abstract whereNotSubQuery(column: string, subQuery: string): this;
|
|
47
|
+
abstract orWhereSubQuery(column: string, subQuery: string): this;
|
|
48
|
+
abstract whereBetween(column: string, arrayValue: Array<any>): this;
|
|
49
|
+
abstract having(condition: string): this;
|
|
50
|
+
abstract havingRaw(condition: string): this;
|
|
51
|
+
abstract join(pk: string, fk: string): this;
|
|
52
|
+
abstract rightJoin(pk: string, fk: string): this;
|
|
53
|
+
abstract leftJoin(pk: string, fk: string): this;
|
|
54
|
+
abstract crossJoin(pk: string, fk: string): this;
|
|
55
|
+
abstract orderBy(column: string, order: string): this;
|
|
56
|
+
abstract orderByRaw(column: string, order: string): this;
|
|
57
|
+
abstract latest(...columns: Array<string>): this;
|
|
58
|
+
abstract latestRaw(...columns: Array<string>): this;
|
|
59
|
+
abstract oldest(...columns: Array<string>): this;
|
|
60
|
+
abstract oldestRaw(...columns: Array<string>): this;
|
|
61
|
+
abstract groupBy(...columns: string[]): this;
|
|
62
|
+
abstract groupByRaw(...columns: string[]): this;
|
|
63
|
+
abstract random(): this;
|
|
64
|
+
abstract inRandom(): this;
|
|
65
|
+
abstract limit(number: number): this;
|
|
66
|
+
abstract hidden(...columns: string[]): this;
|
|
67
|
+
abstract insert(objects: object): this;
|
|
68
|
+
abstract create(objects: object): this;
|
|
69
|
+
abstract update(objects: object): this;
|
|
70
|
+
abstract insertNotExists(objects: object): this;
|
|
71
|
+
abstract createNotExists(objects: object): this;
|
|
72
|
+
abstract insertOrUpdate(objects: object): this;
|
|
73
|
+
abstract createOrUpdate(objects: object): this;
|
|
74
|
+
abstract updateOrInsert(objects: object): this;
|
|
75
|
+
abstract updateOrCreate(objects: object): this;
|
|
76
|
+
abstract createMultiple(objects: object): this;
|
|
77
|
+
abstract insertMultiple(objects: object): this;
|
|
78
|
+
abstract except(...columns: string[]): this;
|
|
79
|
+
abstract only(...columns: string[]): this;
|
|
80
|
+
abstract drop(): Promise<any>;
|
|
81
|
+
abstract truncate(): Promise<any>;
|
|
82
|
+
abstract all(): Promise<Array<any>>;
|
|
83
|
+
abstract find(id: number): Promise<any>;
|
|
84
|
+
abstract pagination({ limit, page }: {
|
|
85
|
+
limit: number;
|
|
86
|
+
page: number;
|
|
87
|
+
}): Promise<Pagination>;
|
|
88
|
+
abstract paginate({ limit, page }: {
|
|
89
|
+
limit: number;
|
|
90
|
+
page: number;
|
|
91
|
+
}): Promise<Pagination>;
|
|
92
|
+
abstract first(): Promise<any>;
|
|
93
|
+
abstract firstOrError(message: string, options?: {
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
}): Promise<any>;
|
|
96
|
+
abstract findOneOrError(message: string, options?: {
|
|
97
|
+
[key: string]: any;
|
|
98
|
+
}): Promise<any>;
|
|
99
|
+
abstract get(): Promise<any>;
|
|
100
|
+
abstract findOne(): Promise<any>;
|
|
101
|
+
abstract findMany(): Promise<any>;
|
|
102
|
+
abstract getGroupBy(column: string): Promise<any>;
|
|
103
|
+
abstract findManyGroupBy(column: string): Promise<any>;
|
|
104
|
+
abstract toArray(column: string): Promise<any>;
|
|
105
|
+
abstract toJSON(): Promise<any>;
|
|
106
|
+
abstract toSQL(): string;
|
|
107
|
+
abstract toString(): string;
|
|
108
|
+
abstract count(column: string): Promise<number>;
|
|
109
|
+
abstract sum(column: string): Promise<number>;
|
|
110
|
+
abstract avg(column: string): Promise<number>;
|
|
111
|
+
abstract max(column: string): Promise<number>;
|
|
112
|
+
abstract min(column: string): Promise<number>;
|
|
113
|
+
abstract rawQuery(sql: string): Promise<Array<any>>;
|
|
114
|
+
abstract delete(): Promise<boolean>;
|
|
115
|
+
abstract exists(): Promise<boolean>;
|
|
116
|
+
abstract save(): Promise<{
|
|
117
|
+
[key: string]: any;
|
|
118
|
+
} | Array<any> | null | undefined>;
|
|
119
|
+
abstract increment(column: string, value: number): Promise<any>;
|
|
120
|
+
abstract decrement(column: string, value: number): Promise<any>;
|
|
121
|
+
abstract faker(round: number): Promise<any>;
|
|
122
|
+
}
|
|
123
|
+
export { AbstractBuilder };
|
|
124
|
+
export default AbstractBuilder;
|