leoric 2.10.3 → 2.11.0
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/dist/adapters/sequelize.d.ts +492 -0
- package/dist/adapters/sequelize.js +1129 -0
- package/dist/adapters/sequelize.js.map +1 -0
- package/dist/bone.d.ts +536 -0
- package/dist/bone.js +2161 -0
- package/dist/bone.js.map +1 -0
- package/dist/browser.d.ts +40 -0
- package/dist/browser.js +77 -0
- package/dist/browser.js.map +1 -0
- package/dist/collection.d.ts +31 -0
- package/dist/collection.js +253 -0
- package/dist/collection.js.map +1 -0
- package/dist/constants.d.ts +26 -0
- package/dist/constants.js +43 -0
- package/dist/constants.js.map +1 -0
- package/dist/data_types.d.ts +215 -0
- package/dist/data_types.js +656 -0
- package/dist/data_types.js.map +1 -0
- package/dist/decorators.d.ts +26 -0
- package/dist/decorators.js +96 -0
- package/dist/decorators.js.map +1 -0
- package/dist/drivers/abstract/attribute.d.ts +16 -0
- package/dist/drivers/abstract/attribute.js +190 -0
- package/dist/drivers/abstract/attribute.js.map +1 -0
- package/dist/drivers/abstract/index.d.ts +64 -0
- package/dist/drivers/abstract/index.js +442 -0
- package/dist/drivers/abstract/index.js.map +1 -0
- package/dist/drivers/abstract/logger.d.ts +9 -0
- package/dist/drivers/abstract/logger.js +70 -0
- package/dist/drivers/abstract/logger.js.map +1 -0
- package/dist/drivers/abstract/spellbook.d.ts +97 -0
- package/dist/drivers/abstract/spellbook.js +757 -0
- package/dist/drivers/abstract/spellbook.js.map +1 -0
- package/dist/drivers/index.d.ts +6 -0
- package/dist/drivers/index.js +27 -0
- package/dist/drivers/index.js.map +1 -0
- package/dist/drivers/mysql/attribute.d.ts +8 -0
- package/dist/drivers/mysql/attribute.js +58 -0
- package/dist/drivers/mysql/attribute.js.map +1 -0
- package/dist/drivers/mysql/data_types.d.ts +16 -0
- package/dist/drivers/mysql/data_types.js +39 -0
- package/dist/drivers/mysql/data_types.js.map +1 -0
- package/dist/drivers/mysql/index.d.ts +60 -0
- package/dist/drivers/mysql/index.js +362 -0
- package/dist/drivers/mysql/index.js.map +1 -0
- package/dist/drivers/mysql/spellbook.d.ts +14 -0
- package/dist/drivers/mysql/spellbook.js +134 -0
- package/dist/drivers/mysql/spellbook.js.map +1 -0
- package/dist/drivers/postgres/attribute.d.ts +7 -0
- package/dist/drivers/postgres/attribute.js +89 -0
- package/dist/drivers/postgres/attribute.js.map +1 -0
- package/dist/drivers/postgres/data_types.d.ts +74 -0
- package/dist/drivers/postgres/data_types.js +113 -0
- package/dist/drivers/postgres/data_types.js.map +1 -0
- package/dist/drivers/postgres/index.d.ts +27 -0
- package/dist/drivers/postgres/index.js +381 -0
- package/dist/drivers/postgres/index.js.map +1 -0
- package/dist/drivers/postgres/spellbook.d.ts +12 -0
- package/dist/drivers/postgres/spellbook.js +46 -0
- package/dist/drivers/postgres/spellbook.js.map +1 -0
- package/dist/drivers/postgres/sqlstring.d.ts +19 -0
- package/dist/drivers/postgres/sqlstring.js +179 -0
- package/dist/drivers/postgres/sqlstring.js.map +1 -0
- package/dist/drivers/postgres/type_parser.d.ts +1 -0
- package/dist/drivers/postgres/type_parser.js +6 -0
- package/dist/drivers/postgres/type_parser.js.map +1 -0
- package/dist/drivers/sqlite/attribute.d.ts +8 -0
- package/dist/drivers/sqlite/attribute.js +56 -0
- package/dist/drivers/sqlite/attribute.js.map +1 -0
- package/dist/drivers/sqlite/connection.d.ts +18 -0
- package/dist/drivers/sqlite/connection.js +203 -0
- package/dist/drivers/sqlite/connection.js.map +1 -0
- package/dist/drivers/sqlite/data_types.d.ts +87 -0
- package/dist/drivers/sqlite/data_types.js +152 -0
- package/dist/drivers/sqlite/data_types.js.map +1 -0
- package/dist/drivers/sqlite/index.d.ts +20 -0
- package/dist/drivers/sqlite/index.js +392 -0
- package/dist/drivers/sqlite/index.js.map +1 -0
- package/dist/drivers/sqlite/pool.d.ts +12 -0
- package/dist/drivers/sqlite/pool.js +160 -0
- package/dist/drivers/sqlite/pool.js.map +1 -0
- package/dist/drivers/sqlite/spellbook.d.ts +8 -0
- package/dist/drivers/sqlite/spellbook.js +110 -0
- package/dist/drivers/sqlite/spellbook.js.map +1 -0
- package/dist/drivers/sqlite/sqlstring.d.ts +4 -0
- package/dist/drivers/sqlite/sqlstring.js +195 -0
- package/dist/drivers/sqlite/sqlstring.js.map +1 -0
- package/dist/drivers/sqljs/index.d.ts +22 -0
- package/dist/drivers/sqljs/index.js +74 -0
- package/dist/drivers/sqljs/index.js.map +1 -0
- package/dist/drivers/sqljs/interface.d.ts +17 -0
- package/dist/drivers/sqljs/interface.js +2 -0
- package/dist/drivers/sqljs/interface.js.map +1 -0
- package/dist/drivers/sqljs/sqljs-connection.d.ts +25 -0
- package/dist/drivers/sqljs/sqljs-connection.js +182 -0
- package/dist/drivers/sqljs/sqljs-connection.js.map +1 -0
- package/dist/expr.d.ts +75 -0
- package/dist/expr.js +518 -0
- package/dist/expr.js.map +1 -0
- package/dist/expr_formatter.d.ts +25 -0
- package/dist/expr_formatter.js +273 -0
- package/dist/expr_formatter.js.map +1 -0
- package/dist/hint.d.ts +77 -0
- package/dist/hint.js +280 -0
- package/dist/hint.js.map +1 -0
- package/dist/migrations.d.ts +3 -0
- package/dist/migrations.js +227 -0
- package/dist/migrations.js.map +1 -0
- package/dist/query_object.d.ts +16 -0
- package/dist/query_object.js +256 -0
- package/dist/query_object.js.map +1 -0
- package/dist/raw.d.ts +7 -0
- package/dist/raw.js +20 -0
- package/dist/raw.js.map +1 -0
- package/dist/realm/base.d.ts +64 -0
- package/dist/realm/base.js +464 -0
- package/dist/realm/base.js.map +1 -0
- package/dist/realm/index.d.ts +11 -0
- package/dist/realm/index.js +163 -0
- package/dist/realm/index.js.map +1 -0
- package/dist/setup_hooks.d.ts +12 -0
- package/dist/setup_hooks.js +317 -0
- package/dist/setup_hooks.js.map +1 -0
- package/dist/spell.d.ts +290 -0
- package/dist/spell.js +1376 -0
- package/dist/spell.js.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +91 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/invokable.d.ts +6 -0
- package/dist/utils/invokable.js +52 -0
- package/dist/utils/invokable.js.map +1 -0
- package/dist/utils/string.d.ts +30 -0
- package/dist/utils/string.js +56 -0
- package/dist/utils/string.js.map +1 -0
- package/dist/validator.d.ts +11 -0
- package/dist/validator.js +137 -0
- package/dist/validator.js.map +1 -0
- package/package.json +27 -3
- package/src/adapters/sequelize.d.ts +1 -1
- package/src/adapters/sequelize.js +0 -4
- package/src/bone.js +1 -1
- package/src/browser.js +61 -0
- package/src/browser.js.map +1 -0
- package/src/browser.ts +60 -0
- package/src/data_types.js +4 -6
- package/src/data_types.js.map +1 -1
- package/src/decorators.js +2 -24
- package/src/decorators.js.map +1 -1
- package/src/drivers/abstract/spellbook.js +1 -1
- package/src/drivers/sqljs/index.js +57 -0
- package/src/drivers/sqljs/index.js.map +1 -0
- package/src/drivers/sqljs/index.ts +73 -0
- package/src/drivers/sqljs/interface.js +3 -0
- package/src/drivers/sqljs/interface.js.map +1 -0
- package/src/drivers/sqljs/interface.ts +20 -0
- package/src/drivers/sqljs/sqljs-connection.js +143 -0
- package/src/drivers/sqljs/sqljs-connection.js.map +1 -0
- package/src/drivers/sqljs/sqljs-connection.ts +144 -0
- package/src/{realm.js → realm/base.js} +25 -47
- package/src/realm/index.js +67 -0
- package/src/spell.js +12 -2
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
declare function _exports(Bone: any): {
|
|
2
|
+
new (): {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
update(values?: {}, options?: {}): Promise<any>;
|
|
5
|
+
decrement(fields: any, options?: {}): any;
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* @param {*} [options={}]
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
destroy(options?: any): Promise<any>;
|
|
13
|
+
equals(): void;
|
|
14
|
+
equalsOneOf(): void;
|
|
15
|
+
get(key: any): any;
|
|
16
|
+
getDataValue(key: any): any;
|
|
17
|
+
readonly dataValues: any;
|
|
18
|
+
increment(fields: any, options?: {}): any;
|
|
19
|
+
isSoftDeleted(): boolean;
|
|
20
|
+
previous(key: any): any;
|
|
21
|
+
set(key: any, value: any): void;
|
|
22
|
+
setDataValue(key: any, value: any): void;
|
|
23
|
+
where(): {
|
|
24
|
+
[x: number]: any;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* An alias of instance constructor. Some legacy code access model name from instance with `this.Model.name`.
|
|
28
|
+
*/
|
|
29
|
+
readonly Model: Function;
|
|
30
|
+
};
|
|
31
|
+
[x: string]: any;
|
|
32
|
+
_scopes: {};
|
|
33
|
+
_scope: null;
|
|
34
|
+
readonly sequelize: boolean;
|
|
35
|
+
readonly Instance: any;
|
|
36
|
+
readonly rawAttributes: any;
|
|
37
|
+
/**
|
|
38
|
+
* add scope see https://sequelize.org/master/class/lib/model.js~Model.html#static-method-addScope
|
|
39
|
+
* @deprecated scope is not recommended to use
|
|
40
|
+
* @static
|
|
41
|
+
* @param {string} name
|
|
42
|
+
* @param {Object|Function} scope
|
|
43
|
+
* @param {
|
|
44
|
+
* override: boolean
|
|
45
|
+
* } options
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
addScope(name: string, scope: any | Function, options?: {}): void;
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated scope is not recommended to use
|
|
51
|
+
* @param {string} name
|
|
52
|
+
* @param {...any} args
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
scope(name: string, ...args: any[]): {
|
|
56
|
+
new (): {
|
|
57
|
+
[x: string]: any;
|
|
58
|
+
update(values?: {}, options?: {}): Promise<any>;
|
|
59
|
+
decrement(fields: any, options?: {}): any;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
*
|
|
63
|
+
* @param {*} [options={}]
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
66
|
+
destroy(options?: any): Promise<any>;
|
|
67
|
+
equals(): void;
|
|
68
|
+
equalsOneOf(): void;
|
|
69
|
+
get(key: any): any;
|
|
70
|
+
getDataValue(key: any): any;
|
|
71
|
+
readonly dataValues: any;
|
|
72
|
+
increment(fields: any, options?: {}): any;
|
|
73
|
+
isSoftDeleted(): boolean;
|
|
74
|
+
previous(key: any): any;
|
|
75
|
+
set(key: any, value: any): void;
|
|
76
|
+
setDataValue(key: any, value: any): void;
|
|
77
|
+
where(): {
|
|
78
|
+
[x: number]: any;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* An alias of instance constructor. Some legacy code access model name from instance with `this.Model.name`.
|
|
82
|
+
*/
|
|
83
|
+
readonly Model: Function;
|
|
84
|
+
};
|
|
85
|
+
name: string;
|
|
86
|
+
readonly synchronized: any;
|
|
87
|
+
readonly table: any;
|
|
88
|
+
_scopes: {};
|
|
89
|
+
_scope: null;
|
|
90
|
+
readonly sequelize: boolean;
|
|
91
|
+
readonly Instance: any;
|
|
92
|
+
readonly rawAttributes: any;
|
|
93
|
+
/**
|
|
94
|
+
* add scope see https://sequelize.org/master/class/lib/model.js~Model.html#static-method-addScope
|
|
95
|
+
* @deprecated scope is not recommended to use
|
|
96
|
+
* @static
|
|
97
|
+
* @param {string} name
|
|
98
|
+
* @param {Object|Function} scope
|
|
99
|
+
* @param {
|
|
100
|
+
* override: boolean
|
|
101
|
+
* } options
|
|
102
|
+
* @returns
|
|
103
|
+
*/
|
|
104
|
+
addScope(name: string, scope: any | Function, options?: {}): void;
|
|
105
|
+
scope(name: string, ...args: any[]): any;
|
|
106
|
+
readonly unscoped: any;
|
|
107
|
+
/**
|
|
108
|
+
* @deprecated scope is not recommended to use
|
|
109
|
+
* @static
|
|
110
|
+
* @param {function|object|array} name
|
|
111
|
+
*/
|
|
112
|
+
setScope(name: Function | object | any[], ...args: any[]): void;
|
|
113
|
+
init(attributes: any, opts?: {}, descriptors?: {}): void;
|
|
114
|
+
aggregate(name: any, func: any, options?: {}): any;
|
|
115
|
+
belongsToMany(): void;
|
|
116
|
+
build(values: any, options?: {}): {
|
|
117
|
+
[x: string]: any;
|
|
118
|
+
update(values?: {}, options?: {}): Promise<any>;
|
|
119
|
+
decrement(fields: any, options?: {}): any;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
*
|
|
123
|
+
* @param {*} [options={}]
|
|
124
|
+
* @returns
|
|
125
|
+
*/
|
|
126
|
+
destroy(options?: any): Promise<any>;
|
|
127
|
+
equals(): void;
|
|
128
|
+
equalsOneOf(): void;
|
|
129
|
+
get(key: any): any;
|
|
130
|
+
getDataValue(key: any): any;
|
|
131
|
+
readonly dataValues: any;
|
|
132
|
+
increment(fields: any, options?: {}): any;
|
|
133
|
+
isSoftDeleted(): boolean;
|
|
134
|
+
previous(key: any): any;
|
|
135
|
+
set(key: any, value: any): void;
|
|
136
|
+
setDataValue(key: any, value: any): void;
|
|
137
|
+
where(): {
|
|
138
|
+
[x: number]: any;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* An alias of instance constructor. Some legacy code access model name from instance with `this.Model.name`.
|
|
142
|
+
*/
|
|
143
|
+
readonly Model: Function;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* see https://github.com/sequelize/sequelize/blob/a729c4df41fa3a58fbecaf879265d2fb73d80e5f/src/model.js#L2299
|
|
147
|
+
* @param {Array<Object>} valueSets
|
|
148
|
+
* @param {Object} options
|
|
149
|
+
* @returns
|
|
150
|
+
*/
|
|
151
|
+
bulkBuild(valueSets: Array<any>, options?: any): {
|
|
152
|
+
[x: string]: any;
|
|
153
|
+
update(values?: {}, options?: {}): Promise<any>;
|
|
154
|
+
decrement(fields: any, options?: {}): any;
|
|
155
|
+
/**
|
|
156
|
+
*
|
|
157
|
+
*
|
|
158
|
+
* @param {*} [options={}]
|
|
159
|
+
* @returns
|
|
160
|
+
*/
|
|
161
|
+
destroy(options?: any): Promise<any>;
|
|
162
|
+
equals(): void;
|
|
163
|
+
equalsOneOf(): void;
|
|
164
|
+
get(key: any): any;
|
|
165
|
+
getDataValue(key: any): any;
|
|
166
|
+
readonly dataValues: any;
|
|
167
|
+
increment(fields: any, options?: {}): any;
|
|
168
|
+
isSoftDeleted(): boolean;
|
|
169
|
+
previous(key: any): any;
|
|
170
|
+
set(key: any, value: any): void;
|
|
171
|
+
setDataValue(key: any, value: any): void;
|
|
172
|
+
where(): {
|
|
173
|
+
[x: number]: any;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* An alias of instance constructor. Some legacy code access model name from instance with `this.Model.name`.
|
|
177
|
+
*/
|
|
178
|
+
readonly Model: Function;
|
|
179
|
+
}[];
|
|
180
|
+
count(options?: {}): any;
|
|
181
|
+
decrement(fields: any, options: any): any;
|
|
182
|
+
destroy(options?: {}): Promise<any>;
|
|
183
|
+
bulkDestroy(options?: {}): any;
|
|
184
|
+
findAll(options?: {}): any;
|
|
185
|
+
find(options?: {}): any;
|
|
186
|
+
findAndCountAll(options?: {}): Promise<{
|
|
187
|
+
rows: any;
|
|
188
|
+
count: any;
|
|
189
|
+
}>;
|
|
190
|
+
findByPk(value: any, options?: {}): any;
|
|
191
|
+
findCreateFind(options?: {}): Promise<any>;
|
|
192
|
+
findOne(options: any, ...args: any[]): any;
|
|
193
|
+
findOrBuild(options?: {}): Promise<any[]>;
|
|
194
|
+
findOrCreate(options: any): Promise<any[]>;
|
|
195
|
+
getTableName(): any;
|
|
196
|
+
increment(fields: any, options?: {}): any;
|
|
197
|
+
max(attribute: any, options?: {}): Promise<any>;
|
|
198
|
+
min(attribute: any, options?: {}): Promise<any>;
|
|
199
|
+
removeAttribute(name: any): void;
|
|
200
|
+
restore(options?: {}): any;
|
|
201
|
+
schema(): void;
|
|
202
|
+
sum(attribute: any, options?: {}): Promise<any>;
|
|
203
|
+
update(values: any, options?: {}): Promise<any>;
|
|
204
|
+
bulkUpdate(values: any, options?: {}): any;
|
|
205
|
+
/**
|
|
206
|
+
*
|
|
207
|
+
*
|
|
208
|
+
* @static
|
|
209
|
+
* @param {*} hookName before/after create|destroy|upsert|remove|update
|
|
210
|
+
* @param {*} fnNameOrFun function name or function
|
|
211
|
+
* @param {*} func hook function
|
|
212
|
+
*/
|
|
213
|
+
addHook(hookName: any, fnNameOrFun: any, func: any): void;
|
|
214
|
+
removeHook(): void;
|
|
215
|
+
};
|
|
216
|
+
readonly unscoped: {
|
|
217
|
+
new (): {
|
|
218
|
+
[x: string]: any;
|
|
219
|
+
update(values?: {}, options?: {}): Promise<any>;
|
|
220
|
+
decrement(fields: any, options?: {}): any;
|
|
221
|
+
/**
|
|
222
|
+
*
|
|
223
|
+
*
|
|
224
|
+
* @param {*} [options={}]
|
|
225
|
+
* @returns
|
|
226
|
+
*/
|
|
227
|
+
destroy(options?: any): Promise<any>;
|
|
228
|
+
equals(): void;
|
|
229
|
+
equalsOneOf(): void;
|
|
230
|
+
get(key: any): any;
|
|
231
|
+
getDataValue(key: any): any;
|
|
232
|
+
readonly dataValues: any;
|
|
233
|
+
increment(fields: any, options?: {}): any;
|
|
234
|
+
isSoftDeleted(): boolean;
|
|
235
|
+
previous(key: any): any;
|
|
236
|
+
set(key: any, value: any): void;
|
|
237
|
+
setDataValue(key: any, value: any): void;
|
|
238
|
+
where(): {
|
|
239
|
+
[x: number]: any;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* An alias of instance constructor. Some legacy code access model name from instance with `this.Model.name`.
|
|
243
|
+
*/
|
|
244
|
+
readonly Model: Function;
|
|
245
|
+
};
|
|
246
|
+
name: string;
|
|
247
|
+
readonly synchronized: any;
|
|
248
|
+
readonly table: any;
|
|
249
|
+
_scopes: {};
|
|
250
|
+
_scope: null;
|
|
251
|
+
readonly sequelize: boolean;
|
|
252
|
+
readonly Instance: any;
|
|
253
|
+
readonly rawAttributes: any;
|
|
254
|
+
/**
|
|
255
|
+
* add scope see https://sequelize.org/master/class/lib/model.js~Model.html#static-method-addScope
|
|
256
|
+
* @deprecated scope is not recommended to use
|
|
257
|
+
* @static
|
|
258
|
+
* @param {string} name
|
|
259
|
+
* @param {Object|Function} scope
|
|
260
|
+
* @param {
|
|
261
|
+
* override: boolean
|
|
262
|
+
* } options
|
|
263
|
+
* @returns
|
|
264
|
+
*/
|
|
265
|
+
addScope(name: string, scope: any | Function, options?: {}): void;
|
|
266
|
+
/**
|
|
267
|
+
* @deprecated scope is not recommended to use
|
|
268
|
+
* @param {string} name
|
|
269
|
+
* @param {...any} args
|
|
270
|
+
* @returns
|
|
271
|
+
*/
|
|
272
|
+
scope(name: string, ...args: any[]): any;
|
|
273
|
+
readonly unscoped: any;
|
|
274
|
+
/**
|
|
275
|
+
* @deprecated scope is not recommended to use
|
|
276
|
+
* @static
|
|
277
|
+
* @param {function|object|array} name
|
|
278
|
+
*/
|
|
279
|
+
setScope(name: Function | object | any[], ...args: any[]): void;
|
|
280
|
+
init(attributes: any, opts?: {}, descriptors?: {}): void;
|
|
281
|
+
aggregate(name: any, func: any, options?: {}): any;
|
|
282
|
+
belongsToMany(): void;
|
|
283
|
+
build(values: any, options?: {}): {
|
|
284
|
+
[x: string]: any;
|
|
285
|
+
update(values?: {}, options?: {}): Promise<any>;
|
|
286
|
+
decrement(fields: any, options?: {}): any;
|
|
287
|
+
/**
|
|
288
|
+
*
|
|
289
|
+
*
|
|
290
|
+
* @param {*} [options={}]
|
|
291
|
+
* @returns
|
|
292
|
+
*/
|
|
293
|
+
destroy(options?: any): Promise<any>;
|
|
294
|
+
equals(): void;
|
|
295
|
+
equalsOneOf(): void;
|
|
296
|
+
get(key: any): any;
|
|
297
|
+
getDataValue(key: any): any;
|
|
298
|
+
readonly dataValues: any;
|
|
299
|
+
increment(fields: any, options?: {}): any;
|
|
300
|
+
isSoftDeleted(): boolean;
|
|
301
|
+
previous(key: any): any;
|
|
302
|
+
set(key: any, value: any): void;
|
|
303
|
+
setDataValue(key: any, value: any): void;
|
|
304
|
+
where(): {
|
|
305
|
+
[x: number]: any;
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* An alias of instance constructor. Some legacy code access model name from instance with `this.Model.name`.
|
|
309
|
+
*/
|
|
310
|
+
readonly Model: Function;
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* see https://github.com/sequelize/sequelize/blob/a729c4df41fa3a58fbecaf879265d2fb73d80e5f/src/model.js#L2299
|
|
314
|
+
* @param {Array<Object>} valueSets
|
|
315
|
+
* @param {Object} options
|
|
316
|
+
* @returns
|
|
317
|
+
*/
|
|
318
|
+
bulkBuild(valueSets: Array<any>, options?: any): {
|
|
319
|
+
[x: string]: any;
|
|
320
|
+
update(values?: {}, options?: {}): Promise<any>;
|
|
321
|
+
decrement(fields: any, options?: {}): any;
|
|
322
|
+
/**
|
|
323
|
+
*
|
|
324
|
+
*
|
|
325
|
+
* @param {*} [options={}]
|
|
326
|
+
* @returns
|
|
327
|
+
*/
|
|
328
|
+
destroy(options?: any): Promise<any>;
|
|
329
|
+
equals(): void;
|
|
330
|
+
equalsOneOf(): void;
|
|
331
|
+
get(key: any): any;
|
|
332
|
+
getDataValue(key: any): any;
|
|
333
|
+
readonly dataValues: any;
|
|
334
|
+
increment(fields: any, options?: {}): any;
|
|
335
|
+
isSoftDeleted(): boolean;
|
|
336
|
+
previous(key: any): any;
|
|
337
|
+
set(key: any, value: any): void;
|
|
338
|
+
setDataValue(key: any, value: any): void;
|
|
339
|
+
where(): {
|
|
340
|
+
[x: number]: any;
|
|
341
|
+
};
|
|
342
|
+
/**
|
|
343
|
+
* An alias of instance constructor. Some legacy code access model name from instance with `this.Model.name`.
|
|
344
|
+
*/
|
|
345
|
+
readonly Model: Function;
|
|
346
|
+
}[];
|
|
347
|
+
count(options?: {}): any;
|
|
348
|
+
decrement(fields: any, options: any): any;
|
|
349
|
+
destroy(options?: {}): Promise<any>;
|
|
350
|
+
bulkDestroy(options?: {}): any;
|
|
351
|
+
findAll(options?: {}): any;
|
|
352
|
+
find(options?: {}): any;
|
|
353
|
+
findAndCountAll(options?: {}): Promise<{
|
|
354
|
+
rows: any;
|
|
355
|
+
count: any;
|
|
356
|
+
}>;
|
|
357
|
+
findByPk(value: any, options?: {}): any;
|
|
358
|
+
findCreateFind(options?: {}): Promise<any>;
|
|
359
|
+
findOne(options: any, ...args: any[]): any;
|
|
360
|
+
findOrBuild(options?: {}): Promise<any[]>;
|
|
361
|
+
findOrCreate(options: any): Promise<any[]>;
|
|
362
|
+
getTableName(): any;
|
|
363
|
+
increment(fields: any, options?: {}): any;
|
|
364
|
+
max(attribute: any, options?: {}): Promise<any>;
|
|
365
|
+
min(attribute: any, options?: {}): Promise<any>;
|
|
366
|
+
removeAttribute(name: any): void;
|
|
367
|
+
restore(options?: {}): any;
|
|
368
|
+
schema(): void;
|
|
369
|
+
sum(attribute: any, options?: {}): Promise<any>;
|
|
370
|
+
update(values: any, options?: {}): Promise<any>;
|
|
371
|
+
bulkUpdate(values: any, options?: {}): any;
|
|
372
|
+
/**
|
|
373
|
+
*
|
|
374
|
+
*
|
|
375
|
+
* @static
|
|
376
|
+
* @param {*} hookName before/after create|destroy|upsert|remove|update
|
|
377
|
+
* @param {*} fnNameOrFun function name or function
|
|
378
|
+
* @param {*} func hook function
|
|
379
|
+
*/
|
|
380
|
+
addHook(hookName: any, fnNameOrFun: any, func: any): void;
|
|
381
|
+
removeHook(): void;
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* @deprecated scope is not recommended to use
|
|
385
|
+
* @static
|
|
386
|
+
* @param {function|object|array} name
|
|
387
|
+
*/
|
|
388
|
+
setScope(name: Function | object | any[], ...args: any[]): void;
|
|
389
|
+
init(attributes: any, opts?: {}, descriptors?: {}): void;
|
|
390
|
+
aggregate(name: any, func: any, options?: {}): any;
|
|
391
|
+
belongsToMany(): void;
|
|
392
|
+
build(values: any, options?: {}): {
|
|
393
|
+
[x: string]: any;
|
|
394
|
+
update(values?: {}, options?: {}): Promise<any>;
|
|
395
|
+
decrement(fields: any, options?: {}): any;
|
|
396
|
+
/**
|
|
397
|
+
*
|
|
398
|
+
*
|
|
399
|
+
* @param {*} [options={}]
|
|
400
|
+
* @returns
|
|
401
|
+
*/
|
|
402
|
+
destroy(options?: any): Promise<any>;
|
|
403
|
+
equals(): void;
|
|
404
|
+
equalsOneOf(): void;
|
|
405
|
+
get(key: any): any;
|
|
406
|
+
getDataValue(key: any): any;
|
|
407
|
+
readonly dataValues: any;
|
|
408
|
+
increment(fields: any, options?: {}): any;
|
|
409
|
+
isSoftDeleted(): boolean;
|
|
410
|
+
previous(key: any): any;
|
|
411
|
+
set(key: any, value: any): void;
|
|
412
|
+
setDataValue(key: any, value: any): void;
|
|
413
|
+
where(): {
|
|
414
|
+
[x: number]: any;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* An alias of instance constructor. Some legacy code access model name from instance with `this.Model.name`.
|
|
418
|
+
*/
|
|
419
|
+
readonly Model: Function;
|
|
420
|
+
};
|
|
421
|
+
/**
|
|
422
|
+
* see https://github.com/sequelize/sequelize/blob/a729c4df41fa3a58fbecaf879265d2fb73d80e5f/src/model.js#L2299
|
|
423
|
+
* @param {Array<Object>} valueSets
|
|
424
|
+
* @param {Object} options
|
|
425
|
+
* @returns
|
|
426
|
+
*/
|
|
427
|
+
bulkBuild(valueSets: Array<any>, options?: any): {
|
|
428
|
+
[x: string]: any;
|
|
429
|
+
update(values?: {}, options?: {}): Promise<any>;
|
|
430
|
+
decrement(fields: any, options?: {}): any;
|
|
431
|
+
/**
|
|
432
|
+
*
|
|
433
|
+
*
|
|
434
|
+
* @param {*} [options={}]
|
|
435
|
+
* @returns
|
|
436
|
+
*/
|
|
437
|
+
destroy(options?: any): Promise<any>;
|
|
438
|
+
equals(): void;
|
|
439
|
+
equalsOneOf(): void;
|
|
440
|
+
get(key: any): any;
|
|
441
|
+
getDataValue(key: any): any;
|
|
442
|
+
readonly dataValues: any;
|
|
443
|
+
increment(fields: any, options?: {}): any;
|
|
444
|
+
isSoftDeleted(): boolean;
|
|
445
|
+
previous(key: any): any;
|
|
446
|
+
set(key: any, value: any): void;
|
|
447
|
+
setDataValue(key: any, value: any): void;
|
|
448
|
+
where(): {
|
|
449
|
+
[x: number]: any;
|
|
450
|
+
};
|
|
451
|
+
/**
|
|
452
|
+
* An alias of instance constructor. Some legacy code access model name from instance with `this.Model.name`.
|
|
453
|
+
*/
|
|
454
|
+
readonly Model: Function;
|
|
455
|
+
}[];
|
|
456
|
+
count(options?: {}): any;
|
|
457
|
+
decrement(fields: any, options: any): any;
|
|
458
|
+
destroy(options?: {}): Promise<any>;
|
|
459
|
+
bulkDestroy(options?: {}): any;
|
|
460
|
+
findAll(options?: {}): any;
|
|
461
|
+
find(options?: {}): any;
|
|
462
|
+
findAndCountAll(options?: {}): Promise<{
|
|
463
|
+
rows: any;
|
|
464
|
+
count: any;
|
|
465
|
+
}>;
|
|
466
|
+
findByPk(value: any, options?: {}): any;
|
|
467
|
+
findCreateFind(options?: {}): Promise<any>;
|
|
468
|
+
findOne(options: any, ...args: any[]): any;
|
|
469
|
+
findOrBuild(options?: {}): Promise<any[]>;
|
|
470
|
+
findOrCreate(options: any): Promise<any[]>;
|
|
471
|
+
getTableName(): any;
|
|
472
|
+
increment(fields: any, options?: {}): any;
|
|
473
|
+
max(attribute: any, options?: {}): Promise<any>;
|
|
474
|
+
min(attribute: any, options?: {}): Promise<any>;
|
|
475
|
+
removeAttribute(name: any): void;
|
|
476
|
+
restore(options?: {}): any;
|
|
477
|
+
schema(): void;
|
|
478
|
+
sum(attribute: any, options?: {}): Promise<any>;
|
|
479
|
+
update(values: any, options?: {}): Promise<any>;
|
|
480
|
+
bulkUpdate(values: any, options?: {}): any;
|
|
481
|
+
/**
|
|
482
|
+
*
|
|
483
|
+
*
|
|
484
|
+
* @static
|
|
485
|
+
* @param {*} hookName before/after create|destroy|upsert|remove|update
|
|
486
|
+
* @param {*} fnNameOrFun function name or function
|
|
487
|
+
* @param {*} func hook function
|
|
488
|
+
*/
|
|
489
|
+
addHook(hookName: any, fnNameOrFun: any, func: any): void;
|
|
490
|
+
removeHook(): void;
|
|
491
|
+
};
|
|
492
|
+
export = _exports;
|