From 9efa9a2900f75cbdb94ee9c4ae52e143cdf0b3b0 Mon Sep 17 00:00:00 2001 From: Dimi Kot Date: Mon, 16 Dec 2024 01:17:02 -0800 Subject: [PATCH] Upgrade TypeDoc --- .github/workflows/semgrep.yml | 36 -------- docs/README.md | 2 +- docs/classes/AllowIf.md | 2 +- docs/classes/Batcher.md | 2 +- docs/classes/CanDeleteOutgoingEdge.md | 2 +- docs/classes/CanReadOutgoingEdge.md | 2 +- docs/classes/CanUpdateOutgoingEdge.md | 2 +- docs/classes/Client.md | 2 +- docs/classes/ClientError.md | 2 +- docs/classes/Cluster.md | 38 +++++--- docs/classes/Configuration.md | 6 +- docs/classes/DenyIf.md | 2 +- docs/classes/EntAccessError.md | 2 +- docs/classes/EntNotFoundError.md | 2 +- docs/classes/EntNotInsertableError.md | 2 +- docs/classes/EntNotReadableError.md | 2 +- docs/classes/EntNotUpdatableError.md | 2 +- docs/classes/EntUniqueKeyError.md | 2 +- docs/classes/EntValidationError.md | 2 +- docs/classes/FieldIs.md | 2 +- docs/classes/FuncToPredicate.md | 2 +- docs/classes/IDsCache.md | 2 +- docs/classes/IDsCacheCanReadIncomingEdge.md | 2 +- docs/classes/IDsCacheDeletable.md | 2 +- docs/classes/IDsCacheReadable.md | 2 +- docs/classes/IDsCacheUpdatable.md | 2 +- docs/classes/IncomingEdgeFromVCExists.md | 4 +- docs/classes/Inverse.md | 4 +- docs/classes/Island.md | 2 +- docs/classes/Loader.md | 2 +- docs/classes/LocalCache.md | 8 +- docs/classes/Or.md | 2 +- docs/classes/OutgoingEdgePointsToVC.md | 2 +- docs/classes/PgClient.md | 4 +- docs/classes/PgClientPool.md | 20 ++--- docs/classes/PgError.md | 4 +- docs/classes/PgQueryCount.md | 2 +- docs/classes/PgQueryDelete.md | 2 +- docs/classes/PgQueryDeleteWhere.md | 2 +- docs/classes/PgQueryExists.md | 2 +- docs/classes/PgQueryIDGen.md | 2 +- docs/classes/PgQueryInsert.md | 2 +- docs/classes/PgQueryLoad.md | 2 +- docs/classes/PgQueryLoadBy.md | 2 +- docs/classes/PgQuerySelect.md | 2 +- docs/classes/PgQuerySelectBy.md | 2 +- docs/classes/PgQueryUpdate.md | 2 +- docs/classes/PgQueryUpsert.md | 2 +- docs/classes/PgRunner.md | 26 +++--- docs/classes/PgSchema.md | 2 +- docs/classes/QueryBase.md | 2 +- docs/classes/QueryCache.md | 25 +++--- docs/classes/QueryPing.md | 2 +- docs/classes/Require.md | 2 +- docs/classes/Rule.md | 2 +- docs/classes/Runner.md | 2 +- docs/classes/Schema.md | 2 +- docs/classes/Shard.md | 2 +- docs/classes/ShardError.md | 2 +- docs/classes/ShardLocator.md | 4 +- docs/classes/Timeline.md | 4 +- docs/classes/TimelineManager.md | 2 +- docs/classes/ToolPing.md | 2 +- docs/classes/ToolScoreboard.md | 12 +-- docs/classes/Triggers.md | 2 +- docs/classes/True.md | 2 +- docs/classes/VC.md | 17 ++-- docs/classes/VCCaches.md | 2 +- docs/classes/VCFlavor.md | 2 +- docs/classes/VCHasFlavor.md | 2 +- docs/classes/VCTrace.md | 22 ++++- docs/classes/VCWithQueryCache.md | 4 +- docs/classes/VCWithStacks.md | 2 +- docs/classes/Validation.md | 2 +- docs/functions/BaseEnt.md | 2 +- docs/functions/CacheMixin.md | 4 +- docs/functions/ConfigMixin.md | 2 +- docs/functions/HelpersMixin.md | 2 +- docs/functions/PrimitiveMixin.md | 2 +- docs/functions/buildShape.md | 2 +- docs/functions/buildUpdateNewRow.md | 32 ------- docs/functions/default.md | 17 ---- docs/functions/escapeIdent.md | 2 +- docs/functions/escapeLiteral.md | 2 +- docs/functions/evaluate.md | 18 +--- docs/functions/isBigintStr.md | 2 +- docs/globals.md | 4 +- docs/interfaces/ClientConnectionIssue.md | 2 +- docs/interfaces/ClientOptions.md | 2 +- docs/interfaces/ClientPingInput.md | 2 +- docs/interfaces/ClientQueryLoggerProps.md | 2 +- docs/interfaces/ClusterOptions.md | 3 +- docs/interfaces/ConfigClass.md | 2 +- docs/interfaces/ConfigInstance.md | 2 +- docs/interfaces/Ent.md | 2 +- docs/interfaces/EntClass.md | 4 +- docs/interfaces/EntValidationErrorInfo.md | 2 +- docs/interfaces/Handler.md | 2 +- docs/interfaces/HelpersClass.md | 2 +- docs/interfaces/HelpersInstance.md | 2 +- docs/interfaces/IslandOptions.md | 4 +- docs/interfaces/LocalCacheOptions.md | 2 +- .../LocateIslandErrorLoggerProps.md | 2 +- docs/interfaces/Loggers.md | 2 +- docs/interfaces/PgClientConn.md | 2 +- docs/interfaces/PgClientOptions.md | 4 +- docs/interfaces/PgClientPoolOptions.md | 8 +- docs/interfaces/Predicate.md | 2 +- docs/interfaces/PrimitiveInstance.md | 2 +- docs/interfaces/Query.md | 2 +- docs/interfaces/QueryAnnotation.md | 2 +- docs/interfaces/RuleResult.md | 2 +- docs/interfaces/SchemaClass.md | 2 +- docs/interfaces/SwallowedErrorLoggerProps.md | 2 +- docs/interfaces/ToolPingOptions.md | 2 +- docs/interfaces/ToolScoreboardOptions.md | 2 +- docs/type-aliases/AfterMutationTrigger.md | 4 +- docs/type-aliases/AfterUpdateTrigger.md | 4 +- docs/type-aliases/AnyClass.md | 4 +- docs/type-aliases/BeforeMutationTrigger.md | 4 +- docs/type-aliases/BeforeUpdateTrigger.md | 4 +- docs/type-aliases/ClientErrorKind.md | 2 +- docs/type-aliases/ClientErrorPostAction.md | 2 +- docs/type-aliases/ClientRole.md | 2 +- docs/type-aliases/CountInput.md | 2 +- docs/type-aliases/DeleteTrigger.md | 4 +- docs/type-aliases/DeleteWhereInput.md | 2 +- docs/type-aliases/DepsBuilder.md | 2 +- docs/type-aliases/ExistsInput.md | 2 +- docs/type-aliases/Field.md | 2 +- docs/type-aliases/FieldAliased.md | 4 +- docs/type-aliases/FieldOfIDType.md | 4 +- docs/type-aliases/FieldOfIDTypeRequired.md | 2 +- .../type-aliases/FieldOfPotentialUniqueKey.md | 4 +- docs/type-aliases/InsertFieldsOptional.md | 4 +- docs/type-aliases/InsertFieldsRequired.md | 4 +- docs/type-aliases/InsertInput.md | 2 +- docs/type-aliases/InsertTrigger.md | 4 +- docs/type-aliases/Literal.md | 2 +- docs/type-aliases/LoadByInput.md | 2 +- docs/type-aliases/LoadRule.md | 2 +- docs/type-aliases/Order.md | 2 +- docs/type-aliases/PrimitiveClass.md | 2 +- docs/type-aliases/Row.md | 2 +- docs/type-aliases/RowWithID.md | 2 +- docs/type-aliases/RuleDecision.md | 2 +- docs/type-aliases/SelectByInput.md | 2 +- docs/type-aliases/SelectInput.md | 2 +- docs/type-aliases/SelectInputCustom.md | 4 +- docs/type-aliases/ShardAffinity.md | 2 +- docs/type-aliases/Spec.md | 2 +- docs/type-aliases/SpecType.md | 86 ++++++++++++++++++- docs/type-aliases/Table.md | 2 +- docs/type-aliases/TimelineCaughtUpReason.md | 2 +- docs/type-aliases/TriggerInsertInput.md | 2 +- docs/type-aliases/TriggerUpdateInput.md | 2 +- docs/type-aliases/TriggerUpdateNewRow.md | 2 +- .../TriggerUpdateOrDeleteOldRow.md | 2 +- docs/type-aliases/UniqueKey.md | 2 +- docs/type-aliases/UpdateField.md | 2 +- docs/type-aliases/UpdateInput.md | 2 +- docs/type-aliases/UpdateOriginalInput.md | 2 +- docs/type-aliases/ValidationRules.md | 2 +- docs/type-aliases/Value.md | 2 +- docs/type-aliases/ValueRequired.md | 2 +- docs/type-aliases/Where.md | 4 +- docs/type-aliases/WhyClient.md | 2 +- docs/type-aliases/WriteRules.md | 2 +- docs/variables/GLOBAL_SHARD.md | 2 +- docs/variables/GUEST_ID.md | 2 +- docs/variables/ID.md | 2 +- docs/variables/MASTER.md | 2 +- docs/variables/OMNI_ID.md | 2 +- docs/variables/STALE_REPLICA.md | 2 +- package.json | 6 +- src/ent/Triggers.ts | 1 + typedoc.config.js | 7 +- 177 files changed, 392 insertions(+), 364 deletions(-) delete mode 100644 .github/workflows/semgrep.yml delete mode 100644 docs/functions/buildUpdateNewRow.md delete mode 100644 docs/functions/default.md diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml deleted file mode 100644 index eda07d1..0000000 --- a/.github/workflows/semgrep.yml +++ /dev/null @@ -1,36 +0,0 @@ -# Name of this GitHub Actions workflow. -name: Semgrep - -on: - # Scan changed files in PRs (diff-aware scanning): - pull_request: - branches: ['main'] - - # Schedule the CI job (this method uses cron syntax): - schedule: - - cron: '0 0 * * MON-FRI' - -jobs: - semgrep: - # User definable name of this GitHub Actions job. - name: Scan - # If you are self-hosting, change the following `runs-on` value: - runs-on: ubuntu-latest - - container: - # A Docker image with Semgrep installed. Do not change this. - image: returntocorp/semgrep@sha256:6c7ab81e4d1fd25a09f89f1bd52c984ce107c6ff33affef6ca3bc626a4cc479b - - # Skip any PR created by dependabot to avoid permission issues: - if: (github.actor != 'dependabot[bot]') - - steps: - # Fetch project source with GitHub Actions Checkout. - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - # Run the "semgrep ci" command on the command line of the docker image. - - run: semgrep ci - env: - # Connect to Semgrep Cloud Platform through your SEMGREP_APP_TOKEN. - # Generate a token from Semgrep Cloud Platform > Settings - # and add it to your GitHub secrets. - SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} diff --git a/docs/README.md b/docs/README.md index 9209449..609d614 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -**@clickup/ent-framework** • [**Docs**](globals.md) +**@clickup/ent-framework** *** diff --git a/docs/classes/AllowIf.md b/docs/classes/AllowIf.md index 24e8715..60f8a43 100644 --- a/docs/classes/AllowIf.md +++ b/docs/classes/AllowIf.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/Batcher.md b/docs/classes/Batcher.md index df0947a..8c801f0 100644 --- a/docs/classes/Batcher.md +++ b/docs/classes/Batcher.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/CanDeleteOutgoingEdge.md b/docs/classes/CanDeleteOutgoingEdge.md index ea3b1e5..668c4e5 100644 --- a/docs/classes/CanDeleteOutgoingEdge.md +++ b/docs/classes/CanDeleteOutgoingEdge.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/CanReadOutgoingEdge.md b/docs/classes/CanReadOutgoingEdge.md index 5a7b58c..afc1f2b 100644 --- a/docs/classes/CanReadOutgoingEdge.md +++ b/docs/classes/CanReadOutgoingEdge.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/CanUpdateOutgoingEdge.md b/docs/classes/CanUpdateOutgoingEdge.md index daa489b..0286790 100644 --- a/docs/classes/CanUpdateOutgoingEdge.md +++ b/docs/classes/CanUpdateOutgoingEdge.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/Client.md b/docs/classes/Client.md index 45dd356..44f5286 100644 --- a/docs/classes/Client.md +++ b/docs/classes/Client.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/ClientError.md b/docs/classes/ClientError.md index 93f11fa..4deba44 100644 --- a/docs/classes/ClientError.md +++ b/docs/classes/ClientError.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/Cluster.md b/docs/classes/Cluster.md index 89030db..e239807 100644 --- a/docs/classes/Cluster.md +++ b/docs/classes/Cluster.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -42,7 +42,7 @@ queries (also, no implicit prewarming). #### Defined in -[src/abstract/Cluster.ts:133](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L133) +[src/abstract/Cluster.ts:137](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L137) ## Properties @@ -55,19 +55,33 @@ queries (also, no implicit prewarming). ### prewarm() -> **prewarm**(): `void` +> **prewarm**(`randomizedDelayMs`, `onInitialPrewarm`?): `void` 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" mean; typically, it's keeping some minimal number of pooled connections.) +Except when `randomizedDelayMs` is passed as 0, the actual prewarm (and +Islands discovery) queries will run with a randomized delay between N/2 and +N ms. It is better to operate in such mode: if multiple Node processes +start simultaneously in the cluster, then the randomization helps to avoid +new connections burst (new connections establishment is expensive for e.g. +pgbouncer or when DB is accessed over SSL). + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `randomizedDelayMs` | `number` | `5000` | +| `onInitialPrewarm`? | (`delayMs`) => `void` | `undefined` | + #### Returns `void` #### Defined in -[src/abstract/Cluster.ts:210](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L210) +[src/abstract/Cluster.ts:225](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L225) *** @@ -85,7 +99,7 @@ actual query. #### Defined in -[src/abstract/Cluster.ts:226](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L226) +[src/abstract/Cluster.ts:256](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L256) *** @@ -101,7 +115,7 @@ Returns all currently known (discovered) non-global Shards in the Cluster. #### Defined in -[src/abstract/Cluster.ts:233](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L233) +[src/abstract/Cluster.ts:263](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L263) *** @@ -135,7 +149,7 @@ the query), no matter whether it was an immediate call or a deferred one. #### Defined in -[src/abstract/Cluster.ts:253](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L253) +[src/abstract/Cluster.ts:283](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L283) *** @@ -162,7 +176,7 @@ Shard hasn't been discovered actually). #### Defined in -[src/abstract/Cluster.ts:266](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L266) +[src/abstract/Cluster.ts:296](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L296) *** @@ -185,7 +199,7 @@ Returns a random Shard among the ones which are currently known #### Defined in -[src/abstract/Cluster.ts:276](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L276) +[src/abstract/Cluster.ts:306](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L306) *** @@ -207,7 +221,7 @@ Returns an Island by its number. #### Defined in -[src/abstract/Cluster.ts:295](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L295) +[src/abstract/Cluster.ts:325](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L325) *** @@ -223,7 +237,7 @@ Returns all Islands in the Cluster. #### Defined in -[src/abstract/Cluster.ts:306](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L306) +[src/abstract/Cluster.ts:336](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L336) *** @@ -241,4 +255,4 @@ cluster configuration. #### Defined in -[src/abstract/Cluster.ts:316](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L316) +[src/abstract/Cluster.ts:346](https://github.com/clickup/ent-framework/blob/master/src/abstract/Cluster.ts#L346) diff --git a/docs/classes/Configuration.md b/docs/classes/Configuration.md index cd1e248..6b0cc81 100644 --- a/docs/classes/Configuration.md +++ b/docs/classes/Configuration.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -52,9 +52,9 @@ Motivation: | Property | Type | Description | | ------ | ------ | ------ | | `shardAffinity` | [`ShardAffinity`](../type-aliases/ShardAffinity.md)\<[`FieldOfIDType`](../type-aliases/FieldOfIDType.md)\<`TTable`\>\> | Defines how to locate a Shard at Ent insert time. See ShardAffinity for more details. 1. GLOBAL_SHARD: places the Ent in the global Shard (0). 2. `[]`: places the Ent in a random Shard. The "randomness" of the "random Shard" is deterministic by the Ent's unique key at the moment of insertion (if it's defined; otherwise completely random). This helps two racy insert operations running concurrently to choose the same Shard for the Ent to be created in, so only one of them will win, instead of both winning and mistakenly creating the Ent duplicates. I.e. having the same value in unique key forces the engine to target the same "random" Shard. 3. `["field1", "field2", ...]`: places the Ent in the Shard that is pointed to by the value in field1 (if it's null, then field2 etc.). A special treatment is applied if a fieldN value in (3) points to the global Shard. In such a case, the Shard for the current Ent is chosen deterministic-randomly at insert time, as if [] is passed. This allows the Ent to refer other "owning" Ents of different types, some of which may be located in the global Shard. Keep in mind that, to locate such an Ent pointing to another Ent in the global Shard, an inverse for fieldN must be defined in most of the cases. | -| `inverses?` | `{ [k in string]?: Object }` | Inverses allow cross-Shard foreign keys & cross-Shard selection. If a field points to an Ent in another Shard, and we're e.g. selecting by a value in this field, inverses allow to locate Shard(s) of the Ent. | +| `inverses?` | `{ [k in string]?: { name: string; type: string } }` | Inverses allow cross-Shard foreign keys & cross-Shard selection. If a field points to an Ent in another Shard, and we're e.g. selecting by a value in this field, inverses allow to locate Shard(s) of the Ent. | | `privacyTenantPrincipalField?` | [`InsertFieldsRequired`](../type-aliases/InsertFieldsRequired.md)\<`TTable`\> & `string` | If defined, forces all Ents of this class to have the value of that field equal to VC's principal at load time. This is a very 1st unavoidable check in the privacy rules chain, thus it's bullet-proof. | -| `privacyInferPrincipal` | `null` \| `string` \| (`vc`, `row`) => `Promise`\<`null` \| `string` \| [`Ent`](../interfaces/Ent.md)\<`object`\>\> | An attempt to load this Ent using an omni VC will "lower" that VC to the principal returned. Omni VC is always lowered. 1. If an Ent is returned, the lowered principal will be Ent#vc.principal. It is a way to delegate principal inference to another Ent. 2. If a string is returned, then it's treated as a principal ID. 3. If a null is returned, then a guest principal will be used. 4. Returning an omni principal or VC will result in a run-time error. | +| `privacyInferPrincipal` | `null` \| `string` \| (`vc`, `row`) => `Promise`\<`null` \| `string` \| [`Ent`](../interfaces/Ent.md)\<\{\}\>\> | An attempt to load this Ent using an omni VC will "lower" that VC to the principal returned. Omni VC is always lowered. 1. If an Ent is returned, the lowered principal will be Ent#vc.principal. It is a way to delegate principal inference to another Ent. 2. If a string is returned, then it's treated as a principal ID. 3. If a null is returned, then a guest principal will be used. 4. Returning an omni principal or VC will result in a run-time error. | | `privacyLoad` | [`LoadRule`](../type-aliases/LoadRule.md)\<[`Row`](../type-aliases/Row.md)\<`TTable`\>\>[] | Privacy rules checked on every row loaded from the DB. | | `privacyInsert` | [`WriteRules`](../type-aliases/WriteRules.md)\<[`InsertInput`](../type-aliases/InsertInput.md)\<`TTable`\>\> | Privacy rules checked before a row is inserted to the DB. - It the list is empty, then only omni VC can insert; it's typically a good option for Ents representing e.g. a user. - If no update/delete rules are defined, then privacyInsert rules are also run on update/delete by default. - Unless empty, the rules must include at least one Require() predicate, they can't entirely consist of AllowIf(). This is because for write rules (privacyInsert, privacyUpdate, privacyDelete) it's important to make sure that ALL rules permit the operation, not only one of them allows it; this is what Require() is exactly for. | | `privacyUpdate?` | [`WriteRules`](../type-aliases/WriteRules.md)\<[`Row`](../type-aliases/Row.md)\<`TTable`\>\> | Privacy rules checked before a row is updated in the DB. - If not defined, privacyInsert rules are used. - The rules must include at least one Require() predicate. | diff --git a/docs/classes/DenyIf.md b/docs/classes/DenyIf.md index 208d1ae..1472fc3 100644 --- a/docs/classes/DenyIf.md +++ b/docs/classes/DenyIf.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/EntAccessError.md b/docs/classes/EntAccessError.md index fd9b96e..dbcb4da 100644 --- a/docs/classes/EntAccessError.md +++ b/docs/classes/EntAccessError.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/EntNotFoundError.md b/docs/classes/EntNotFoundError.md index b0d588b..d02799e 100644 --- a/docs/classes/EntNotFoundError.md +++ b/docs/classes/EntNotFoundError.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/EntNotInsertableError.md b/docs/classes/EntNotInsertableError.md index 9878b22..1addccf 100644 --- a/docs/classes/EntNotInsertableError.md +++ b/docs/classes/EntNotInsertableError.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/EntNotReadableError.md b/docs/classes/EntNotReadableError.md index c839893..882a1cb 100644 --- a/docs/classes/EntNotReadableError.md +++ b/docs/classes/EntNotReadableError.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/EntNotUpdatableError.md b/docs/classes/EntNotUpdatableError.md index e02e231..1b16fd7 100644 --- a/docs/classes/EntNotUpdatableError.md +++ b/docs/classes/EntNotUpdatableError.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/EntUniqueKeyError.md b/docs/classes/EntUniqueKeyError.md index 2002dec..76688e1 100644 --- a/docs/classes/EntUniqueKeyError.md +++ b/docs/classes/EntUniqueKeyError.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/EntValidationError.md b/docs/classes/EntValidationError.md index f18fdb8..aff6d75 100644 --- a/docs/classes/EntValidationError.md +++ b/docs/classes/EntValidationError.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/FieldIs.md b/docs/classes/FieldIs.md index c69a9e6..40b3ff3 100644 --- a/docs/classes/FieldIs.md +++ b/docs/classes/FieldIs.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/FuncToPredicate.md b/docs/classes/FuncToPredicate.md index b34bc25..957bdb7 100644 --- a/docs/classes/FuncToPredicate.md +++ b/docs/classes/FuncToPredicate.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/IDsCache.md b/docs/classes/IDsCache.md index 9ac80bb..7b36be5 100644 --- a/docs/classes/IDsCache.md +++ b/docs/classes/IDsCache.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/IDsCacheCanReadIncomingEdge.md b/docs/classes/IDsCacheCanReadIncomingEdge.md index 8344a10..4106e65 100644 --- a/docs/classes/IDsCacheCanReadIncomingEdge.md +++ b/docs/classes/IDsCacheCanReadIncomingEdge.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/IDsCacheDeletable.md b/docs/classes/IDsCacheDeletable.md index d0a7e09..286a2f9 100644 --- a/docs/classes/IDsCacheDeletable.md +++ b/docs/classes/IDsCacheDeletable.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/IDsCacheReadable.md b/docs/classes/IDsCacheReadable.md index 6de0b1b..39f0eb6 100644 --- a/docs/classes/IDsCacheReadable.md +++ b/docs/classes/IDsCacheReadable.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/IDsCacheUpdatable.md b/docs/classes/IDsCacheUpdatable.md index 04944b5..6962e67 100644 --- a/docs/classes/IDsCacheUpdatable.md +++ b/docs/classes/IDsCacheUpdatable.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/IncomingEdgeFromVCExists.md b/docs/classes/IncomingEdgeFromVCExists.md index 205cef9..9c2f0fa 100644 --- a/docs/classes/IncomingEdgeFromVCExists.md +++ b/docs/classes/IncomingEdgeFromVCExists.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -85,4 +85,4 @@ database. #### Defined in -[src/ent/predicates/IncomingEdgeFromVCExists.ts:47](https://github.com/clickup/ent-framework/blob/master/src/ent/predicates/IncomingEdgeFromVCExists.ts#L47) +[src/ent/predicates/IncomingEdgeFromVCExists.ts:46](https://github.com/clickup/ent-framework/blob/master/src/ent/predicates/IncomingEdgeFromVCExists.ts#L46) diff --git a/docs/classes/Inverse.md b/docs/classes/Inverse.md index ad813a9..806f85f 100644 --- a/docs/classes/Inverse.md +++ b/docs/classes/Inverse.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -29,7 +29,7 @@ EntUser refers an EntOrg row). | Parameter | Type | | ------ | ------ | -| `__namedParameters` | `object` | +| `__namedParameters` | \{ `cluster`: [`Cluster`](Cluster.md)\<`TClient`, `any`\>; `shardAffinity`: [`ShardAffinity`](../type-aliases/ShardAffinity.md)\<`string`\>; `id2Schema`: [`Schema`](Schema.md)\<`TTable`, [`UniqueKey`](../type-aliases/UniqueKey.md)\<`TTable`\>\>; `id2Field`: [`FieldOfIDTypeRequired`](../type-aliases/FieldOfIDTypeRequired.md)\<`TTable`\>; `name`: `string`; `type`: `string`; \} | | `__namedParameters.cluster` | [`Cluster`](Cluster.md)\<`TClient`, `any`\> | | `__namedParameters.shardAffinity` | [`ShardAffinity`](../type-aliases/ShardAffinity.md)\<`string`\> | | `__namedParameters.id2Schema` | [`Schema`](Schema.md)\<`TTable`, [`UniqueKey`](../type-aliases/UniqueKey.md)\<`TTable`\>\> | diff --git a/docs/classes/Island.md b/docs/classes/Island.md index 5879ede..72d7cc3 100644 --- a/docs/classes/Island.md +++ b/docs/classes/Island.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/Loader.md b/docs/classes/Loader.md index a18ea79..82fd793 100644 --- a/docs/classes/Loader.md +++ b/docs/classes/Loader.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/LocalCache.md b/docs/classes/LocalCache.md index 055a724..3678345 100644 --- a/docs/classes/LocalCache.md +++ b/docs/classes/LocalCache.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -67,7 +67,7 @@ Ends the instance lifecycle (e.g. garbage recheck interval). #### Defined in -[src/abstract/LocalCache.ts:75](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L75) +[src/abstract/LocalCache.ts:78](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L78) *** @@ -89,7 +89,7 @@ Returns the value for the given key, or null if the key does not exist. #### Defined in -[src/abstract/LocalCache.ts:83](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L83) +[src/abstract/LocalCache.ts:86](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L86) *** @@ -112,4 +112,4 @@ Sets the value for the given key. #### Defined in -[src/abstract/LocalCache.ts:102](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L102) +[src/abstract/LocalCache.ts:105](https://github.com/clickup/ent-framework/blob/master/src/abstract/LocalCache.ts#L105) diff --git a/docs/classes/Or.md b/docs/classes/Or.md index c806684..b16c563 100644 --- a/docs/classes/Or.md +++ b/docs/classes/Or.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/OutgoingEdgePointsToVC.md b/docs/classes/OutgoingEdgePointsToVC.md index cb606b1..15e6a79 100644 --- a/docs/classes/OutgoingEdgePointsToVC.md +++ b/docs/classes/OutgoingEdgePointsToVC.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgClient.md b/docs/classes/PgClient.md index fa51160..ef975ec 100644 --- a/docs/classes/PgClient.md +++ b/docs/classes/PgClient.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -300,7 +300,7 @@ should expect that role() returns the actual master/replica role. | Parameter | Type | | ------ | ------ | -| `__namedParameters` | `object` | +| `__namedParameters` | \{ `query`: [`Literal`](../type-aliases/Literal.md); `hints`: `Record`\<`string`, `string`\>; `isWrite`: `boolean`; `annotations`: [`QueryAnnotation`](../interfaces/QueryAnnotation.md)[]; `op`: `string`; `table`: `string`; `batchFactor`: `number`; \} | | `__namedParameters.query` | [`Literal`](../type-aliases/Literal.md) | | `__namedParameters.hints`? | `Record`\<`string`, `string`\> | | `__namedParameters.isWrite` | `boolean` | diff --git a/docs/classes/PgClientPool.md b/docs/classes/PgClientPool.md index adeaf72..75b222b 100644 --- a/docs/classes/PgClientPool.md +++ b/docs/classes/PgClientPool.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -39,7 +39,7 @@ connection pooling solution. They don't have to use PgClientPool. #### Defined in -[src/pg/PgClientPool.ts:68](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L68) +[src/pg/PgClientPool.ts:75](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L75) ## Properties @@ -122,7 +122,7 @@ should expect that role() returns the actual master/replica role. | Parameter | Type | | ------ | ------ | -| `__namedParameters` | `object` | +| `__namedParameters` | \{ `query`: [`Literal`](../type-aliases/Literal.md); `hints`: `Record`\<`string`, `string`\>; `isWrite`: `boolean`; `annotations`: [`QueryAnnotation`](../interfaces/QueryAnnotation.md)[]; `op`: `string`; `table`: `string`; `batchFactor`: `number`; \} | | `__namedParameters.query` | [`Literal`](../type-aliases/Literal.md) | | `__namedParameters.hints`? | `Record`\<`string`, `string`\> | | `__namedParameters.isWrite` | `boolean` | @@ -308,7 +308,7 @@ than the caller MUST call release() method on the returned object. #### Defined in -[src/pg/PgClientPool.ts:105](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L105) +[src/pg/PgClientPool.ts:114](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L114) *** @@ -347,7 +347,7 @@ new available connection. This is the number of such queued requests. #### Defined in -[src/pg/PgClientPool.ts:118](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L118) +[src/pg/PgClientPool.ts:127](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L127) *** @@ -371,7 +371,7 @@ shardNos) based on that address. #### Defined in -[src/pg/PgClientPool.ts:126](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L126) +[src/pg/PgClientPool.ts:135](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L135) *** @@ -397,7 +397,7 @@ Calls swallowedErrorLogger() doing some preliminary amendment. #### Defined in -[src/pg/PgClientPool.ts:137](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L137) +[src/pg/PgClientPool.ts:146](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L146) *** @@ -419,7 +419,7 @@ unusable after calling this method: you should not send queries to it. #### Defined in -[src/pg/PgClientPool.ts:143](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L143) +[src/pg/PgClientPool.ts:152](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L152) *** @@ -439,7 +439,7 @@ Returns true if the Client is ended and can't be used anymore. #### Defined in -[src/pg/PgClientPool.ts:154](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L154) +[src/pg/PgClientPool.ts:163](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L163) *** @@ -462,4 +462,4 @@ full-text dictionaries). #### Defined in -[src/pg/PgClientPool.ts:158](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L158) +[src/pg/PgClientPool.ts:167](https://github.com/clickup/ent-framework/blob/master/src/pg/PgClientPool.ts#L167) diff --git a/docs/classes/PgError.md b/docs/classes/PgError.md index 7411b5f..f9df72c 100644 --- a/docs/classes/PgError.md +++ b/docs/classes/PgError.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -23,7 +23,7 @@ carries suggestions, what to do next. | Parameter | Type | | ------ | ------ | -| `cause` | `undefined` \| `null` \| `object` | +| `cause` | `undefined` \| `null` \| \{\} | | `where` | `string` | | `sql` | `string` | diff --git a/docs/classes/PgQueryCount.md b/docs/classes/PgQueryCount.md index 8fb6759..7b122c9 100644 --- a/docs/classes/PgQueryCount.md +++ b/docs/classes/PgQueryCount.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgQueryDelete.md b/docs/classes/PgQueryDelete.md index a65f1b5..29f261b 100644 --- a/docs/classes/PgQueryDelete.md +++ b/docs/classes/PgQueryDelete.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgQueryDeleteWhere.md b/docs/classes/PgQueryDeleteWhere.md index ebcb934..e8888c3 100644 --- a/docs/classes/PgQueryDeleteWhere.md +++ b/docs/classes/PgQueryDeleteWhere.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgQueryExists.md b/docs/classes/PgQueryExists.md index 1ac009d..ecb9043 100644 --- a/docs/classes/PgQueryExists.md +++ b/docs/classes/PgQueryExists.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgQueryIDGen.md b/docs/classes/PgQueryIDGen.md index 697ccf9..eaba02d 100644 --- a/docs/classes/PgQueryIDGen.md +++ b/docs/classes/PgQueryIDGen.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgQueryInsert.md b/docs/classes/PgQueryInsert.md index faefbb3..304ac08 100644 --- a/docs/classes/PgQueryInsert.md +++ b/docs/classes/PgQueryInsert.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgQueryLoad.md b/docs/classes/PgQueryLoad.md index 1d771c1..81655c6 100644 --- a/docs/classes/PgQueryLoad.md +++ b/docs/classes/PgQueryLoad.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgQueryLoadBy.md b/docs/classes/PgQueryLoadBy.md index d0907bf..4c6db40 100644 --- a/docs/classes/PgQueryLoadBy.md +++ b/docs/classes/PgQueryLoadBy.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgQuerySelect.md b/docs/classes/PgQuerySelect.md index ef7509d..f608e51 100644 --- a/docs/classes/PgQuerySelect.md +++ b/docs/classes/PgQuerySelect.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgQuerySelectBy.md b/docs/classes/PgQuerySelectBy.md index fb7e16f..37ae59a 100644 --- a/docs/classes/PgQuerySelectBy.md +++ b/docs/classes/PgQuerySelectBy.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgQueryUpdate.md b/docs/classes/PgQueryUpdate.md index 6156735..3eaa79a 100644 --- a/docs/classes/PgQueryUpdate.md +++ b/docs/classes/PgQueryUpdate.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgQueryUpsert.md b/docs/classes/PgQueryUpsert.md index c916b68..841495f 100644 --- a/docs/classes/PgQueryUpsert.md +++ b/docs/classes/PgQueryUpsert.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/PgRunner.md b/docs/classes/PgRunner.md index e7aa410..3e3dbc8 100644 --- a/docs/classes/PgRunner.md +++ b/docs/classes/PgRunner.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -188,7 +188,7 @@ performance-critical path! | Parameter | Type | | ------ | ------ | | `template` | `string` | -| `args` | `object` | +| `args` | \{ `fields`: [`FieldAliased`](../type-aliases/FieldAliased.md)\<`TTable`\>[]; `normalize`: `boolean`; \} | | `args.fields`? | [`FieldAliased`](../type-aliases/FieldAliased.md)\<`TTable`\>[] | | `args.normalize`? | `boolean` | @@ -246,7 +246,7 @@ Escapes field name identifier. | Parameter | Type | | ------ | ------ | | `info` | [`FieldAliased`](../type-aliases/FieldAliased.md)\<`TTable`\> | -| `__namedParameters` | `object` | +| `__namedParameters` | \{ `withTable`: `string`; `normalize`: `boolean`; \} | | `__namedParameters.withTable`? | `string` | | `__namedParameters.normalize`? | `boolean` | @@ -284,7 +284,7 @@ of columns is passed in specs. | Parameter | Type | | ------ | ------ | -| `__namedParameters` | `object` | +| `__namedParameters` | \{ `fields`: readonly [`FieldAliased`](../type-aliases/FieldAliased.md)\<`TTable`\>[]; `suffix`: `string`; \} | | `__namedParameters.fields` | readonly [`FieldAliased`](../type-aliases/FieldAliased.md)\<`TTable`\>[] | | `__namedParameters.suffix` | `string` | @@ -365,7 +365,7 @@ generate VALUES clause without exact identification of the destination. | Parameter | Type | | ------ | ------ | -| `__namedParameters` | `object` | +| `__namedParameters` | \{ `prefix`: `string`; `indent`: `string`; `fields`: readonly [`FieldAliased`](../type-aliases/FieldAliased.md)\<`TTable`\>[]; `withKey`: `boolean`; `skipSorting`: `boolean`; `suffix`: `string`; \} | | `__namedParameters.prefix` | `string` | | `__namedParameters.indent` | `string` | | `__namedParameters.fields` | readonly [`FieldAliased`](../type-aliases/FieldAliased.md)\<`TTable`\>[] | @@ -511,7 +511,7 @@ WHERE (field1='a' AND field2='b' AND field3 IN('a', 'b', 'c', ...)) OR (...) | Parameter | Type | | ------ | ------ | -| `args` | `object` | +| `args` | \{ `prefix`: `string`; `fields`: readonly [`Field`](../type-aliases/Field.md)\<`TTable`\>[]; `suffix`: `string`; \} | | `args.prefix` | `string` | | `args.fields` | readonly [`Field`](../type-aliases/Field.md)\<`TTable`\>[] | | `args.suffix` | `string` | @@ -524,11 +524,11 @@ WHERE (field1='a' AND field2='b' AND field3 IN('a', 'b', 'c', ...)) OR (...) > **plain**: `object` -##### plain.prefix +###### plain.prefix > **prefix**: `string` -##### plain.func() +###### plain.func() > **func**: (`inputs`) => `string` @@ -542,7 +542,7 @@ WHERE (field1='a' AND field2='b' AND field3 IN('a', 'b', 'c', ...)) OR (...) `string` -##### plain.suffix +###### plain.suffix > **suffix**: `string` @@ -550,11 +550,11 @@ WHERE (field1='a' AND field2='b' AND field3 IN('a', 'b', 'c', ...)) OR (...) > **optimized**: `object` -##### optimized.prefix +###### optimized.prefix > **prefix**: `string` -##### optimized.func() +###### optimized.func() > **func**: (`inputs`) => `string` @@ -568,7 +568,7 @@ WHERE (field1='a' AND field2='b' AND field3 IN('a', 'b', 'c', ...)) OR (...) `string` -##### optimized.suffix +###### optimized.suffix > **suffix**: `string` @@ -593,7 +593,7 @@ returns the generated SQL WHERE clause. | Parameter | Type | | ------ | ------ | -| `__namedParameters` | `object` | +| `__namedParameters` | \{ `prefix`: `string`; `suffix`: `string`; \} | | `__namedParameters.prefix` | `string` | | `__namedParameters.suffix` | `string` | diff --git a/docs/classes/PgSchema.md b/docs/classes/PgSchema.md index cf80026..9b86c76 100644 --- a/docs/classes/PgSchema.md +++ b/docs/classes/PgSchema.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/QueryBase.md b/docs/classes/QueryBase.md index 4b87f27..2826997 100644 --- a/docs/classes/QueryBase.md +++ b/docs/classes/QueryBase.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/QueryCache.md b/docs/classes/QueryCache.md index e2c3fbe..42eefd5 100644 --- a/docs/classes/QueryCache.md +++ b/docs/classes/QueryCache.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -31,7 +31,7 @@ was manually added to the VC by the user, otherwise caching is a no-op. #### Defined in -[src/ent/QueryCache.ts:35](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L35) +[src/ent/QueryCache.ts:36](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L36) ## Properties @@ -54,7 +54,7 @@ have a risk of caching a transient DB error). | Parameter | Type | | ------ | ------ | | `EntClass` | [`AnyClass`](../type-aliases/AnyClass.md) | -| `op` | `"loadNullable"` \| `"loadByNullable"` \| `"select"` \| `"count"` \| `"exists"` | +| `op` | `"loadNullable"` \| `"loadByNullable"` \| `"selectBy"` \| `"select"` \| `"count"` \| `"exists"` | | `key` | `string` | | `value` | `undefined` \| `Promise`\<`unknown`\> | @@ -64,7 +64,7 @@ have a risk of caching a transient DB error). #### Defined in -[src/ent/QueryCache.ts:56](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L56) +[src/ent/QueryCache.ts:57](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L57) *** @@ -72,15 +72,16 @@ have a risk of caching a transient DB error). > **delete**(`EntClass`, `ops`, `key`?): `this` -Deletes cache slots or keys for an Ent. +Deletes cache slots or keys for an Ent. If key is null, skips the deletion. +If key is undefined (i.e. not passed), then deletes all slots. #### Parameters | Parameter | Type | | ------ | ------ | | `EntClass` | [`AnyClass`](../type-aliases/AnyClass.md) | -| `ops` | (`"loadNullable"` \| `"loadByNullable"` \| `"select"` \| `"count"` \| `"exists"`)[] | -| `key`? | `string` | +| `ops` | readonly (`"loadNullable"` \| `"loadByNullable"` \| `"selectBy"` \| `"select"` \| `"count"` \| `"exists"`)[] | +| `key`? | `null` \| `string` | #### Returns @@ -88,7 +89,7 @@ Deletes cache slots or keys for an Ent. #### Defined in -[src/ent/QueryCache.ts:91](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L91) +[src/ent/QueryCache.ts:93](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L93) *** @@ -111,7 +112,7 @@ case it's inflight already. | Parameter | Type | | ------ | ------ | | `EntClass` | [`AnyClass`](../type-aliases/AnyClass.md) | -| `op` | `"loadNullable"` \| `"loadByNullable"` \| `"select"` \| `"count"` \| `"exists"` | +| `op` | `"loadNullable"` \| `"loadByNullable"` \| `"selectBy"` \| `"select"` \| `"count"` \| `"exists"` | | `key` | `string` | #### Returns @@ -120,7 +121,7 @@ case it's inflight already. #### Defined in -[src/ent/QueryCache.ts:113](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L113) +[src/ent/QueryCache.ts:119](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L119) *** @@ -141,7 +142,7 @@ Read-through caching pattern. | Parameter | Type | | ------ | ------ | | `EntClass` | [`AnyClass`](../type-aliases/AnyClass.md) | -| `op` | `"loadNullable"` \| `"loadByNullable"` \| `"select"` \| `"count"` \| `"exists"` | +| `op` | `"loadNullable"` \| `"loadByNullable"` \| `"selectBy"` \| `"select"` \| `"count"` \| `"exists"` | | `key` | `string` | | `creator` | () => `Promise`\<`TValue`\> | @@ -151,4 +152,4 @@ Read-through caching pattern. #### Defined in -[src/ent/QueryCache.ts:129](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L129) +[src/ent/QueryCache.ts:135](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L135) diff --git a/docs/classes/QueryPing.md b/docs/classes/QueryPing.md index 568f63d..1ed72a6 100644 --- a/docs/classes/QueryPing.md +++ b/docs/classes/QueryPing.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/Require.md b/docs/classes/Require.md index 4d370f2..94a09a4 100644 --- a/docs/classes/Require.md +++ b/docs/classes/Require.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/Rule.md b/docs/classes/Rule.md index 1a276cd..9ef6e05 100644 --- a/docs/classes/Rule.md +++ b/docs/classes/Rule.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/Runner.md b/docs/classes/Runner.md index 3d63142..ed22aa3 100644 --- a/docs/classes/Runner.md +++ b/docs/classes/Runner.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/Schema.md b/docs/classes/Schema.md index 0e2563f..5e613ab 100644 --- a/docs/classes/Schema.md +++ b/docs/classes/Schema.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/Shard.md b/docs/classes/Shard.md index e00061f..4da60f4 100644 --- a/docs/classes/Shard.md +++ b/docs/classes/Shard.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/ShardError.md b/docs/classes/ShardError.md index a12eb82..b563704 100644 --- a/docs/classes/ShardError.md +++ b/docs/classes/ShardError.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/ShardLocator.md b/docs/classes/ShardLocator.md index 6a813d1..f9e632b 100644 --- a/docs/classes/ShardLocator.md +++ b/docs/classes/ShardLocator.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -28,7 +28,7 @@ okay. | Parameter | Type | | ------ | ------ | -| `__namedParameters` | `object` | +| `__namedParameters` | \{ `cluster`: [`Cluster`](Cluster.md)\<`TClient`, `any`\>; `entName`: `string`; `shardAffinity`: [`ShardAffinity`](../type-aliases/ShardAffinity.md)\<`TField`\>; `uniqueKey`: `undefined` \| readonly `string`[]; `inverses`: readonly [`Inverse`](Inverse.md)\<`TClient`, `TTable`\>[]; \} | | `__namedParameters.cluster` | [`Cluster`](Cluster.md)\<`TClient`, `any`\> | | `__namedParameters.entName` | `string` | | `__namedParameters.shardAffinity` | [`ShardAffinity`](../type-aliases/ShardAffinity.md)\<`TField`\> | diff --git a/docs/classes/Timeline.md b/docs/classes/Timeline.md index b8abe34..15f83ae 100644 --- a/docs/classes/Timeline.md +++ b/docs/classes/Timeline.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -31,7 +31,7 @@ user+Ent+microshard, and thus it is decoupled from IDs. | Parameter | Type | Default value | | ------ | ------ | ------ | -| `state` | `object` \| `"unknown"` | `"unknown"` | +| `state` | \{ `pos`: `bigint`; `expiresAt`: `number`; \} \| `"unknown"` | `"unknown"` | #### Returns diff --git a/docs/classes/TimelineManager.md b/docs/classes/TimelineManager.md index ef86c86..081c706 100644 --- a/docs/classes/TimelineManager.md +++ b/docs/classes/TimelineManager.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/ToolPing.md b/docs/classes/ToolPing.md index 45971f8..5255c5d 100644 --- a/docs/classes/ToolPing.md +++ b/docs/classes/ToolPing.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/ToolScoreboard.md b/docs/classes/ToolScoreboard.md index ce3091a..d162325 100644 --- a/docs/classes/ToolScoreboard.md +++ b/docs/classes/ToolScoreboard.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -29,7 +29,7 @@ Initializes the instance. #### Defined in -[src/tools/ToolScoreboard.ts:126](https://github.com/clickup/ent-framework/blob/master/src/tools/ToolScoreboard.ts#L126) +[src/tools/ToolScoreboard.ts:127](https://github.com/clickup/ent-framework/blob/master/src/tools/ToolScoreboard.ts#L127) ## Properties @@ -37,9 +37,9 @@ Initializes the instance. | ------ | ------ | ------ | ------ | | `DEFAULT_OPTIONS` | `Required`\<`PickPartial`\<[`ToolScoreboardOptions`](../interfaces/ToolScoreboardOptions.md)\>\> | `undefined` | Default values for the constructor options. | | `options` | `Required`\<[`ToolScoreboardOptions`](../interfaces/ToolScoreboardOptions.md)\> | `undefined` | Options of this tool. | -| `islands` | `Map`\<`number`, `object`\> | `undefined` | Registry of all Islands with Clients. | +| `islands` | `Map`\<`number`, \{ `shards`: `number`; `clients`: `Map`\<`ClientIdent`, [`Client`](Client.md)\>; \}\> | `undefined` | Registry of all Islands with Clients. | | `queries` | `DefaultMap`\<`number`, `DefaultMap`\<`ClientIdent`, `ToolScoreboardQuery`[]\>\> | `undefined` | Log of queries sent (ping, discovery, tick). | -| `poolStats` | `DefaultMap`\<`number`, `Map`\<`ClientIdent`, `object`\>\> | `undefined` | Pool stats of Clients. | +| `poolStats` | `DefaultMap`\<`number`, `Map`\<`ClientIdent`, \{ `totalConns`: `number`; `idleConns`: `number`; `queuedReqs`: `number`; \}\>\> | `undefined` | Pool stats of Clients. | | `swallowedErrors` | `ToolScoreboardSwallowedError`[] | `[]` | Registry of the recent swallowed errors (pings-independent). | | `queryErrors` | `ToolScoreboardQueryError`[] | `[]` | Errors extracted from the queries log. | @@ -58,7 +58,7 @@ the Cluster and yields back on every refreshMs tick. #### Defined in -[src/tools/ToolScoreboard.ts:134](https://github.com/clickup/ent-framework/blob/master/src/tools/ToolScoreboard.ts#L134) +[src/tools/ToolScoreboard.ts:135](https://github.com/clickup/ent-framework/blob/master/src/tools/ToolScoreboard.ts#L135) *** @@ -74,4 +74,4 @@ Renders the current state of the Scoreboard as a string. #### Defined in -[src/tools/ToolScoreboard.ts:303](https://github.com/clickup/ent-framework/blob/master/src/tools/ToolScoreboard.ts#L303) +[src/tools/ToolScoreboard.ts:304](https://github.com/clickup/ent-framework/blob/master/src/tools/ToolScoreboard.ts#L304) diff --git a/docs/classes/Triggers.md b/docs/classes/Triggers.md index 6e6a76c..9a80724 100644 --- a/docs/classes/Triggers.md +++ b/docs/classes/Triggers.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/True.md b/docs/classes/True.md index ae00abe..e0c3217 100644 --- a/docs/classes/True.md +++ b/docs/classes/True.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/VC.md b/docs/classes/VC.md index 6417569..93a3224 100644 --- a/docs/classes/VC.md +++ b/docs/classes/VC.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -41,7 +41,7 @@ of calls and reasons, why some object was accessed. | Parameter | Type | | ------ | ------ | -| `__namedParameters` | `object` | +| `__namedParameters` | \{ `trace`: `string`; `cachesExpirationMs`: `number`; \} | | `__namedParameters.trace`? | `string` | | `__namedParameters.cachesExpirationMs`? | `number` | @@ -73,7 +73,7 @@ This is to show VCs in console.log() and inspect() nicely. ### cache() -#### cache(Class) +#### Call Signature > **cache**\<`TInstance`\>(`Class`): `TInstance` @@ -100,7 +100,7 @@ this VC an admin VC?). Also, people may define their own VC-local caches. [src/ent/VC.ts:100](https://github.com/clickup/ent-framework/blob/master/src/ent/VC.ts#L100) -#### cache(tag, creator) +#### Call Signature > **cache**\<`TInstance`\>(`tag`, `creator`): `TInstance` @@ -314,7 +314,7 @@ history of the VC, but for e.g. tests or benchmarks, it's fine. ### withFlavor() -#### withFlavor(prepend, flavors) +#### Call Signature > **withFlavor**(`prepend`, ...`flavors`): `this` @@ -336,10 +336,13 @@ it. If no flavors were added, returns the same VC (`this`). [src/ent/VC.ts:305](https://github.com/clickup/ent-framework/blob/master/src/ent/VC.ts#L305) -#### withFlavor(flavors) +#### Call Signature > **withFlavor**(...`flavors`): `this` +Returns a new VC derived from the current one adding some more flavors to +it. If no flavors were added, returns the same VC (`this`). + ##### Parameters | Parameter | Type | @@ -388,7 +391,7 @@ Derives the VC with the provided heartbeater injected. | Parameter | Type | | ------ | ------ | -| `heartbeater` | `object` | +| `heartbeater` | \{ `heartbeat`: () => `Promise`\<`void`\>; `delay`: (`ms`) => `Promise`\<`void`\>; \} | | `heartbeater.heartbeat` | () => `Promise`\<`void`\> | | `heartbeater.delay` | (`ms`) => `Promise`\<`void`\> | diff --git a/docs/classes/VCCaches.md b/docs/classes/VCCaches.md index ba33dd2..0136203 100644 --- a/docs/classes/VCCaches.md +++ b/docs/classes/VCCaches.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/VCFlavor.md b/docs/classes/VCFlavor.md index db00ca2..e399af4 100644 --- a/docs/classes/VCFlavor.md +++ b/docs/classes/VCFlavor.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/VCHasFlavor.md b/docs/classes/VCHasFlavor.md index 3dab4b7..2d59c08 100644 --- a/docs/classes/VCHasFlavor.md +++ b/docs/classes/VCHasFlavor.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/VCTrace.md b/docs/classes/VCTrace.md index 485f500..ce68f09 100644 --- a/docs/classes/VCTrace.md +++ b/docs/classes/VCTrace.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -28,10 +28,28 @@ they're a part of VC core interface to allow faster access. #### Defined in -[src/ent/VCTrace.ts:18](https://github.com/clickup/ent-framework/blob/master/src/ent/VCTrace.ts#L18) +[src/ent/VCTrace.ts:17](https://github.com/clickup/ent-framework/blob/master/src/ent/VCTrace.ts#L17) ## Properties | Property | Type | | ------ | ------ | | `trace` | `string` | + +## Methods + +### tryExtractCreationDate() + +> **tryExtractCreationDate**(): `null` \| `Date` + +In case the trace was created by this tool, tries to extract the date of +its creation. As a sanity check, verifies that this date is not too far +away from the present time. + +#### Returns + +`null` \| `Date` + +#### Defined in + +[src/ent/VCTrace.ts:26](https://github.com/clickup/ent-framework/blob/master/src/ent/VCTrace.ts#L26) diff --git a/docs/classes/VCWithQueryCache.md b/docs/classes/VCWithQueryCache.md index 6b72964..fd7c0ab 100644 --- a/docs/classes/VCWithQueryCache.md +++ b/docs/classes/VCWithQueryCache.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -22,7 +22,7 @@ If set, Ent cache is enabled for operations in this VC. | Parameter | Type | | ------ | ------ | -| `options` | `object` | +| `options` | \{ `maxQueries`: `number`; \} | | `options.maxQueries` | `number` | #### Returns diff --git a/docs/classes/VCWithStacks.md b/docs/classes/VCWithStacks.md index bf6785e..480b248 100644 --- a/docs/classes/VCWithStacks.md +++ b/docs/classes/VCWithStacks.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/classes/Validation.md b/docs/classes/Validation.md index 479e7c7..1418fa7 100644 --- a/docs/classes/Validation.md +++ b/docs/classes/Validation.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/functions/BaseEnt.md b/docs/functions/BaseEnt.md index 8049978..6c37611 100644 --- a/docs/functions/BaseEnt.md +++ b/docs/functions/BaseEnt.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/functions/CacheMixin.md b/docs/functions/CacheMixin.md index 7a3afa6..d9d1d21 100644 --- a/docs/functions/CacheMixin.md +++ b/docs/functions/CacheMixin.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -30,4 +30,4 @@ Modifies the passed class adding VC-stored cache layer to it. ## Defined in -[src/ent/mixins/CacheMixin.ts:20](https://github.com/clickup/ent-framework/blob/master/src/ent/mixins/CacheMixin.ts#L20) +[src/ent/mixins/CacheMixin.ts:31](https://github.com/clickup/ent-framework/blob/master/src/ent/mixins/CacheMixin.ts#L31) diff --git a/docs/functions/ConfigMixin.md b/docs/functions/ConfigMixin.md index e51bad4..fd6d8b3 100644 --- a/docs/functions/ConfigMixin.md +++ b/docs/functions/ConfigMixin.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/functions/HelpersMixin.md b/docs/functions/HelpersMixin.md index c59c41e..295ea18 100644 --- a/docs/functions/HelpersMixin.md +++ b/docs/functions/HelpersMixin.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/functions/PrimitiveMixin.md b/docs/functions/PrimitiveMixin.md index bf76a39..9fd2197 100644 --- a/docs/functions/PrimitiveMixin.md +++ b/docs/functions/PrimitiveMixin.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/functions/buildShape.md b/docs/functions/buildShape.md index 9030c62..7f8576d 100644 --- a/docs/functions/buildShape.md +++ b/docs/functions/buildShape.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/functions/buildUpdateNewRow.md b/docs/functions/buildUpdateNewRow.md deleted file mode 100644 index 18366fd..0000000 --- a/docs/functions/buildUpdateNewRow.md +++ /dev/null @@ -1,32 +0,0 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** - -*** - -[@clickup/ent-framework](../globals.md) / buildUpdateNewRow - -# Function: buildUpdateNewRow() - -> **buildUpdateNewRow**\<`TTable`\>(`oldRow`, `input`): [`TriggerUpdateNewRow`](../type-aliases/TriggerUpdateNewRow.md)\<`TTable`\> - -Simulates an update for a row, as if it's applied to the Ent. - -## Type Parameters - -| Type Parameter | -| ------ | -| `TTable` *extends* [`Table`](../type-aliases/Table.md) | - -## Parameters - -| Parameter | Type | -| ------ | ------ | -| `oldRow` | [`Row`](../type-aliases/Row.md)\<`TTable`\> | -| `input` | [`UpdateInput`](../type-aliases/UpdateInput.md)\<`TTable`\> | - -## Returns - -[`TriggerUpdateNewRow`](../type-aliases/TriggerUpdateNewRow.md)\<`TTable`\> - -## Defined in - -[src/ent/Triggers.ts:354](https://github.com/clickup/ent-framework/blob/master/src/ent/Triggers.ts#L354) diff --git a/docs/functions/default.md b/docs/functions/default.md deleted file mode 100644 index ad98832..0000000 --- a/docs/functions/default.md +++ /dev/null @@ -1,17 +0,0 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** - -*** - -[@clickup/ent-framework](../globals.md) / default - -# Function: default() - -> **default**(): `AsyncGenerator`\<`unknown`\> - -## Returns - -`AsyncGenerator`\<`unknown`\> - -## Defined in - -[src/pg/\_\_benchmarks\_\_/batched-inserts.benchmark.ts:29](https://github.com/clickup/ent-framework/blob/master/src/pg/__benchmarks__/batched-inserts.benchmark.ts#L29) diff --git a/docs/functions/escapeIdent.md b/docs/functions/escapeIdent.md index 15750da..c3aa371 100644 --- a/docs/functions/escapeIdent.md +++ b/docs/functions/escapeIdent.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/functions/escapeLiteral.md b/docs/functions/escapeLiteral.md index 7caaf43..10bd8c1 100644 --- a/docs/functions/escapeLiteral.md +++ b/docs/functions/escapeLiteral.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/functions/evaluate.md b/docs/functions/evaluate.md index 58e4a67..6fbfee7 100644 --- a/docs/functions/evaluate.md +++ b/docs/functions/evaluate.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -6,7 +6,7 @@ # Function: evaluate() -> **evaluate**\<`TInput`\>(`vc`, `input`, `rules`, `fashion`): `Promise`\<`object`\> +> **evaluate**\<`TInput`\>(`vc`, `input`, `rules`, `fashion`): `Promise`\<\{ `allow`: `boolean`; `results`: [`RuleResult`](../interfaces/RuleResult.md)[]; `cause`: `string`; \}\> This is a hearth of permissions checking, a machine which evaluates the rules chain from top to bottom (one after another) and makes the decision based on @@ -67,19 +67,7 @@ Example of a chain: ## Returns -`Promise`\<`object`\> - -### allow - -> **allow**: `boolean` - -### results - -> **results**: [`RuleResult`](../interfaces/RuleResult.md)[] - -### cause - -> **cause**: `string` +`Promise`\<\{ `allow`: `boolean`; `results`: [`RuleResult`](../interfaces/RuleResult.md)[]; `cause`: `string`; \}\> ## Defined in diff --git a/docs/functions/isBigintStr.md b/docs/functions/isBigintStr.md index 79b803d..20864f7 100644 --- a/docs/functions/isBigintStr.md +++ b/docs/functions/isBigintStr.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/globals.md b/docs/globals.md index 4f95a63..d7d7754 100644 --- a/docs/globals.md +++ b/docs/globals.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](README.md) • **Docs** +[**@clickup/ent-framework**](README.md) *** @@ -178,14 +178,12 @@ ## Functions - [BaseEnt](functions/BaseEnt.md) -- [buildUpdateNewRow](functions/buildUpdateNewRow.md) - [CacheMixin](functions/CacheMixin.md) - [ConfigMixin](functions/ConfigMixin.md) - [HelpersMixin](functions/HelpersMixin.md) - [PrimitiveMixin](functions/PrimitiveMixin.md) - [evaluate](functions/evaluate.md) - [isBigintStr](functions/isBigintStr.md) -- [default](functions/default.md) - [buildShape](functions/buildShape.md) - [escapeIdent](functions/escapeIdent.md) - [escapeLiteral](functions/escapeLiteral.md) diff --git a/docs/interfaces/ClientConnectionIssue.md b/docs/interfaces/ClientConnectionIssue.md index 650f42d..1c32f0e 100644 --- a/docs/interfaces/ClientConnectionIssue.md +++ b/docs/interfaces/ClientConnectionIssue.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/ClientOptions.md b/docs/interfaces/ClientOptions.md index b8b0656..6152522 100644 --- a/docs/interfaces/ClientOptions.md +++ b/docs/interfaces/ClientOptions.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/ClientPingInput.md b/docs/interfaces/ClientPingInput.md index 89719e7..8d1463a 100644 --- a/docs/interfaces/ClientPingInput.md +++ b/docs/interfaces/ClientPingInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/ClientQueryLoggerProps.md b/docs/interfaces/ClientQueryLoggerProps.md index 35ef5cd..3eb590f 100644 --- a/docs/interfaces/ClientQueryLoggerProps.md +++ b/docs/interfaces/ClientQueryLoggerProps.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/ClusterOptions.md b/docs/interfaces/ClusterOptions.md index e02a4d3..89be45e 100644 --- a/docs/interfaces/ClusterOptions.md +++ b/docs/interfaces/ClusterOptions.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -24,6 +24,7 @@ Options for Cluster constructor. | `loggers` | [`Loggers`](Loggers.md) | Loggers to be injected into all Clients returned by createClient(). | | `localCache?` | `null` \| [`LocalCache`](../classes/LocalCache.md)\<`never`\> | An instance of LocalCache which may be used for auxillary purposes when discovering Shards/Clients. | | `shardsDiscoverIntervalMs?` | `MaybeCallable`\<`number`\> | How often to run Shards rediscovery in normal circumstances. | +| `shardsDiscoverIntervalJitter?` | `MaybeCallable`\<`number`\> | Jitter for shardsDiscoverIntervalMs. | | `shardsDiscoverRecheckIslandsIntervalMs?` | `MaybeCallable`\<`number`\> | How often to recheck for changes in options.islands (typically, often, since it's assumed that options.islands calculation is cheap). If the Cluster configuration is changed, then we trigger rediscovery ASAP. | | `locateIslandErrorRetryCount?` | `MaybeCallable`\<`number`\> | Used in the following situations: 1. If we think that we know Island of a particular Shard, but an attempt to access it fails, this means that maybe the Shard is migrating to another Island. In this case, we wait a bit and retry that many times. We should not do it too many times though, because all DB requests will be blocked waiting for the resolution. 2. If we sent a write request to a Client, but it appeared that this Client is a replica, and the master moved to some other Client. In this case, we wait a bit and ping all Clients of the Island to refresh, who is master and who is replica. | | `locateIslandErrorRediscoverClusterDelayMs?` | `MaybeCallable`\<`number`\> | How much time to wait before we retry rediscovering the entire Cluster. The time here should be just enough to wait for switching the Shard from one Island to another (typically quick). | diff --git a/docs/interfaces/ConfigClass.md b/docs/interfaces/ConfigClass.md index ef5b484..965286a 100644 --- a/docs/interfaces/ConfigClass.md +++ b/docs/interfaces/ConfigClass.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/ConfigInstance.md b/docs/interfaces/ConfigInstance.md index 8033222..59be78b 100644 --- a/docs/interfaces/ConfigInstance.md +++ b/docs/interfaces/ConfigInstance.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/Ent.md b/docs/interfaces/Ent.md index 5b87b07..992bc24 100644 --- a/docs/interfaces/Ent.md +++ b/docs/interfaces/Ent.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/EntClass.md b/docs/interfaces/EntClass.md index 5d983cd..62b53a5 100644 --- a/docs/interfaces/EntClass.md +++ b/docs/interfaces/EntClass.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -180,7 +180,7 @@ Used in some places where we need the very minimum from the Ent. | `where` | [`Where`](../type-aliases/Where.md)\<`TTable`\> | | `chunkSize` | `number` | | `limit` | `number` | -| `custom`? | `object` | +| `custom`? | \{\} | #### Returns diff --git a/docs/interfaces/EntValidationErrorInfo.md b/docs/interfaces/EntValidationErrorInfo.md index 8ff48e1..29f1aa4 100644 --- a/docs/interfaces/EntValidationErrorInfo.md +++ b/docs/interfaces/EntValidationErrorInfo.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/Handler.md b/docs/interfaces/Handler.md index 1e648c8..3a90778 100644 --- a/docs/interfaces/Handler.md +++ b/docs/interfaces/Handler.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/HelpersClass.md b/docs/interfaces/HelpersClass.md index f422338..30e4ff1 100644 --- a/docs/interfaces/HelpersClass.md +++ b/docs/interfaces/HelpersClass.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/HelpersInstance.md b/docs/interfaces/HelpersInstance.md index c1705e1..d5b3cdd 100644 --- a/docs/interfaces/HelpersInstance.md +++ b/docs/interfaces/HelpersInstance.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/IslandOptions.md b/docs/interfaces/IslandOptions.md index 19a8714..f95feb2 100644 --- a/docs/interfaces/IslandOptions.md +++ b/docs/interfaces/IslandOptions.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -21,5 +21,5 @@ Options for Island constructor. | `no` | `number` | Island number. | | `clients` | readonly `TClient`[] | Clients of that Island (the order is arbitrary). | | `createShard` | (`no`: `number`) => [`Shard`](../classes/Shard.md)\<`TClient`\> | Should return a Memoize'd Shards object by its number. | -| `localCache?` | `null` \| [`LocalCache`](../classes/LocalCache.md)\<`object`\> | An auxillary LocalCache used to fallback-infer master/replica role in case some Client is unavailable right now. | +| `localCache?` | `null` \| [`LocalCache`](../classes/LocalCache.md)\<\{ `address`: `string`; `role`: [`ClientRole`](../type-aliases/ClientRole.md); \}\> | An auxillary LocalCache used to fallback-infer master/replica role in case some Client is unavailable right now. | | `shardNosConcurrentRetryDelayMs?` | `number` | If nonzero, runs the second shardNos() call attempt on a Client if the 1st call on that Client gets stuck for longer than the provided number of ms. This option is used to detect the unhealthy DB connection quicker, and thus, exit from rediscover() faster (the Shards map can likely be loaded from a replica still, so the down DB is not the end of the world). The idea is that the 1st shardNos() could get stuck due to the load balancer trying to wait until the DB goes back up again (e.g. for PgBouncer, that is query_wait_timeout situation; "pause_client" is printed to PgBouncer debug logs, and then the Client gets frozen for up to query_wait_timeout; other engines may have similar behavior). But for the NEW connections/queries, after a small delay, the load balancer may realize that the DB is really down (the load balancer typically can get "connection refused" while connecting to the DB server really quickly), and the 2nd shardNos() call will reject almost immediately ("fast fail" workflow), way before the 1st call rejects (e.g. for PgBouncer and query_wait_timeout=15s, the 1st call may get stuck for up to 15 seconds!). So, we will not wait that long to figure out that the DB is down, and will detect that situation quicker. Typically, the connection attempt from load balancer to an unhealthy DB server ends up quickly with "connection refused" TCP error (e.g. when the load balancer and the DB server run on the same host), so the value in this option can be small. But not always. Sometimes, the new connection from load balancer to the DB server gets stuck in "connecting..." state (e.g. this happens when the load balancer runs in a Docker container, and the DB container gets killed; the connection attempt will eventually fail, but in 1+ minutes and with "no route to host" error). In this case, the value in the option must be greater than e.g. server_connect_timeout (example for PgBouncer; basically, server_connect_timeout is PgBouncer's tool to detect "stuck" connection attempts (the connections which don't get "connection refused" quickly). | diff --git a/docs/interfaces/LocalCacheOptions.md b/docs/interfaces/LocalCacheOptions.md index 176d6b6..7dea18d 100644 --- a/docs/interfaces/LocalCacheOptions.md +++ b/docs/interfaces/LocalCacheOptions.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/LocateIslandErrorLoggerProps.md b/docs/interfaces/LocateIslandErrorLoggerProps.md index 219a120..4ceefdd 100644 --- a/docs/interfaces/LocateIslandErrorLoggerProps.md +++ b/docs/interfaces/LocateIslandErrorLoggerProps.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/Loggers.md b/docs/interfaces/Loggers.md index 0917ced..3fa6532 100644 --- a/docs/interfaces/Loggers.md +++ b/docs/interfaces/Loggers.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/PgClientConn.md b/docs/interfaces/PgClientConn.md index 5fd18f0..94bf759 100644 --- a/docs/interfaces/PgClientConn.md +++ b/docs/interfaces/PgClientConn.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/PgClientOptions.md b/docs/interfaces/PgClientOptions.md index 098316a..0df72e2 100644 --- a/docs/interfaces/PgClientOptions.md +++ b/docs/interfaces/PgClientOptions.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -23,7 +23,7 @@ Options for PgClient constructor. | `name` | `string` | Name of the Client; used for logging. | | `loggers?` | `null` \| [`Loggers`](Loggers.md) | Loggers to be called at different stages. | | `batchDelayMs?` | `MaybeCallable`\<`number`\> | If passed, there will be an artificial queries accumulation delay while batching the requests. Default is 0 (turned off). Passed to Batcher#batchDelayMs. | -| `shards?` | `null` \| `object` | Info on how to discover the shards. | +| `shards?` | `null` \| \{ `nameFormat`: `string`; `discoverQuery`: `MaybeCallable`\<`string`\>; \} | Info on how to discover the shards. | | `hints?` | `null` \| `MaybeCallable`\<`Record`\<`string`, `undefined` \| `string`\>\> | PG "SET key=value" hints to run before each query. Often times we use it to pass statement_timeout option since e.g. PGBouncer doesn't support per-connection statement timeout in transaction pooling mode: it throws "unsupported startup parameter" error. I.e. we may want to emit "SET statement_timeout TO ..." before each query in multi-query mode. | | `maxReplicationLagMs?` | `MaybeCallable`\<`number`\> | After how many milliseconds we give up waiting for the replica to catch up with the master. | | `replicaTimelinePosRefreshMs?` | `MaybeCallable`\<`number`\> | Up to how often we call TimelineManager#triggerRefresh(). | diff --git a/docs/interfaces/PgClientPoolOptions.md b/docs/interfaces/PgClientPoolOptions.md index e55670b..0683faa 100644 --- a/docs/interfaces/PgClientPoolOptions.md +++ b/docs/interfaces/PgClientPoolOptions.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -19,7 +19,7 @@ Options for PgClientPool constructor. | `name` | `string` | Name of the Client; used for logging. | | `loggers?` | `null` \| [`Loggers`](Loggers.md) | Loggers to be called at different stages. | | `batchDelayMs?` | `MaybeCallable`\<`number`\> | If passed, there will be an artificial queries accumulation delay while batching the requests. Default is 0 (turned off). Passed to Batcher#batchDelayMs. | -| `shards?` | `null` \| `object` | Info on how to discover the shards. | +| `shards?` | `null` \| \{ `nameFormat`: `string`; `discoverQuery`: `MaybeCallable`\<`string`\>; \} | Info on how to discover the shards. | | `hints?` | `null` \| `MaybeCallable`\<`Record`\<`string`, `undefined` \| `string`\>\> | PG "SET key=value" hints to run before each query. Often times we use it to pass statement_timeout option since e.g. PGBouncer doesn't support per-connection statement timeout in transaction pooling mode: it throws "unsupported startup parameter" error. I.e. we may want to emit "SET statement_timeout TO ..." before each query in multi-query mode. | | `maxReplicationLagMs?` | `MaybeCallable`\<`number`\> | After how many milliseconds we give up waiting for the replica to catch up with the master. | | `replicaTimelinePosRefreshMs?` | `MaybeCallable`\<`number`\> | Up to how often we call TimelineManager#triggerRefresh(). | @@ -27,6 +27,8 @@ Options for PgClientPool constructor. | `config` | `PoolConfig` | Node-Postgres config. We can't make it MaybeCallable unfortunately, because it's used to initialize Node-Postgres Pool. | | `Pool?` | *typeof* `Pool` | Pool class (constructor) compatible with node-postgres Pool. | | `maxConnLifetimeMs?` | `MaybeCallable`\<`number`\> | Close the connection after the query if it was opened long time ago. | -| `maxConnLifetimeJitter?` | `MaybeCallable`\<`number`\> | Jitter for old connections closure. | +| `maxConnLifetimeJitter?` | `MaybeCallable`\<`number`\> | Jitter for maxConnLifetimeMs. | +| `prewarmIntervalStep?` | `MaybeCallable`\<`number`\> | Add not more than this number of connections in each prewarm interval. New connections are expensive to establish (especially when SSL is enabled). | | `prewarmIntervalMs?` | `MaybeCallable`\<`number`\> | How often to send bursts of prewarm queries to all Clients to keep the minimal number of open connections. | +| `prewarmIntervalJitter?` | `MaybeCallable`\<`number`\> | Jitter for prewarmIntervalMs. | | `prewarmQuery?` | `MaybeCallable`\<`string`\> | What prewarm query to send. | diff --git a/docs/interfaces/Predicate.md b/docs/interfaces/Predicate.md index 0528a82..2920fcb 100644 --- a/docs/interfaces/Predicate.md +++ b/docs/interfaces/Predicate.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/PrimitiveInstance.md b/docs/interfaces/PrimitiveInstance.md index 322d522..ec68b26 100644 --- a/docs/interfaces/PrimitiveInstance.md +++ b/docs/interfaces/PrimitiveInstance.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/Query.md b/docs/interfaces/Query.md index d06f48f..e995bd6 100644 --- a/docs/interfaces/Query.md +++ b/docs/interfaces/Query.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/QueryAnnotation.md b/docs/interfaces/QueryAnnotation.md index 44f081c..cc130e0 100644 --- a/docs/interfaces/QueryAnnotation.md +++ b/docs/interfaces/QueryAnnotation.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/RuleResult.md b/docs/interfaces/RuleResult.md index 3756ed3..64a66b6 100644 --- a/docs/interfaces/RuleResult.md +++ b/docs/interfaces/RuleResult.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/SchemaClass.md b/docs/interfaces/SchemaClass.md index 40ffcae..881310b 100644 --- a/docs/interfaces/SchemaClass.md +++ b/docs/interfaces/SchemaClass.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/SwallowedErrorLoggerProps.md b/docs/interfaces/SwallowedErrorLoggerProps.md index 8f59d9f..abca6aa 100644 --- a/docs/interfaces/SwallowedErrorLoggerProps.md +++ b/docs/interfaces/SwallowedErrorLoggerProps.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/ToolPingOptions.md b/docs/interfaces/ToolPingOptions.md index ec4a4d7..f6d19a4 100644 --- a/docs/interfaces/ToolPingOptions.md +++ b/docs/interfaces/ToolPingOptions.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/interfaces/ToolScoreboardOptions.md b/docs/interfaces/ToolScoreboardOptions.md index a0e20fc..5b60750 100644 --- a/docs/interfaces/ToolScoreboardOptions.md +++ b/docs/interfaces/ToolScoreboardOptions.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/AfterMutationTrigger.md b/docs/type-aliases/AfterMutationTrigger.md index 94a6a09..641c1dd 100644 --- a/docs/type-aliases/AfterMutationTrigger.md +++ b/docs/type-aliases/AfterMutationTrigger.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -19,7 +19,7 @@ | Parameter | Type | | ------ | ------ | | `vc` | [`VC`](../classes/VC.md) | -| `args` | `object` \| `object` \| `object` | +| `args` | \{ `op`: `"INSERT"`; `newOrOldRow`: `Readonly`\<[`TriggerInsertInput`](TriggerInsertInput.md)\<`TTable`\>\>; \} \| \{ `op`: `"UPDATE"`; `newOrOldRow`: [`TriggerUpdateNewRow`](TriggerUpdateNewRow.md)\<`TTable`\>; \} \| \{ `op`: `"DELETE"`; `newOrOldRow`: [`TriggerUpdateOrDeleteOldRow`](TriggerUpdateOrDeleteOldRow.md)\<`TTable`\>; \} | ## Returns diff --git a/docs/type-aliases/AfterUpdateTrigger.md b/docs/type-aliases/AfterUpdateTrigger.md index 16874a3..ea9a377 100644 --- a/docs/type-aliases/AfterUpdateTrigger.md +++ b/docs/type-aliases/AfterUpdateTrigger.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -19,7 +19,7 @@ | Parameter | Type | | ------ | ------ | | `vc` | [`VC`](../classes/VC.md) | -| `args` | `object` | +| `args` | \{ `newRow`: [`TriggerUpdateNewRow`](TriggerUpdateNewRow.md)\<`TTable`\>; `oldRow`: [`TriggerUpdateOrDeleteOldRow`](TriggerUpdateOrDeleteOldRow.md)\<`TTable`\>; \} | | `args.newRow` | [`TriggerUpdateNewRow`](TriggerUpdateNewRow.md)\<`TTable`\> | | `args.oldRow` | [`TriggerUpdateOrDeleteOldRow`](TriggerUpdateOrDeleteOldRow.md)\<`TTable`\> | diff --git a/docs/type-aliases/AnyClass.md b/docs/type-aliases/AnyClass.md index 9a578a0..0df2d8e 100644 --- a/docs/type-aliases/AnyClass.md +++ b/docs/type-aliases/AnyClass.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -20,4 +20,4 @@ ## Defined in -[src/ent/QueryCache.ts:14](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L14) +[src/ent/QueryCache.ts:15](https://github.com/clickup/ent-framework/blob/master/src/ent/QueryCache.ts#L15) diff --git a/docs/type-aliases/BeforeMutationTrigger.md b/docs/type-aliases/BeforeMutationTrigger.md index aaec2b6..8cf6def 100644 --- a/docs/type-aliases/BeforeMutationTrigger.md +++ b/docs/type-aliases/BeforeMutationTrigger.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -19,7 +19,7 @@ | Parameter | Type | | ------ | ------ | | `vc` | [`VC`](../classes/VC.md) | -| `args` | `object` \| `object` \| `object` | +| `args` | \{ `op`: `"INSERT"`; `newOrOldRow`: `Readonly`\<[`TriggerInsertInput`](TriggerInsertInput.md)\<`TTable`\>\>; `input`: [`TriggerInsertInput`](TriggerInsertInput.md)\<`TTable`\>; \} \| \{ `op`: `"UPDATE"`; `newOrOldRow`: [`TriggerUpdateNewRow`](TriggerUpdateNewRow.md)\<`TTable`\>; `input`: [`TriggerUpdateInput`](TriggerUpdateInput.md)\<`TTable`\>; \} \| \{ `op`: `"DELETE"`; `newOrOldRow`: [`TriggerUpdateOrDeleteOldRow`](TriggerUpdateOrDeleteOldRow.md)\<`TTable`\>; `input`: `Writeable`\<[`TriggerUpdateOrDeleteOldRow`](TriggerUpdateOrDeleteOldRow.md)\<`TTable`\>\>; \} | ## Returns diff --git a/docs/type-aliases/BeforeUpdateTrigger.md b/docs/type-aliases/BeforeUpdateTrigger.md index 27a5ad6..50bea31 100644 --- a/docs/type-aliases/BeforeUpdateTrigger.md +++ b/docs/type-aliases/BeforeUpdateTrigger.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -19,7 +19,7 @@ | Parameter | Type | | ------ | ------ | | `vc` | [`VC`](../classes/VC.md) | -| `args` | `object` | +| `args` | \{ `newRow`: [`TriggerUpdateNewRow`](TriggerUpdateNewRow.md)\<`TTable`\>; `oldRow`: [`TriggerUpdateOrDeleteOldRow`](TriggerUpdateOrDeleteOldRow.md)\<`TTable`\>; `input`: [`TriggerUpdateInput`](TriggerUpdateInput.md)\<`TTable`\>; \} | | `args.newRow` | [`TriggerUpdateNewRow`](TriggerUpdateNewRow.md)\<`TTable`\> | | `args.oldRow` | [`TriggerUpdateOrDeleteOldRow`](TriggerUpdateOrDeleteOldRow.md)\<`TTable`\> | | `args.input` | [`TriggerUpdateInput`](TriggerUpdateInput.md)\<`TTable`\> | diff --git a/docs/type-aliases/ClientErrorKind.md b/docs/type-aliases/ClientErrorKind.md index bd4da4e..b7d8bb6 100644 --- a/docs/type-aliases/ClientErrorKind.md +++ b/docs/type-aliases/ClientErrorKind.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/ClientErrorPostAction.md b/docs/type-aliases/ClientErrorPostAction.md index 60ca276..2f9ee9e 100644 --- a/docs/type-aliases/ClientErrorPostAction.md +++ b/docs/type-aliases/ClientErrorPostAction.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/ClientRole.md b/docs/type-aliases/ClientRole.md index 9df7672..4aba144 100644 --- a/docs/type-aliases/ClientRole.md +++ b/docs/type-aliases/ClientRole.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/CountInput.md b/docs/type-aliases/CountInput.md index 755ffb8..bd1bc35 100644 --- a/docs/type-aliases/CountInput.md +++ b/docs/type-aliases/CountInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/DeleteTrigger.md b/docs/type-aliases/DeleteTrigger.md index be23b0f..82d515d 100644 --- a/docs/type-aliases/DeleteTrigger.md +++ b/docs/type-aliases/DeleteTrigger.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -19,7 +19,7 @@ | Parameter | Type | | ------ | ------ | | `vc` | [`VC`](../classes/VC.md) | -| `args` | `object` | +| `args` | \{ `oldRow`: [`TriggerUpdateOrDeleteOldRow`](TriggerUpdateOrDeleteOldRow.md)\<`TTable`\>; \} | | `args.oldRow` | [`TriggerUpdateOrDeleteOldRow`](TriggerUpdateOrDeleteOldRow.md)\<`TTable`\> | ## Returns diff --git a/docs/type-aliases/DeleteWhereInput.md b/docs/type-aliases/DeleteWhereInput.md index a854bd3..b1797ce 100644 --- a/docs/type-aliases/DeleteWhereInput.md +++ b/docs/type-aliases/DeleteWhereInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/DepsBuilder.md b/docs/type-aliases/DepsBuilder.md index dcee742..52f48e3 100644 --- a/docs/type-aliases/DepsBuilder.md +++ b/docs/type-aliases/DepsBuilder.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/ExistsInput.md b/docs/type-aliases/ExistsInput.md index 9cedd10..f1385fa 100644 --- a/docs/type-aliases/ExistsInput.md +++ b/docs/type-aliases/ExistsInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/Field.md b/docs/type-aliases/Field.md index 6e285e4..f809709 100644 --- a/docs/type-aliases/Field.md +++ b/docs/type-aliases/Field.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/FieldAliased.md b/docs/type-aliases/FieldAliased.md index edd6462..e53780c 100644 --- a/docs/type-aliases/FieldAliased.md +++ b/docs/type-aliases/FieldAliased.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -6,7 +6,7 @@ # Type Alias: FieldAliased\ -> **FieldAliased**\<`TTable`\>: [`Field`](Field.md)\<`TTable`\> \| `object` +> **FieldAliased**\<`TTable`\>: [`Field`](Field.md)\<`TTable`\> \| \{ `field`: [`Field`](Field.md)\<`TTable`\>; `alias`: `string`; \} Same as Field, but may optionally hold information about of "alias value source" for a field name (e.g. `{ field: "abc", alias: "$cas.abc" }`). diff --git a/docs/type-aliases/FieldOfIDType.md b/docs/type-aliases/FieldOfIDType.md index 76ad3cb..14a9fec 100644 --- a/docs/type-aliases/FieldOfIDType.md +++ b/docs/type-aliases/FieldOfIDType.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -6,7 +6,7 @@ # Type Alias: FieldOfIDType\ -> **FieldOfIDType**\<`TTable`\>: `{ [K in Field]: K extends string ? TTable[K] extends Object ? K : never : never }`\[[`Field`](Field.md)\<`TTable`\>\] +> **FieldOfIDType**\<`TTable`\>: `{ [K in Field]: K extends string ? TTable[K] extends { type: typeof ID } ? K : never : never }`\[[`Field`](Field.md)\<`TTable`\>\] Table -> "user_id" | "some_id" | ... diff --git a/docs/type-aliases/FieldOfIDTypeRequired.md b/docs/type-aliases/FieldOfIDTypeRequired.md index dc3dd35..05e7df9 100644 --- a/docs/type-aliases/FieldOfIDTypeRequired.md +++ b/docs/type-aliases/FieldOfIDTypeRequired.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/FieldOfPotentialUniqueKey.md b/docs/type-aliases/FieldOfPotentialUniqueKey.md index 7e0d0ab..5c8e327 100644 --- a/docs/type-aliases/FieldOfPotentialUniqueKey.md +++ b/docs/type-aliases/FieldOfPotentialUniqueKey.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -6,7 +6,7 @@ # Type Alias: FieldOfPotentialUniqueKey\ -> **FieldOfPotentialUniqueKey**\<`TTable`\>: `{ [K in Field]: TTable[K] extends Object ? K : never }`\[[`Field`](Field.md)\<`TTable`\>\] +> **FieldOfPotentialUniqueKey**\<`TTable`\>: \{ \[K in Field\\]: TTable\[K\] extends \{ type: typeof Number \| typeof String \| typeof Boolean \| typeof ID \} ? K : never \}\[[`Field`](Field.md)\<`TTable`\>\] (Table) -> "field1" | "field2" | ... where the union contains only fields which can potentially be used as a part of unique key. diff --git a/docs/type-aliases/InsertFieldsOptional.md b/docs/type-aliases/InsertFieldsOptional.md index 64ba383..17b6901 100644 --- a/docs/type-aliases/InsertFieldsOptional.md +++ b/docs/type-aliases/InsertFieldsOptional.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -6,7 +6,7 @@ # Type Alias: InsertFieldsOptional\ -> **InsertFieldsOptional**\<`TTable`\>: `{ [K in keyof TTable]: TTable[K] extends Object ? K : TTable[K] extends Object ? K : never }`\[keyof `TTable`\] +> **InsertFieldsOptional**\<`TTable`\>: `{ [K in keyof TTable]: TTable[K] extends { autoInsert: unknown } ? K : TTable[K] extends { autoUpdate: unknown } ? K : never }`\[keyof `TTable`\] Insert: Table -> "created_at" | "field2" | ... deduction (optional fields). diff --git a/docs/type-aliases/InsertFieldsRequired.md b/docs/type-aliases/InsertFieldsRequired.md index 5bf24c8..0b0aa9f 100644 --- a/docs/type-aliases/InsertFieldsRequired.md +++ b/docs/type-aliases/InsertFieldsRequired.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -6,7 +6,7 @@ # Type Alias: InsertFieldsRequired\ -> **InsertFieldsRequired**\<`TTable`\>: `{ [K in keyof TTable]: TTable[K] extends Object ? never : TTable[K] extends Object ? never : K }`\[keyof `TTable`\] +> **InsertFieldsRequired**\<`TTable`\>: `{ [K in keyof TTable]: TTable[K] extends { autoInsert: unknown } ? never : TTable[K] extends { autoUpdate: unknown } ? never : K }`\[keyof `TTable`\] Insert: Table -> "field1" | "field2" | ... deduction (required). diff --git a/docs/type-aliases/InsertInput.md b/docs/type-aliases/InsertInput.md index 0fdf45e..ed51965 100644 --- a/docs/type-aliases/InsertInput.md +++ b/docs/type-aliases/InsertInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/InsertTrigger.md b/docs/type-aliases/InsertTrigger.md index 5ea962b..40ec441 100644 --- a/docs/type-aliases/InsertTrigger.md +++ b/docs/type-aliases/InsertTrigger.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -55,7 +55,7 @@ Naming convention for trigger arguments: | Parameter | Type | | ------ | ------ | | `vc` | [`VC`](../classes/VC.md) | -| `args` | `object` | +| `args` | \{ `input`: [`TriggerInsertInput`](TriggerInsertInput.md)\<`TTable`\>; \} | | `args.input` | [`TriggerInsertInput`](TriggerInsertInput.md)\<`TTable`\> | ## Returns diff --git a/docs/type-aliases/Literal.md b/docs/type-aliases/Literal.md index 6032f64..c946255 100644 --- a/docs/type-aliases/Literal.md +++ b/docs/type-aliases/Literal.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/LoadByInput.md b/docs/type-aliases/LoadByInput.md index 293c7f9..0c18be2 100644 --- a/docs/type-aliases/LoadByInput.md +++ b/docs/type-aliases/LoadByInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/LoadRule.md b/docs/type-aliases/LoadRule.md index ee90f18..15d2185 100644 --- a/docs/type-aliases/LoadRule.md +++ b/docs/type-aliases/LoadRule.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/Order.md b/docs/type-aliases/Order.md index 682b09b..f938d92 100644 --- a/docs/type-aliases/Order.md +++ b/docs/type-aliases/Order.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/PrimitiveClass.md b/docs/type-aliases/PrimitiveClass.md index 359dda5..dee44c5 100644 --- a/docs/type-aliases/PrimitiveClass.md +++ b/docs/type-aliases/PrimitiveClass.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/Row.md b/docs/type-aliases/Row.md index 5db6042..f694950 100644 --- a/docs/type-aliases/Row.md +++ b/docs/type-aliases/Row.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/RowWithID.md b/docs/type-aliases/RowWithID.md index d206a1a..86ca3fe 100644 --- a/docs/type-aliases/RowWithID.md +++ b/docs/type-aliases/RowWithID.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/RuleDecision.md b/docs/type-aliases/RuleDecision.md index 54b2b3f..d2a0cb5 100644 --- a/docs/type-aliases/RuleDecision.md +++ b/docs/type-aliases/RuleDecision.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/SelectByInput.md b/docs/type-aliases/SelectByInput.md index c07cad1..459e3b2 100644 --- a/docs/type-aliases/SelectByInput.md +++ b/docs/type-aliases/SelectByInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/SelectInput.md b/docs/type-aliases/SelectInput.md index ee296e1..546c92b 100644 --- a/docs/type-aliases/SelectInput.md +++ b/docs/type-aliases/SelectInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/SelectInputCustom.md b/docs/type-aliases/SelectInputCustom.md index dd38009..4059346 100644 --- a/docs/type-aliases/SelectInputCustom.md +++ b/docs/type-aliases/SelectInputCustom.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -6,7 +6,7 @@ # Type Alias: SelectInputCustom -> **SelectInputCustom**: `object` \| `undefined` +> **SelectInputCustom**: \{ `ctes`: [`Literal`](Literal.md)[]; `joins`: [`Literal`](Literal.md)[]; `from`: [`Literal`](Literal.md); `hints`: `Record`\<`string`, `string`\>; \} \| `undefined` This is mostly to do hacks in PostgreSQL queries. Not even exposed by Ent framework, but can be used by PG-dependent code. diff --git a/docs/type-aliases/ShardAffinity.md b/docs/type-aliases/ShardAffinity.md index 59a560e..f6da1ca 100644 --- a/docs/type-aliases/ShardAffinity.md +++ b/docs/type-aliases/ShardAffinity.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/Spec.md b/docs/type-aliases/Spec.md index efc327a..bdd495d 100644 --- a/docs/type-aliases/Spec.md +++ b/docs/type-aliases/Spec.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/SpecType.md b/docs/type-aliases/SpecType.md index 428a0b7..cddc57e 100644 --- a/docs/type-aliases/SpecType.md +++ b/docs/type-aliases/SpecType.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -6,10 +6,92 @@ # Type Alias: SpecType -> **SpecType**: *typeof* `Boolean` \| *typeof* `Date` \| *typeof* [`ID`](../variables/ID.md) \| *typeof* `Number` \| *typeof* `String` \| `object` +> **SpecType**: *typeof* `Boolean` \| *typeof* `Date` \| *typeof* [`ID`](../variables/ID.md) \| *typeof* `Number` \| *typeof* `String` \| \{ `dbValueToJs`: (`dbValue`) => `unknown`; `stringify`: (`jsValue`) => `string`; `parse`: (`str`) => `unknown`; \} Spec (metadata) of some field. +## Type declaration + +*typeof* `Boolean` + +*typeof* `Date` + +*typeof* [`ID`](../variables/ID.md) + +*typeof* `Number` + +*typeof* `String` + +\{ `dbValueToJs`: (`dbValue`) => `unknown`; `stringify`: (`jsValue`) => `string`; `parse`: (`str`) => `unknown`; \} + +### dbValueToJs() + +> **dbValueToJs**: (`dbValue`) => `unknown` + +Converts a value of some field returned by the low-level DB engine to +its Client representation, which can be reacher (e.g. support +encryption/decryption). Notice that some DB engines already do some +conversions internally: e.g. for node-postgres and an array field, +dbValue returned by the engine is already an array of things, so +dbValueToJs for it will likely do nothing. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `dbValue` | `DesperateAny` | + +#### Returns + +`unknown` + +### stringify() + +> **stringify**: (`jsValue`) => `string` + +Converts a Client value to the internal stringified representation of +the low-level DB engine, which is suitable for injecting it into a +plaintext query (with e.g. ?-placeholders). +- Notice that this is intentionally NOT the opposite to dbValueToJs, + because it always needs to convert the value to a string, not to the + DB engine's row field type. +- Example: node-postgres natively understands json/jsonb PG types and + can unescape them (called "PG type parsers" and mainly lives in + pg-types module; notice that there are no "PG type stringifiers + though"). The problem is that the low-level library's facilities for + escaping data is poor or doesn't exist (we do escaping by ourselves + for various reasons, like batching queries and better logging). So we + trust the library on the dbValueToJs path, but must manually + serialize on stringify path. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `jsValue` | `DesperateAny` | + +#### Returns + +`string` + +### parse() + +> **parse**: (`str`) => `unknown` + +The opposite to stringify function. Generally, it is not used on the +read path (because the low level engine returns the rows suitable for +dbValueToJs), but it's still here for completeness of the interface. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `str` | `string` | + +#### Returns + +`unknown` + ## Defined in [src/types.ts:40](https://github.com/clickup/ent-framework/blob/master/src/types.ts#L40) diff --git a/docs/type-aliases/Table.md b/docs/type-aliases/Table.md index 87ab42f..95577cc 100644 --- a/docs/type-aliases/Table.md +++ b/docs/type-aliases/Table.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/TimelineCaughtUpReason.md b/docs/type-aliases/TimelineCaughtUpReason.md index 8d0fdb7..a2b3861 100644 --- a/docs/type-aliases/TimelineCaughtUpReason.md +++ b/docs/type-aliases/TimelineCaughtUpReason.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/TriggerInsertInput.md b/docs/type-aliases/TriggerInsertInput.md index f5908e0..972c038 100644 --- a/docs/type-aliases/TriggerInsertInput.md +++ b/docs/type-aliases/TriggerInsertInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/TriggerUpdateInput.md b/docs/type-aliases/TriggerUpdateInput.md index 26ffbed..cb4460e 100644 --- a/docs/type-aliases/TriggerUpdateInput.md +++ b/docs/type-aliases/TriggerUpdateInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/TriggerUpdateNewRow.md b/docs/type-aliases/TriggerUpdateNewRow.md index aeec640..bbf7cdb 100644 --- a/docs/type-aliases/TriggerUpdateNewRow.md +++ b/docs/type-aliases/TriggerUpdateNewRow.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/TriggerUpdateOrDeleteOldRow.md b/docs/type-aliases/TriggerUpdateOrDeleteOldRow.md index 7276ea3..aa5aa32 100644 --- a/docs/type-aliases/TriggerUpdateOrDeleteOldRow.md +++ b/docs/type-aliases/TriggerUpdateOrDeleteOldRow.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/UniqueKey.md b/docs/type-aliases/UniqueKey.md index ba557eb..9ecc645 100644 --- a/docs/type-aliases/UniqueKey.md +++ b/docs/type-aliases/UniqueKey.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/UpdateField.md b/docs/type-aliases/UpdateField.md index 776a215..eead99e 100644 --- a/docs/type-aliases/UpdateField.md +++ b/docs/type-aliases/UpdateField.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/UpdateInput.md b/docs/type-aliases/UpdateInput.md index 532e723..fb9b125 100644 --- a/docs/type-aliases/UpdateInput.md +++ b/docs/type-aliases/UpdateInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/UpdateOriginalInput.md b/docs/type-aliases/UpdateOriginalInput.md index 5ae8355..a2e8d6a 100644 --- a/docs/type-aliases/UpdateOriginalInput.md +++ b/docs/type-aliases/UpdateOriginalInput.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/ValidationRules.md b/docs/type-aliases/ValidationRules.md index d1ef0b1..77fce17 100644 --- a/docs/type-aliases/ValidationRules.md +++ b/docs/type-aliases/ValidationRules.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/Value.md b/docs/type-aliases/Value.md index 6c1cd31..5228799 100644 --- a/docs/type-aliases/Value.md +++ b/docs/type-aliases/Value.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/ValueRequired.md b/docs/type-aliases/ValueRequired.md index 8b341db..ad3e828 100644 --- a/docs/type-aliases/ValueRequired.md +++ b/docs/type-aliases/ValueRequired.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/Where.md b/docs/type-aliases/Where.md index 16e8254..95944bb 100644 --- a/docs/type-aliases/Where.md +++ b/docs/type-aliases/Where.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** @@ -6,7 +6,7 @@ # Type Alias: Where\ -> **Where**\<`TTable`\>: `object` & `object` & \{ \[K in Field\\]?: Value\ \| ReadonlyArray\\> \| Object \| Object \| Object \| Object \| Object \| Object \| Object \} +> **Where**\<`TTable`\>: `object` & `object` & \{ \[K in Field\\]?: Value\ \| ReadonlyArray\\> \| \{ $lte: NonNullable\\> \} \| \{ $lt: NonNullable\\> \} \| \{ $gte: NonNullable\\> \} \| \{ $gt: NonNullable\\> \} \| \{ $overlap: NonNullable\\> \} \| \{ $ne: Value\ \| ReadonlyArray\\> \} \| \{ $isDistinctFrom: Value\ \} \} Table -> { f: 10, [$or]: [ { f2: "a }, { f3: "b""} ], $literal: ["x=?", 1] } diff --git a/docs/type-aliases/WhyClient.md b/docs/type-aliases/WhyClient.md index 4569e03..e52b6af 100644 --- a/docs/type-aliases/WhyClient.md +++ b/docs/type-aliases/WhyClient.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/type-aliases/WriteRules.md b/docs/type-aliases/WriteRules.md index 5ae3662..d095930 100644 --- a/docs/type-aliases/WriteRules.md +++ b/docs/type-aliases/WriteRules.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/variables/GLOBAL_SHARD.md b/docs/variables/GLOBAL_SHARD.md index f59dd5f..af327d7 100644 --- a/docs/variables/GLOBAL_SHARD.md +++ b/docs/variables/GLOBAL_SHARD.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/variables/GUEST_ID.md b/docs/variables/GUEST_ID.md index 79bb7a0..91b75a5 100644 --- a/docs/variables/GUEST_ID.md +++ b/docs/variables/GUEST_ID.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/variables/ID.md b/docs/variables/ID.md index 76c76f9..e862a74 100644 --- a/docs/variables/ID.md +++ b/docs/variables/ID.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/variables/MASTER.md b/docs/variables/MASTER.md index 183bd05..8e02b1d 100644 --- a/docs/variables/MASTER.md +++ b/docs/variables/MASTER.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/variables/OMNI_ID.md b/docs/variables/OMNI_ID.md index 1e422ff..8d820ad 100644 --- a/docs/variables/OMNI_ID.md +++ b/docs/variables/OMNI_ID.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/docs/variables/STALE_REPLICA.md b/docs/variables/STALE_REPLICA.md index 11c34d1..e637740 100644 --- a/docs/variables/STALE_REPLICA.md +++ b/docs/variables/STALE_REPLICA.md @@ -1,4 +1,4 @@ -[**@clickup/ent-framework**](../README.md) • **Docs** +[**@clickup/ent-framework**](../README.md) *** diff --git a/package.json b/package.json index 8ec4308..9a4259c 100644 --- a/package.json +++ b/package.json @@ -71,9 +71,9 @@ "prettier": "3.2.1", "streaming-iterables": "^7.1.0", "ts-jest": "^29.1.1", - "typedoc-plugin-markdown": "^4.2.10", - "typedoc-plugin-merge-modules": "^6.0.3", - "typedoc": "0.26.11", + "typedoc-plugin-markdown": "^4.3.2", + "typedoc-plugin-merge-modules": "^6.1.0", + "typedoc": "0.27.5", "typescript": "^5.2.2", "wait-for-expect": "^3.0.2" }, diff --git a/src/ent/Triggers.ts b/src/ent/Triggers.ts index 414a6f3..ae225b0 100644 --- a/src/ent/Triggers.ts +++ b/src/ent/Triggers.ts @@ -350,6 +350,7 @@ export class Triggers { /** * Simulates an update for a row, as if it's applied to the Ent. + * @ignore */ export function buildUpdateNewRow( oldRow: Row, diff --git a/typedoc.config.js b/typedoc.config.js index bbfb5f3..736f08c 100644 --- a/typedoc.config.js +++ b/typedoc.config.js @@ -3,7 +3,12 @@ const { basename } = require("path"); module.exports = { entryPoints: ["src"], - exclude: ["**/internal/**", "**/__tests__/**", "**/node_modules/**"], + exclude: [ + "**/internal/**", + "**/__tests__/**", + "**/__benchmarks__/**", + "**/node_modules/**", + ], entryPointStrategy: "expand", mergeModulesMergeMode: "project", sort: ["source-order"],