Skip to content

Commit d4cb1ba

Browse files
committed
v2.25.1: Add clientConnectedLogger; fix privacy cache issue when dealing with Ent slices; add VC#withoutFlavor()
1 parent cbace5a commit d4cb1ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+478
-130
lines changed

docs/classes/Cluster.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ queries (also, no implicit prewarming).
5757

5858
> **prewarm**(`randomizedDelayMs`, `onInitialPrewarm`?): `void`
5959
60-
Defined in: [src/abstract/Cluster.ts:299](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L299)
60+
Defined in: [src/abstract/Cluster.ts:303](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L303)
6161

6262
Signals the Cluster to keep the Clients pre-warmed, e.g. open. (It's up to
6363
the particular Client's implementation, what does a "pre-warmed Client"
@@ -87,7 +87,7 @@ pgbouncer or when DB is accessed over SSL).
8787

8888
> **globalShard**(): [`Shard`](Shard.md)\<`TClient`\>
8989
90-
Defined in: [src/abstract/Cluster.ts:330](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L330)
90+
Defined in: [src/abstract/Cluster.ts:334](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L334)
9191

9292
Returns a global Shard of the Cluster. This method is made synchronous
9393
intentionally, to defer the I/O and possible errors to the moment of the
@@ -103,7 +103,7 @@ actual query.
103103

104104
> **nonGlobalShards**(): `Promise`\<readonly [`Shard`](Shard.md)\<`TClient`\>[]\>
105105
106-
Defined in: [src/abstract/Cluster.ts:337](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L337)
106+
Defined in: [src/abstract/Cluster.ts:341](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L341)
107107

108108
Returns all currently known (discovered) non-global Shards in the Cluster.
109109

@@ -117,7 +117,7 @@ Returns all currently known (discovered) non-global Shards in the Cluster.
117117

118118
> **shard**(`id`): [`Shard`](Shard.md)\<`TClient`\>
119119
120-
Defined in: [src/abstract/Cluster.ts:357](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L357)
120+
Defined in: [src/abstract/Cluster.ts:361](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L361)
121121

122122
Returns Shard of a particular id. This method is made synchronous
123123
intentionally, to defer the I/O and possible errors to the moment of the
@@ -149,7 +149,7 @@ the query), no matter whether it was an immediate call or a deferred one.
149149

150150
> **shardByNo**(`shardNo`): [`Shard`](Shard.md)\<`TClient`\>
151151
152-
Defined in: [src/abstract/Cluster.ts:372](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L372)
152+
Defined in: [src/abstract/Cluster.ts:376](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L376)
153153

154154
Returns a Shard if we know its number. The idea: for each Shard number
155155
(even for non-discovered yet Shards), we keep the corresponding Shard
@@ -174,7 +174,7 @@ Shard hasn't been discovered actually).
174174

175175
> **randomShard**(`seed`?): `Promise`\<[`Shard`](Shard.md)\<`TClient`\>\>
176176
177-
Defined in: [src/abstract/Cluster.ts:380](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L380)
177+
Defined in: [src/abstract/Cluster.ts:384](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L384)
178178

179179
Returns a random Shard among the ones which are currently known
180180
(discovered) in the Cluster.
@@ -195,7 +195,7 @@ Returns a random Shard among the ones which are currently known
195195

196196
> **island**(`islandNo`): `Promise`\<[`Island`](Island.md)\<`TClient`\>\>
197197
198-
Defined in: [src/abstract/Cluster.ts:404](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L404)
198+
Defined in: [src/abstract/Cluster.ts:408](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L408)
199199

200200
Returns an Island by its number.
201201

@@ -215,7 +215,7 @@ Returns an Island by its number.
215215

216216
> **islands**(): `Promise`\<[`Island`](Island.md)\<`TClient`\>[]\>
217217
218-
Defined in: [src/abstract/Cluster.ts:415](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L415)
218+
Defined in: [src/abstract/Cluster.ts:419](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L419)
219219

220220
Returns all Islands in the Cluster.
221221

@@ -229,7 +229,7 @@ Returns all Islands in the Cluster.
229229

