taon 19.0.32 → 19.0.35

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.
Files changed (162) hide show
  1. package/README.md +160 -160
  2. package/bin/start.js +279 -279
  3. package/bin/taon +6 -6
  4. package/bin/taon-debug +5 -5
  5. package/bin/taon-debug-brk +5 -5
  6. package/browser/README.md +24 -24
  7. package/browser/fesm2022/taon.mjs +29 -3
  8. package/browser/fesm2022/taon.mjs.map +1 -1
  9. package/browser/lib/base-classes/base-context.d.ts +1 -0
  10. package/browser/lib/base-classes/base.d.ts +1 -0
  11. package/browser/lib/create-context.d.ts +2 -0
  12. package/browser/lib/endpoint-context.d.ts +1 -0
  13. package/browser/lib/index.d.ts +3 -0
  14. package/browser/lib/models.d.ts +1 -0
  15. package/browser/package.json +1 -1
  16. package/cli.js.map +1 -1
  17. package/env.d.ts +3 -0
  18. package/environments/angular-node-app/env.angular-node-app.__.d.ts +3 -0
  19. package/environments/angular-node-app/env.angular-node-app.dev.d.ts +3 -0
  20. package/environments/angular-node-app/env.angular-node-app.localhost.d.ts +3 -0
  21. package/environments/angular-node-app/env.angular-node-app.prod.d.ts +3 -0
  22. package/environments/angular-node-app/env.angular-node-app.stage.d.ts +3 -0
  23. package/environments/docs-webapp/env.docs-webapp.__.d.ts +3 -0
  24. package/environments/electron-app/env.electron-app.__.d.ts +3 -0
  25. package/environments/electron-app/env.electron-app.prod.d.ts +3 -0
  26. package/environments/mobile-app/env.mobile-app.__.d.ts +3 -0
  27. package/environments/mobile-app/env.mobile-app.prod.d.ts +3 -0
  28. package/environments/npm-lib-and-cli-tool/env.npm-lib-and-cli-tool.__.d.ts +3 -0
  29. package/environments/npm-lib-and-cli-tool/env.npm-lib-and-cli-tool.prod.d.ts +3 -0
  30. package/environments/vscode-plugin/env.vscode-plugin.__.d.ts +6 -0
  31. package/environments/vscode-plugin/env.vscode-plugin.prod.d.ts +4 -0
  32. package/index.js.map +1 -1
  33. package/lib/base-classes/base-abstract-entity.js.map +1 -1
  34. package/lib/base-classes/base-angular-service.js.map +1 -1
  35. package/lib/base-classes/base-class.js.map +1 -1
  36. package/lib/base-classes/base-context.d.ts +1 -0
  37. package/lib/base-classes/base-context.js.map +1 -1
  38. package/lib/base-classes/base-controller.js.map +1 -1
  39. package/lib/base-classes/base-crud-controller.js.map +1 -1
  40. package/lib/base-classes/base-custom-repository.js.map +1 -1
  41. package/lib/base-classes/base-entity.js.map +1 -1
  42. package/lib/base-classes/base-injector.js.map +1 -1
  43. package/lib/base-classes/base-migration.js.map +1 -1
  44. package/lib/base-classes/base-provider.js.map +1 -1
  45. package/lib/base-classes/base-repository.js.map +1 -1
  46. package/lib/base-classes/base-subscriber-for-entity.js.map +1 -1
  47. package/lib/base-classes/base.d.ts +1 -0
  48. package/lib/base-classes/base.js.map +1 -1
  49. package/lib/build-info._auto-generated_.d.ts +2 -1
  50. package/lib/build-info._auto-generated_.js +3 -2
  51. package/lib/build-info._auto-generated_.js.map +1 -1
  52. package/lib/constants.js.map +1 -1
  53. package/lib/context-db-migrations.js.map +1 -1
  54. package/lib/create-context.d.ts +2 -0
  55. package/lib/create-context.js +3 -0
  56. package/lib/create-context.js.map +1 -1
  57. package/lib/decorators/classes/controller-decorator.js.map +1 -1
  58. package/lib/decorators/classes/entity-decorator.js.map +1 -1
  59. package/lib/decorators/classes/migration-decorator.js.map +1 -1
  60. package/lib/decorators/classes/provider-decorator.js.map +1 -1
  61. package/lib/decorators/classes/repository-decorator.js.map +1 -1
  62. package/lib/decorators/classes/subscriber-decorator.js.map +1 -1
  63. package/lib/decorators/http/http-decorators.js.map +1 -1
  64. package/lib/decorators/http/http-methods-decorators.js.map +1 -1
  65. package/lib/decorators/http/http-params-decorators.js.map +1 -1
  66. package/lib/dependency-injection/di-container.js.map +1 -1
  67. package/lib/endpoint-context.d.ts +1 -0
  68. package/lib/endpoint-context.js +23 -3
  69. package/lib/endpoint-context.js.map +1 -1
  70. package/lib/entity-process.js.map +1 -1
  71. package/lib/env/env.angular-node-app.d.ts +50 -1
  72. package/lib/env/env.angular-node-app.js +52 -2
  73. package/lib/env/env.angular-node-app.js.map +1 -1
  74. package/lib/env/env.docs-webapp.d.ts +50 -1
  75. package/lib/env/env.docs-webapp.js +52 -2
  76. package/lib/env/env.docs-webapp.js.map +1 -1
  77. package/lib/env/env.electron-app.d.ts +50 -1
  78. package/lib/env/env.electron-app.js +52 -2
  79. package/lib/env/env.electron-app.js.map +1 -1
  80. package/lib/env/env.mobile-app.d.ts +50 -1
  81. package/lib/env/env.mobile-app.js +52 -2
  82. package/lib/env/env.mobile-app.js.map +1 -1
  83. package/lib/env/env.npm-lib-and-cli-tool.d.ts +50 -1
  84. package/lib/env/env.npm-lib-and-cli-tool.js +52 -2
  85. package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
  86. package/lib/env/env.vscode-plugin.d.ts +50 -1
  87. package/lib/env/env.vscode-plugin.js +52 -2
  88. package/lib/env/env.vscode-plugin.js.map +1 -1
  89. package/lib/env/index.js.map +1 -1
  90. package/lib/env.js.map +1 -1
  91. package/lib/formly/formly-group-wrapper-component.js.map +1 -1
  92. package/lib/formly/formly-repeat-component.js.map +1 -1
  93. package/lib/formly/formly.models.js.map +1 -1
  94. package/lib/formly/fromly.js.map +1 -1
  95. package/lib/formly/type-from-entity.js.map +1 -1
  96. package/lib/get-response-value.js.map +1 -1
  97. package/lib/helpers/class-helpers.js.map +1 -1
  98. package/lib/helpers/taon-helpers.js.map +1 -1
  99. package/lib/index._auto-generated_.js.map +1 -1
  100. package/lib/index.d.ts +3 -0
  101. package/lib/index.js +1 -0
  102. package/lib/index.js.map +1 -1
  103. package/lib/inject.js.map +1 -1
  104. package/lib/models.d.ts +1 -0
  105. package/lib/models.js.map +1 -1
  106. package/lib/orm.js.map +1 -1
  107. package/lib/realtime/realtime-client.js.map +1 -1
  108. package/lib/realtime/realtime-core.js.map +1 -1
  109. package/lib/realtime/realtime-server.js.map +1 -1
  110. package/lib/realtime/realtime-strategy/index.js.map +1 -1
  111. package/lib/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -1
  112. package/lib/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -1
  113. package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js.map +1 -1
  114. package/lib/realtime/realtime-strategy/realtime-strategy.js.map +1 -1
  115. package/lib/realtime/realtime-subs-manager.js.map +1 -1
  116. package/lib/realtime/realtime.models.js.map +1 -1
  117. package/lib/storage.js.map +1 -1
  118. package/lib/symbols.js.map +1 -1
  119. package/lib/ui/directives/index.js +2 -2
  120. package/lib/ui/directives/index.js.map +1 -1
  121. package/lib/ui/directives/view-mode.js.map +1 -1
  122. package/lib/ui/index.js +2 -2
  123. package/lib/ui/index.js.map +1 -1
  124. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  125. package/lib/ui/taon-admin-mode-configuration/index.js.map +1 -1
  126. package/lib/ui/taon-admin-mode-configuration/taon-admin.models.js.map +1 -1
  127. package/lib/ui/taon-github-fork-me-corner/index.js +2 -2
  128. package/lib/ui/taon-github-fork-me-corner/index.js.map +1 -1
  129. package/lib/ui/taon-github-fork-me-ribbon/index.js +2 -2
  130. package/lib/ui/taon-github-fork-me-ribbon/index.js.map +1 -1
  131. package/lib/ui/taon-notifications/index.js.map +1 -1
  132. package/lib/ui/taon-notifications/taon-notifications.models.js +2 -2
  133. package/lib/ui/taon-notifications/taon-notifications.models.js.map +1 -1
  134. package/lib/ui/taon-progress-bar/index.js +2 -2
  135. package/lib/ui/taon-progress-bar/index.js.map +1 -1
  136. package/lib/ui/taon-session-passcode/index.js +2 -2
  137. package/lib/ui/taon-session-passcode/index.js.map +1 -1
  138. package/lib/ui/taon-table/index.js +2 -2
  139. package/lib/ui/taon-table/index.js.map +1 -1
  140. package/lib/ui/taon.models.js.map +1 -1
  141. package/lib/validators.js.map +1 -1
  142. package/migrations/index.js.map +1 -1
  143. package/migrations/migrations_index._auto-generated_.js.map +1 -1
  144. package/old-app .js.map +1 -1
  145. package/package.json +1 -1
  146. package/playground.js.map +1 -1
  147. package/scss/vars.scss +2 -2
  148. package/tmp-environment.json +5 -12
  149. package/websql/README.md +24 -24
  150. package/websql/fesm2022/taon.mjs +29 -5
  151. package/websql/fesm2022/taon.mjs.map +1 -1
  152. package/websql/lib/base-classes/base-context.d.ts +1 -0
  153. package/websql/lib/base-classes/base.d.ts +1 -0
  154. package/websql/lib/create-context.d.ts +2 -0
  155. package/websql/lib/endpoint-context.d.ts +1 -0
  156. package/websql/lib/index.d.ts +3 -0
  157. package/websql/lib/models.d.ts +1 -0
  158. package/websql/package.json +1 -1
  159. package/client/package.json +0 -13
  160. package/lib/base-classes/base-repository copy.d.ts +0 -255
  161. package/lib/base-classes/base-repository copy.js +0 -653
  162. package/lib/base-classes/base-repository copy.js.map +0 -1
