Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/classes/Cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ queries (also, no implicit prewarming).

> **prewarm**(`randomizedDelayMs`, `onInitialPrewarm`?): `void`

Defined in: [src/abstract/Cluster.ts:299](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L299)
Defined in: [src/abstract/Cluster.ts:303](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L303)

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

> **globalShard**(): [`Shard`](Shard.md)\<`TClient`\>

Defined in: [src/abstract/Cluster.ts:330](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L330)
Defined in: [src/abstract/Cluster.ts:334](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L334)

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

> **nonGlobalShards**(): `Promise`\<readonly [`Shard`](Shard.md)\<`TClient`\>[]\>

Defined in: [src/abstract/Cluster.ts:337](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L337)
Defined in: [src/abstract/Cluster.ts:341](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L341)

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

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

> **shard**(`id`): [`Shard`](Shard.md)\<`TClient`\>

Defined in: [src/abstract/Cluster.ts:357](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L357)
Defined in: [src/abstract/Cluster.ts:361](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L361)

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

> **shardByNo**(`shardNo`): [`Shard`](Shard.md)\<`TClient`\>

Defined in: [src/abstract/Cluster.ts:372](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L372)
Defined in: [src/abstract/Cluster.ts:376](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L376)

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

> **randomShard**(`seed`?): `Promise`\<[`Shard`](Shard.md)\<`TClient`\>\>

Defined in: [src/abstract/Cluster.ts:380](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L380)
Defined in: [src/abstract/Cluster.ts:384](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L384)

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

> **island**(`islandNo`): `Promise`\<[`Island`](Island.md)\<`TClient`\>\>

Defined in: [src/abstract/Cluster.ts:404](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L404)
Defined in: [src/abstract/Cluster.ts:408](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L408)

Returns an Island by its number.

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

> **islands**(): `Promise`\<[`Island`](Island.md)\<`TClient`\>[]\>

Defined in: [src/abstract/Cluster.ts:415](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L415)
Defined in: [src/abstract/Cluster.ts:419](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L419)

Returns all Islands in the Cluster.

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

> **rediscover**(`what`?): `Promise`\<`void`\>

Defined in: [src/abstract/Cluster.ts:425](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L425)
Defined in: [src/abstract/Cluster.ts:429](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L429)

Triggers shards rediscovery and finishes as soon as it's done. To be used
in unit tests mostly, because in real life, it's enough to just modify the
Expand Down
17 changes: 10 additions & 7 deletions docs/classes/IDsCache.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: `abstract` IDsCache

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

## Extended by

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

### has()

> **has**(`id`): `boolean`
> **has**(`Ent`, `id`): `boolean`

Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L6)
Defined in: [src/ent/IDsCache.ts:13](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L13)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `Ent` | `EntClassAlike` |
| `id` | `string` |

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

### add()

> **add**(`id`, `value`): `void`
> **add**(`Ent`, `id`, `value`): `void`

Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L10)
Defined in: [src/ent/IDsCache.ts:17](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L17)

#### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `Ent` | `EntClassAlike` | `undefined` |
| `id` | `string` | `undefined` |
| `value` | `boolean` | `true` |

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

### get()

> **get**(`id`): `undefined` \| `boolean`
> **get**(`Ent`, `id`): `undefined` \| `boolean`

Defined in: [src/ent/IDsCache.ts:14](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L14)
Defined in: [src/ent/IDsCache.ts:21](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L21)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `Ent` | `EntClassAlike` |
| `id` | `string` |

#### Returns
Expand Down
15 changes: 9 additions & 6 deletions docs/classes/IDsCacheCanReadIncomingEdge.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ Defined in: [src/ent/predicates/Predicate.ts:49](https://github.com/clickup/ent-

### has()

> **has**(`id`): `boolean`
> **has**(`Ent`, `id`): `boolean`

Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L6)
Defined in: [src/ent/IDsCache.ts:13](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L13)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `Ent` | `EntClassAlike` |
| `id` | `string` |

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

### add()

> **add**(`id`, `value`): `void`
> **add**(`Ent`, `id`, `value`): `void`

Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L10)
Defined in: [src/ent/IDsCache.ts:17](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L17)

#### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `Ent` | `EntClassAlike` | `undefined` |
| `id` | `string` | `undefined` |
| `value` | `boolean` | `true` |

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

### get()

> **get**(`id`): `undefined` \| `boolean`
> **get**(`Ent`, `id`): `undefined` \| `boolean`

Defined in: [src/ent/IDsCache.ts:14](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L14)
Defined in: [src/ent/IDsCache.ts:21](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L21)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `Ent` | `EntClassAlike` |
| `id` | `string` |

#### Returns
Expand Down
15 changes: 9 additions & 6 deletions docs/classes/IDsCacheDeletable.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ Defined in: [src/ent/predicates/Predicate.ts:48](https://github.com/clickup/ent-

### has()

> **has**(`id`): `boolean`
> **has**(`Ent`, `id`): `boolean`

Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L6)
Defined in: [src/ent/IDsCache.ts:13](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L13)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `Ent` | `EntClassAlike` |
| `id` | `string` |

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