230230
> **rediscover**(`what`?): `Promise`\<`void`\>
231231
232-
Defined in: [src/abstract/Cluster.ts:425](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L425)
232+
Defined in: [src/abstract/Cluster.ts:429](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L429)
233233

234234
Triggers shards rediscovery and finishes as soon as it's done. To be used
235235
in unit tests mostly, because in real life, it's enough to just modify the

docs/classes/IDsCache.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Class: `abstract` IDsCache
88

9-
Defined in: [src/ent/IDsCache.ts:3](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L3)
9+
Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L10)
1010

1111
## Extended by
1212

@@ -29,14 +29,15 @@ Defined in: [src/ent/IDsCache.ts:3](https://github.com/clickup/ent-framework/blo
2929

3030
### has()
3131

32-
> **has**(`id`): `boolean`
32+
> **has**(`Ent`, `id`): `boolean`
3333
34-
Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L6)
34+
Defined in: [src/ent/IDsCache.ts:13](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L13)
3535

3636
#### Parameters
3737

3838
| Parameter | Type |
3939
| ------ | ------ |
40+
| `Ent` | `EntClassAlike` |
4041
| `id` | `string` |
4142

4243
#### Returns
@@ -47,14 +48,15 @@ Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blo
4748

4849
### add()
4950

50-
> **add**(`id`, `value`): `void`
51+
> **add**(`Ent`, `id`, `value`): `void`
5152
52-
Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L10)
53+
Defined in: [src/ent/IDsCache.ts:17](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L17)
5354

5455
#### Parameters
5556

5657
| Parameter | Type | Default value |
5758
| ------ | ------ | ------ |
59+
| `Ent` | `EntClassAlike` | `undefined` |
5860
| `id` | `string` | `undefined` |
5961
| `value` | `boolean` | `true` |
6062

@@ -66,14 +68,15 @@ Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/bl
6668

6769
### get()
6870

69-
> **get**(`id`): `undefined` \| `boolean`
71+
> **get**(`Ent`, `id`): `undefined` \| `boolean`
7072
71-
Defined in: [src/ent/IDsCache.ts:14](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L14)
73+
Defined in: [src/ent/IDsCache.ts:21](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L21)
7274

7375
#### Parameters
7476

7577
| Parameter | Type |
7678
| ------ | ------ |
79+
| `Ent` | `EntClassAlike` |
7780
| `id` | `string` |
7881

7982
#### Returns

docs/classes/IDsCacheCanReadIncomingEdge.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ Defined in: [src/ent/predicates/Predicate.ts:49](https://github.com/clickup/ent-
3030

3131
### has()
3232

33-
> **has**(`id`): `boolean`
33+
> **has**(`Ent`, `id`): `boolean`
3434
35-
Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L6)
35+
Defined in: [src/ent/IDsCache.ts:13](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L13)
3636

3737
#### Parameters
3838

3939
| Parameter | Type |
4040
| ------ | ------ |
41+
| `Ent` | `EntClassAlike` |
4142
| `id` | `string` |
4243

4344
#### Returns
@@ -52,14 +53,15 @@ Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blo
5253

5354
### add()
5455

55-
> **add**(`id`, `value`): `void`
56+
> **add**(`Ent`, `id`, `value`): `void`
5657
57-
Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L10)
58+
Defined in: [src/ent/IDsCache.ts:17](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L17)
5859

5960
#### Parameters
6061

6162
| Parameter | Type | Default value |
6263
| ------ | ------ | ------ |
64+
| `Ent` | `EntClassAlike` | `undefined` |
6365
| `id` | `string` | `undefined` |
6466
| `value` | `boolean` | `true` |
6567

@@ -75,14 +77,15 @@ Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/bl
7577

7678
### get()
7779

78-
> **get**(`id`): `undefined` \| `boolean`
80+
> **get**(`Ent`, `id`): `undefined` \| `boolean`
7981
80-
Defined in: [src/ent/IDsCache.ts:14](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L14)
82+
Defined in: [src/ent/IDsCache.ts:21](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L21)
8183

8284
#### Parameters
8385