@@ -9,6 +9,7 @@ declare const BaseContext: {
9
9
  };
10
10
  readonly contexts: any;
11
11
  readonly contextName: string;
12
+ readonly appId: string;
12
13
  __ref(): Promise<import("taon/websql").EndpointContext>;
13
14
  readonly __refSync: import("taon/websql").EndpointContext;
14
15
  getClassInstance<T>(ctor: new (...args: any[]) => T): T;
@@ -33,6 +33,7 @@ export declare namespace Base {
33
33
  };
34
34
  readonly contexts: any;
35
35
  readonly contextName: string;
36
+ readonly appId: string;
36
37
  __ref(): Promise<import("taon/websql").EndpointContext>;
37
38
  readonly __refSync: import("taon/websql").EndpointContext;
38
39
  getClassInstance<T>(ctor: new (...args: any[]) => T): T;
@@ -11,6 +11,7 @@ export declare const createContextTemplate: <CTX extends Record<string, object>,
11
11
  };
12
12
  readonly contexts: any;
13
13
  readonly contextName: string;
14
+ readonly appId: string;
14
15
  /**
15
16
  * @deprecated
16
17
  * - get reference to internal context
@@ -52,6 +53,7 @@ export declare const createContext: <CTX extends Record<string, object>, CTRL ex
52
53
  };
53
54
  readonly contexts: any;
54
55
  readonly contextName: string;
56
+ readonly appId: string;
55
57
  /**
56
58
  * @deprecated
57
59
  * - get reference to internal context
@@ -111,6 +111,7 @@ export declare class EndpointContext {
111
111
  * ipc/udp needs this
112
112
  */