### add()

> **add**(`id`, `value`): `void`
> **add**(`Ent`, `id`, `value`): `void`

Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L10)
Defined in: [src/ent/IDsCache.ts:17](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L17)

#### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `Ent` | `EntClassAlike` | `undefined` |
| `id` | `string` | `undefined` |
| `value` | `boolean` | `true` |

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

### get()

> **get**(`id`): `undefined` \| `boolean`
> **get**(`Ent`, `id`): `undefined` \| `boolean`

Defined in: [src/ent/IDsCache.ts:14](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L14)
Defined in: [src/ent/IDsCache.ts:21](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L21)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `Ent` | `EntClassAlike` |
| `id` | `string` |

#### Returns
Expand Down
15 changes: 9 additions & 6 deletions docs/classes/IDsCacheReadable.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ Defined in: [src/ent/predicates/Predicate.ts:46](https://github.com/clickup/ent-

### has()

> **has**(`id`): `boolean`
> **has**(`Ent`, `id`): `boolean`

Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L6)
Defined in: [src/ent/IDsCache.ts:13](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L13)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `Ent` | `EntClassAlike` |
| `id` | `string` |

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

### add()

> **add**(`id`, `value`): `void`
> **add**(`Ent`, `id`, `value`): `void`

Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L10)
Defined in: [src/ent/IDsCache.ts:17](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L17)

#### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `Ent` | `EntClassAlike` | `undefined` |
| `id` | `string` | `undefined` |
| `value` | `boolean` | `true` |

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

### get()

> **get**(`id`): `undefined` \| `boolean`
> **get**(`Ent`, `id`): `undefined` \| `boolean`

Defined in: [src/ent/IDsCache.ts:14](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L14)
Defined in: [src/ent/IDsCache.ts:21](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L21)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `Ent` | `EntClassAlike` |
| `id` | `string` |

#### Returns
Expand Down
15 changes: 9 additions & 6 deletions docs/classes/IDsCacheUpdatable.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ Defined in: [src/ent/predicates/Predicate.ts:47](https://github.com/clickup/ent-

### has()

> **has**(`id`): `boolean`
> **has**(`Ent`, `id`): `boolean`

Defined in: [src/ent/IDsCache.ts:6](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L6)
Defined in: [src/ent/IDsCache.ts:13](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L13)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `Ent` | `EntClassAlike` |
| `id` | `string` |

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

### add()

> **add**(`id`, `value`): `void`
> **add**(`Ent`, `id`, `value`): `void`

Defined in: [src/ent/IDsCache.ts:10](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L10)
Defined in: [src/ent/IDsCache.ts:17](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L17)

#### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `Ent` | `EntClassAlike` | `undefined` |
| `id` | `string` | `undefined` |
| `value` | `boolean` | `true` |

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

### get()

> **get**(`id`): `undefined` \| `boolean`
> **get**(`Ent`, `id`): `undefined` \| `boolean`

Defined in: [src/ent/IDsCache.ts:14](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L14)
Defined in: [src/ent/IDsCache.ts:21](https://github.com/clickup/ent-framework/blob/master/src/ent/IDsCache.ts#L21)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `Ent` | `EntClassAlike` |
| `id` | `string` |

#### Returns
Expand Down
4 changes: 2 additions & 2 deletions docs/classes/PgClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ database-agnostic Client API.

> **acquireConn**(`subPoolConfig`?): `Promise`\<[`PgClientConn`](../interfaces/PgClientConn.md)\<`TPool`\>\>

Defined in: [src/pg/PgClient.ts:489](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClient.ts#L489)
Defined in: [src/pg/PgClient.ts:492](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClient.ts#L492)

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

> **query**\<`TRow`\>(`__namedParameters`): `Promise`\<`TRow`[]\>

Defined in: [src/pg/PgClient.ts:513](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClient.ts#L513)
Defined in: [src/pg/PgClient.ts:516](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClient.ts#L516)

Sends a query (internally, a multi-query) through the default Pool (if
subPoolConfig is not passed), or through a named sub-pool (see pool()
Expand Down
3 changes: 1 addition & 2 deletions docs/classes/PgSchema.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ too limited in the queries the DB engine can execute.

> **new PgSchema**\<`TTable`, `TUniqueKey`\>(`name`, `table`, `uniqueKey`): [`PgSchema`](PgSchema.md)\<`TTable`, `TUniqueKey`\>

Defined in: [src/abstract/Schema.ts:119](https://github.com/clickup/ent-framework/blob/master/src/abstract/Schema.ts#L119)
Defined in: [src/abstract/Schema.ts:116](https://github.com/clickup/ent-framework/blob/master/src/abstract/Schema.ts#L116)

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,
Expand All @@ -61,7 +61,6 @@ x.constructor is Function).

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="hash"></a> `hash` | `string` | - |
| <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). |
| <a id="name-1"></a> `name` | `string` | For relational databases, it's likely a table name. |
| <a id="table-1"></a> `table` | `TTable` | Structure of the table. |
Expand Down
Loading