8486
| Parameter | Type |
8587
| ------ | ------ |
88+
| `Ent` | `EntClassAlike` |
8689
| `id` | `string` |
8790

8891
#### Returns

docs/classes/IDsCacheDeletable.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ Defined in: [src/ent/predicates/Predicate.ts:48](https://github.com/clickup/ent-
3030

3131
### has()
3232

33-
> **has**(`id`): `boolean`
33+
> **has**(`Ent`, `id`): `boolean`
3434
35-
Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L6)
35+
Defined in: [src/ent/IDsCache.ts:13](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L13)
3636

3737
#### Parameters
3838

3939
| Parameter | Type |
4040
| ------ | ------ |
41+
| `Ent` | `EntClassAlike` |
4142
| `id` | `string` |
4243

4344
#### Returns
@@ -52,14 +53,15 @@ Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blo
5253

5354
### add()
5455

55-
> **add**(`id`, `value`): `void`
56+
> **add**(`Ent`, `id`, `value`): `void`
5657
57-
Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L10)
58+
Defined in: [src/ent/IDsCache.ts:17](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L17)
5859

5960
#### Parameters
6061

6162
| Parameter | Type | Default value |
6263
| ------ | ------ | ------ |
64+
| `Ent` | `EntClassAlike` | `undefined` |
6365
| `id` | `string` | `undefined` |
6466
| `value` | `boolean` | `true` |
6567

@@ -75,14 +77,15 @@ Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/bl
7577

7678
### get()
7779

78-
> **get**(`id`): `undefined` \| `boolean`
80+
> **get**(`Ent`, `id`): `undefined` \| `boolean`
7981
80-
Defined in: [src/ent/IDsCache.ts:14](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L14)
82+
Defined in: [src/ent/IDsCache.ts:21](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L21)
8183

8284
#### Parameters
8385

8486
| Parameter | Type |
8587
| ------ | ------ |
88+
| `Ent` | `EntClassAlike` |
8689
| `id` | `string` |
8790

8891
#### Returns

docs/classes/IDsCacheReadable.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ Defined in: [src/ent/predicates/Predicate.ts:46](https://github.com/clickup/ent-
3030

3131
### has()
3232

33-
> **has**(`id`): `boolean`
33+
> **has**(`Ent`, `id`): `boolean`
3434
35-
Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L6)
35+
Defined in: [src/ent/IDsCache.ts:13](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L13)
3636

3737
#### Parameters
3838

3939
| Parameter | Type |
4040
| ------ | ------ |
41+
| `Ent` | `EntClassAlike` |
4142
| `id` | `string` |
4243

4344
#### Returns
@@ -52,14 +53,15 @@ Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blo
5253

5354
### add()
5455

55-
> **add**(`id`, `value`): `void`
56+
> **add**(`Ent`, `id`, `value`): `void`
5657
57-
Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L10)
58+
Defined in: [src/ent/IDsCache.ts:17](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L17)
5859

5960
#### Parameters
6061

6162
| Parameter | Type | Default value |
6263
| ------ | ------ | ------ |
64+
| `Ent` | `EntClassAlike` | `undefined` |
6365
| `id` | `string` | `undefined` |
6466
| `value` | `boolean` | `true` |
6567

@@ -75,14 +77,15 @@ Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/bl
7577

7678
### get()
7779

78-
> **get**(`id`): `undefined` \| `boolean`
80+
> **get**(`Ent`, `id`): `undefined` \| `boolean`
7981
80-
Defined in: [src/ent/IDsCache.ts:14](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L14)
82+
Defined in: [src/ent/IDsCache.ts:21](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L21)
8183

8284
#### Parameters
8385

8486
| Parameter | Type |
8587
| ------ | ------ |
88+
| `Ent` | `EntClassAlike` |
8689
| `id` | `string` |
8790

8891
#### Returns

docs/classes/IDsCacheUpdatable.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ Defined in: [src/ent/predicates/Predicate.ts:47](https://github.com/clickup/ent-
3030

3131
### has()
3232

33-
> **has**(`id`): `boolean`
33+
> **has**(`Ent`, `id`): `boolean`
3434
35-
Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L6)
35+
Defined in: [src/ent/IDsCache.ts:13](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L13)
3636