113
113
  get contextName(): string;
114
+ get appId(): string;
114
115
  get publicAssets(): {
115
116
  serverPath: string;
116
117
  locationOnDisk: string;
@@ -57,6 +57,7 @@ export declare namespace Taon {
57
57
  };
58
58
  readonly contexts: any;
59
59
  readonly contextName: string;
60
+ readonly appId: string;
60
61
  __ref(): Promise<endpointContext.EndpointContext>;
61
62
  readonly __refSync: endpointContext.EndpointContext;
62
63
  getClassInstance<T>(ctor: new (...args: any[]) => T): T;
@@ -82,6 +83,7 @@ export declare namespace Taon {
82
83
  };
83
84
  readonly contexts: any;
84
85
  readonly contextName: string;
86
+ readonly appId: string;
85
87
  __ref(): Promise<endpointContext.EndpointContext>;
86
88
  readonly __refSync: endpointContext.EndpointContext;
87
89
  getClassInstance<T>(ctor: new (...args: any[]) => T): T;
@@ -118,6 +120,7 @@ export declare namespace Taon {
118
120
  };
119
121
  readonly contexts: any;
120
122
  readonly contextName: string;
123
+ readonly appId: string;
121
124
  __ref(): Promise<endpointContext.EndpointContext>;
122
125
  readonly __refSync: endpointContext.EndpointContext;
123
126
  getClassInstance<T>(ctor: new (...args: any[]) => T): T;
@@ -83,6 +83,7 @@ export declare namespace Models {
83
83
  migrations?: boolean;
84
84
  };
85
85
  interface ContextOptions<CONTEXTS, CONTROLLERS, ENTITIES, REPOSITORIES, PROVIDERS, SUBSCRIBERS, MIGRATIONS> {
86
+ appId?: string;
86
87
  contextName: string;
87
88
  /**
88
89
  * host/port for initing backend server
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taon/websql",
3
- "version": "19.0.32",
3
+ "version": "19.0.35",
4
4
  "module": "fesm2022/taon.mjs",
5
5
  "typings": "index.d.ts",
6
6
  "exports": {
@@ -1,13 +0,0 @@
1
- {
2
- "name": "taon/client",
3
- "version": "19.0.32",
4
- "module": "fesm2022/taon.mjs",
5
- "typings": "index.d.ts",
6
- "exports": {
7
- ".": {
8
- "types": "./index.d.ts",
9
- "default": "./fesm2022/taon.mjs"
10
- }
11
- },
12
- "sideEffects": false
13
- }
@@ -1,255 +0,0 @@
1
- import type { FindManyOptions, FindOneOptions, FindOptionsWhere, InsertResult, Repository, SaveOptions, UpdateResult } from 'taon-typeorm';
2
- import type { QueryDeepPartialEntity } from 'taon-typeorm/lib/typeorm/query-builder/QueryPartialEntity';
3
- import type { UpsertOptions } from 'taon-typeorm/lib/typeorm/repository/UpsertOptions';
4
- import type { DataSource as DataSourceType } from 'taon-typeorm';
5
- import { MySqlQuerySource } from 'taon-type-sql';
6
- import { BaseInjector } from './base-injector';
7
- export declare abstract class BaseRepository<Entity extends {
8
- id?: any;
9
- }> extends BaseInjector {
10
- private __entityClassResolveFn;
11
- abstract entityClassResolveFn: () => any;
12
- constructor(__entityClassResolveFn: () => any);
13
- private __dbQuery;
14
- get dbQuery(): MySqlQuerySource;
15
- get connection(): DataSourceType;
16
- private __repository;
17
- protected get repository(): Repository<Entity>;
18
- /**
19
- * target for repository
20
- */
21
- get target(): Function;
22
- /**
23
- * alias to repository
24
- */
25
- protected get repo(): Repository<Entity>;
26
- get repositoryExists(): boolean;
27
- __init(context?: any): Promise<void>;
28
- /**
29
- * Checks if entity has an id.
30
- * If entity composite compose ids, it will check them all.
31
- */
32
- hasId(entity: Entity): boolean;
33
- /**
34
- * Gets entity mixed id.
35
- */
36
- getId(entity: Entity): any;
37
- /**
38
- Saves a given entity in the database.
39
- * If entity does not exist in the database then inserts, otherwise updates.
40
- */
41
- save(item: Entity, options?: SaveOptions & {
42
- reload: false;
43
- }): Promise<Entity>;
44
- /**
45
- * alias to save
46
- * -> it will actuall create new entity in db
47
- * in oposite to typeorm create method
48
- */
49
- create(item: Entity, options?: SaveOptions & {
50
- reload: false;
51
- }): Promise<Entity>;
52
- bulkSave(items: Entity[], options?: SaveOptions & {
53
- reload: false;
54
- }): Promise<Entity[]>;
55
- bulkCreate(items: Entity[], options?: SaveOptions & {
56
- reload: false;
57
- }): Promise<Entity[]>;
58
- /**
59
- * Saves all given entities in the database.
60
- * If entities do not exist in the database then inserts, otherwise updates.
61
- */
62
- /**
63
- * Merges multiple entities (or entity-like objects) into a given entity.
64
- */
65
- merge(mergeIntoEntity: Entity, ...entityLikes: Entity[]): Entity;
66
- /**
67
- * Creates a new entity from the given plain javascript object. If entity already exist in the database, then
68
- * it loads it (and everything related to it), replaces all values with the new ones from the given object
69
- * and returns this new entity. This new entity is actually a loaded from the db entity with all properties
70
- * replaced from the new object.
71
- *
72
- * Note that given entity-like object must have an entity id / primary key to find entity by.
73
- * Returns undefined if entity with given id was not found.
74
- */
75
- preload(entityLike: Entity): Promise<Entity | undefined>;
76
- /**
77
- * Removes a given entities from the database.
78
- */
79
- remove(idOrEntity: number | string | Entity): Promise<Entity>;
80
- /**
81
- * alias to remove
82
- */
83
- delete(idOrEntity: number | string | Entity): Promise<Entity>;
84
- /**
85
- * alias to removeById
86
- */
87
- deleteById(id: number | string): Promise<Entity>;
88
- bulkRemove(idsOrEntities: (number | string | Entity)[]): Promise<Entity[]>;
89
- bulkDelete(ids: (number | string | Entity)[]): Promise<Entity[]>;
90
- /**
91
- * Records the delete date of all given entities.
92
- */
93
- softRemove<T extends Entity>(entities: T[], options: SaveOptions & {
94
- reload: false;
95
- }): Promise<T[]>;
96
- /**
97
- * Records the delete date of all given entities.
98
- */
99
- softRemove<T extends Entity>(entities: T[], options?: SaveOptions): Promise<(T & Entity)[]>;
100
- /**
101
- * Records the delete date of a given entity.
102
- */
103
- softRemove<T extends Entity>(entity: T, options: SaveOptions & {
104
- reload: false;
105
- }): Promise<T>;
106
- /**
107
- * Recovers all given entities in the database.
108
- */
109
- recover<T extends Entity>(entities: T[], options: SaveOptions & {
110
- reload: false;
111
- }): Promise<T[]>;
112
- /**
113
- * Recovers all given entities in the database.
114
- */
115
- recover<T extends Entity>(entities: T[], options?: SaveOptions): Promise<(T & Entity)[]>;
116
- /**
117
- * Recovers a given entity in the database.
118
- */
119
- recover<T extends Entity>(entity: T, options: SaveOptions & {
120
- reload: false;
121
- }): Promise<T>;
122
- /**
123
- * Inserts a given entity into the database.
124
- * Unlike save method executes a primitive operation without cascades, relations and other operations included.
125
- * Executes fast and efficient INSERT query.
126
- * Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted.
127
- */
128
- insert(entity: QueryDeepPartialEntity<Entity> | QueryDeepPartialEntity<Entity>[]): Promise<InsertResult>;
129
- update(item: Entity): Promise<Entity>;
130
- private allowedTypesToUpdate;
131
- updateById<ENTITY = Entity>(id: number | string, item: Entity): Promise<ENTITY>;
132
- bulkUpdate(items: Entity[]): Promise<{
133
- models: any[];
134
- }>;
135
- /**
136
- * Inserts a given entity into the database, unless a unique constraint conflicts then updates the entity
137
- * Unlike save method executes a primitive operation without cascades, relations and other operations included.
138
- * Executes fast and efficient INSERT ... ON CONFLICT DO UPDATE/ON DUPLICATE KEY UPDATE query.
139
- */
140
- upsert(entityOrEntities: QueryDeepPartialEntity<Entity> | QueryDeepPartialEntity<Entity>[], conflictPathsOrOptions: string[] | UpsertOptions<Entity>): Promise<InsertResult>;
141
- /**
142
- * Records the delete date of entities by a given criteria.
143
- * Unlike save method executes a primitive operation without cascades, relations and other operations included.
144
- * Executes fast and efficient SOFT-DELETE query.
145
- * Does not check if entity exist in the database.
146
- */
147
- softDelete(criteria: string | string[] | number | number[] | Date | Date[] | FindOptionsWhere<Entity>): Promise<UpdateResult>;
148
- /**
149
- * Restores entities by a given criteria.
150
- * Unlike save method executes a primitive operation without cascades, relations and other operations included.
151
- * Executes fast and efficient SOFT-DELETE query.
152
- * Does not check if entity exist in the database.
153
- */
154
- restore(criteria: string | string[] | number | number[] | Date | Date[] | FindOptionsWhere<Entity>): Promise<UpdateResult>;
155
- /**
156
- * Counts entities that match given options.
157
- * Useful for pagination.
158
- */
159
- count(options?: FindManyOptions<Entity>): Promise<number>;
160
- /**
161
- * Counts entities that match given conditions.
162
- * Useful for pagination.
163
- */
164
- countBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<number>;
165
- /**
166
- * Finds entities that match given find options.
167
- */
168
- find(options?: FindManyOptions<Entity>): Promise<Entity[]>;
169
- /**
170
- * Finds entities that match given find options.
171
- */
172
- findBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<Entity[]>;
173
- /**
174
- * Finds entities that match given find options.
175
- * Also counts all entities that match given conditions,
176
- * but ignores pagination settings (from and take options).
177
- */
178
- findAndCount(options?: FindManyOptions<Entity>): Promise<[Entity[], number]>;
179
- /**
180
- * Finds entities that match given WHERE conditions.
181
- * Also counts all entities that match given conditions,
182
- * but ignores pagination settings (from and take options).
183
- */
184
- findAndCountBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<[Entity[], number]>;
185
- /**
186
- * Finds entities with ids.
187
- * Optionally find options or conditions can be applied.
188
- *
189
- * @deprecated use `findBy` method instead in conjunction with `In` operator, for example:
190
- *
191
- * .findBy({
192
- * id: In([1, 2, 3])
193
- * })
194
- */
195
- findByIds(ids: any[]): Promise<Entity[]>;
196
- /**
197
- * Finds first entity by a given find options.
198
- * If entity was not found in the database - returns null.
199
- */
200
- findOne(options: FindOneOptions<Entity>): Promise<Entity | null>;
201
- /**
202
- * Finds first entity that matches given where condition.
203
- * If entity was not found in the database - returns null.
204
- */
205
- findOneBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<Entity | null>;
206
- /**
207
- * Finds first entity that matches given id.
208
- * If entity was not found in the database - returns null.
209
- *
210
- * @deprecated use `findOneBy` method instead in conjunction with `In` operator, for example:
211
- *
212
- * .findOneBy({
213
- * id: 1 // where "id" is your primary column name
214
- * })
215
- */
216
- findOneById(id: number | string | Date): Promise<Entity | null>;
217
- /**
218
- * Finds first entity by a given find options.
219
- * If entity was not found in the database - rejects with error.
220
- */
221
- findOneOrFail(options: FindOneOptions<Entity>): Promise<Entity>;
222
- /**
223
- * Finds first entity that matches given where condition.
224
- * If entity was not found in the database - rejects with error.
225
- */
226
- findOneByOrFail(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<Entity>;
227
- /**
228
- * Executes a raw SQL query and returns a raw database results.
229
- * Raw query execution is supported only by relational databases (MongoDB is not supported).
230
- */
231
- query(query: string, parameters?: any[]): Promise<any>;
232
- /**
233
- * Clears all the data from the given table/collection (truncates/drops it).
234
- *
235
- * Note: this method uses TRUNCATE and may not work as you expect in transactions on some platforms.
236
- * @see https://stackoverflow.com/a/5972738/925151
237
- */
238
- clear(): Promise<void>;
239
- /**
240
- * Increments some column by provided value of the entities matched given conditions.
241
- */
242
- increment(conditions: FindOptionsWhere<Entity>, propertyPath: string, value: number | string): Promise<UpdateResult>;
243
- /**
244
- * Decrements some column by provided value of the entities matched given conditions.
245
- */
246
- decrement(conditions: FindOptionsWhere<Entity>, propertyPath: string, value: number | string): Promise<UpdateResult>;
247
- /**
248
- * @deprecated use findAndCount instead
249
- */
250
- getAll(): Promise<{
251
- models: Entity[];
252
- totalCount: number;
253
- }>;
254
- getBy(id: number | string): Promise<Entity>;
255
- }