3737
#### Parameters
3838

3939
| Parameter | Type |
4040
| ------ | ------ |
41+
| `Ent` | `EntClassAlike` |
4142
| `id` | `string` |
4243

4344
#### Returns
@@ -52,14 +53,15 @@ Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blo
5253

5354
### add()
5455

55-
> **add**(`id`, `value`): `void`
56+
> **add**(`Ent`, `id`, `value`): `void`
5657
57-
Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L10)
58+
Defined in: [src/ent/IDsCache.ts:17](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L17)
5859

5960
#### Parameters
6061

6162
| Parameter | Type | Default value |
6263
| ------ | ------ | ------ |
64+
| `Ent` | `EntClassAlike` | `undefined` |
6365
| `id` | `string` | `undefined` |
6466
| `value` | `boolean` | `true` |
6567

@@ -75,14 +77,15 @@ Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/bl
7577

7678
### get()
7779

78-
> **get**(`id`): `undefined` \| `boolean`
80+
> **get**(`Ent`, `id`): `undefined` \| `boolean`
7981
80-
Defined in: [src/ent/IDsCache.ts:14](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L14)
82+
Defined in: [src/ent/IDsCache.ts:21](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L21)
8183

8284
#### Parameters
8385

8486
| Parameter | Type |
8587
| ------ | ------ |
88+
| `Ent` | `EntClassAlike` |
8689
| `id` | `string` |
8790

8891
#### Returns

docs/classes/PgClient.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ database-agnostic Client API.
364364

365365
> **acquireConn**(`subPoolConfig`?): `Promise`\<[`PgClientConn`](../interfaces/PgClientConn.md)\<`TPool`\>\>
366366
367-
Defined in: [src/pg/PgClient.ts:489](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClient.ts#L489)
367+
Defined in: [src/pg/PgClient.ts:492](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClient.ts#L492)
368368

369369
Called when the Client needs a connection in the default pool (when
370370
subPoolConfig is not passed), or in a sub-pool (see pool() method) to run a
@@ -392,7 +392,7 @@ database-agnostic Client API.
392392

393393
> **query**\<`TRow`\>(`__namedParameters`): `Promise`\<`TRow`[]\>
394394
395-
Defined in: [src/pg/PgClient.ts:513](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClient.ts#L513)
395+
Defined in: [src/pg/PgClient.ts:516](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClient.ts#L516)
396396

397397
Sends a query (internally, a multi-query) through the default Pool (if
398398
subPoolConfig is not passed), or through a named sub-pool (see pool()

docs/classes/PgSchema.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ too limited in the queries the DB engine can execute.
3535

3636
> **new PgSchema**\<`TTable`, `TUniqueKey`\>(`name`, `table`, `uniqueKey`): [`PgSchema`](PgSchema.md)\<`TTable`, `TUniqueKey`\>
3737
38-
Defined in: [src/abstract/Schema.ts:119](https://github.com/clickup/ent-framework/blob/master/src/abstract/Schema.ts#L119)
38+
Defined in: [src/abstract/Schema.ts:116](https://github.com/clickup/ent-framework/blob/master/src/abstract/Schema.ts#L116)
3939

4040
Used in e.g. inverses. This casts this.constructor to SchemaClass with all
4141
static methods and `new` semantic (TS doesn't do it by default; for TS,
@@ -61,7 +61,6 @@ x.constructor is Function).
6161

6262
| Property | Type | Description |
6363
| ------ | ------ | ------ |
64-
| <a id="hash"></a> `hash` | `string` | - |
6564
| <a id="constructor"></a> `constructor` | [`SchemaClass`](../interfaces/SchemaClass.md) | Used in e.g. inverses. This casts this.constructor to SchemaClass with all static methods and `new` semantic (TS doesn't do it by default; for TS, x.constructor is Function). |
6665
| <a id="name-1"></a> `name` | `string` | For relational databases, it's likely a table name. |
6766
| <a id="table-1"></a> `table` | `TTable` | Structure of the table. |

0 commit comments

Comments
 (0)