better-convex 0.8.2 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.d.ts +2 -1
- package/dist/aggregate/index.js +1 -1
- package/dist/{id-BcBb900m.js → id-DdAxiGby.js} +9 -10
- package/dist/orm/index.d.ts +1 -1
- package/dist/orm/index.js +100 -36
- package/dist/plugins/index.d.ts +2 -4
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/ratelimit/index.d.ts +2 -1
- package/dist/{runtime-C0WcYGY0.js → runtime-oWZgeWOJ.js} +1 -1
- package/dist/{schema-Bx6j2doh.js → schema-DVFZAlKx.js} +1 -1
- package/dist/server/index.js +17 -6
- package/dist/{where-clause-compiler-BIjTkVVJ.d.ts → where-clause-compiler-_b1UHbYW.d.ts} +82 -3
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jt as ConvexCustomBuilderInitial, sn as ConvexTableWithColumns, vt as ConvexTextBuilderInitial, wt as ConvexIdBuilderInitial, xt as ConvexNumberBuilderInitial } from "../where-clause-compiler-_b1UHbYW.js";
|
|
2
|
+
import "../orm/index.js";
|
|
2
3
|
import * as convex_values0 from "convex/values";
|
|
3
4
|
import { GenericId, Infer, Value } from "convex/values";
|
|
4
5
|
import { DocumentByName, GenericDataModel, GenericDatabaseReader, GenericDatabaseWriter, TableNamesInDataModel } from "convex/server";
|
package/dist/aggregate/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as TableAggregate$1, r as aggregateStorageTables, t as DirectAggregate$1 } from "../runtime-
|
|
1
|
+
import { n as TableAggregate$1, r as aggregateStorageTables, t as DirectAggregate$1 } from "../runtime-oWZgeWOJ.js";
|
|
2
2
|
|
|
3
3
|
//#region src/aggregate/index.ts
|
|
4
4
|
const wrapTriggerFactory = (methodName, factory) => ((...args) => {
|
|
@@ -15,15 +15,14 @@ function isColumnBuilder(value) {
|
|
|
15
15
|
function toRequiredValidator(validator) {
|
|
16
16
|
return validator.isOptional === "optional" ? vRequired(validator) : validator;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return stripNullUnionMember(toRequiredValidator(validator));
|
|
18
|
+
function toRequiredBuilderValidator(validator) {
|
|
19
|
+
const requiredValidator = toRequiredValidator(validator);
|
|
20
|
+
if (requiredValidator.kind !== "union") return requiredValidator;
|
|
21
|
+
const nonNullMembers = requiredValidator.members.filter((member) => member.kind !== "null");
|
|
22
|
+
if (nonNullMembers.length !== 1) return requiredValidator;
|
|
23
|
+
const [member] = nonNullMembers;
|
|
24
|
+
if (member.kind === "object" || member.kind === "array") return member;
|
|
25
|
+
return requiredValidator;
|
|
27
26
|
}
|
|
28
27
|
function formatInvalidInput(path, value) {
|
|
29
28
|
return `${path} expected a column builder, Convex validator, or nested object shape. Got ${Array.isArray(value) ? "array" : value === null ? "null" : typeof value}.`;
|
|
@@ -34,7 +33,7 @@ function objectShapeToValidator(shape, path) {
|
|
|
34
33
|
return v.object(fields);
|
|
35
34
|
}
|
|
36
35
|
function nestedInputToValidator(input, path) {
|
|
37
|
-
if (isColumnBuilder(input)) return
|
|
36
|
+
if (isColumnBuilder(input)) return toRequiredBuilderValidator(input.convexValidator);
|
|
38
37
|
if (isValidator(input)) return toRequiredValidator(input);
|
|
39
38
|
if (isRecord(input)) return objectShapeToValidator(input, path);
|
|
40
39
|
throw new Error(formatInvalidInput(path, input));
|
package/dist/orm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-BcQFm1oY.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as DatabaseWithMutations, $n as CountConfig, $r as or, $t as RelationsBuilderColumnConfig, A as MigrationCancelArgs, An as ConvexVectorIndexBuilderOn, Ar as FilterExpression, At as ConvexCustomBuilder, B as MigrationManifestEntry, Bn as ConvexForeignKeyBuilder, Br as gte, Bt as ConvexBooleanBuilderInitial, C as OrmBeforeResult, Cn as ConvexIndexBuilderOn, Cr as UpdateSet, Ct as ConvexIdBuilder, D as OrmTriggers, Dn as ConvexSearchIndexBuilderOn, Dr as BinaryExpression, Dt as ConvexDateBuilderInitial, E as OrmTriggerContext, En as ConvexSearchIndexBuilder, Er as unsetToken, Et as ConvexDateBuilder, F as MigrationDefinition, Fn as searchIndex, Fr as contains, Ft as objectOf, G as MigrationStateMap, Gn as check, Gr as isNull, Gt as CountBackfillChunkArgs, H as MigrationPlan, Hn as ConvexUniqueConstraintBuilder, Hr as inArray, Ht as ConvexBigIntBuilder, I as MigrationDirection, In as uniqueIndex, Ir as endsWith, It as ConvexBytesBuilder, J as MigrationWriteMode, Jn as AggregateConfig, Jr as lte, Jt as ExtractTablesWithRelations, K as MigrationStep, Kn as foreignKey, Kr as like, Kt as CountBackfillKickoffArgs, L as MigrationDoc, Ln as vectorIndex, Lr as eq, Lt as ConvexBytesBuilderInitial, M as MigrationRunChunkArgs, Mn as aggregateIndex, Mr as UnaryExpression, Mt as arrayOf, N as MigrationStatusArgs, Nn as index, Nr as and, Nt as custom, O as defineTriggers, On as ConvexSearchIndexConfig, Or as ExpressionVisitor, Ot as ConvexDateMode, P as MigrationAppliedState, Pn as rankIndex, Pr as between, Pt as json, Q as detectMigrationDrift, Qn as BuildRelationResult, Qr as notInArray, Qt as RelationsBuilderColumnBase, R as MigrationDocContext, Rn as ConvexCheckBuilder, Rr as fieldRef, Rt as bytes, S as scheduledDeleteFactory, Sn as ConvexIndexBuilder, Sr as ReturningSelection, St as integer, T as OrmTriggerChange, Tn as ConvexRankIndexBuilderOn, Tr as VectorSearchProvider, Tt as id, U as MigrationRunStatus, Un as ConvexUniqueConstraintBuilderOn, Ur as isFieldReference, Ut as ConvexBigIntBuilderInitial, V as MigrationMigrateOne, Vn as ConvexForeignKeyConfig, Vr as ilike, Vt as boolean, W as MigrationSet, Wn as ConvexUniqueConstraintConfig, Wr as isNotNull, Wt as bigint, X as defineMigration, Xn as AggregateResult, Xr as not, Xt as OneConfig, Y as buildMigrationPlan, Yn as AggregateFieldValue, Yr as ne, Yt as ManyConfig, Z as defineMigrationSet, Zn as BuildQueryResult, Zr as notBetween, Zt as RelationsBuilder, _ as OrmWriterCtx, _i as IsUnique, _n as RlsRole, _r as OrderDirection, _t as ConvexTextBuilder, a as TableConfigResult, ai as TableName, an as ConvexDeletionConfig, ar as InferModelFromColumns, at as EdgeMetadata, b as scheduledMutationBatchFactory, bn as ConvexAggregateIndexBuilder, br as ReturningAll, bt as ConvexNumberBuilder, c as OrmNotFoundError, ci as ColumnBuilder, cn as OrmLifecycleChange, cr as MutationExecuteConfig, ct as ConvexVectorBuilderInitial, d as GenericOrmCtx, di as ColumnBuilderTypeConfig, dn as convexTable, dr as MutationPaginateConfig, dt as ConvexTimestampBuilderInitial, ei as startsWith, en as TableRelationalConfig, er as CountResult, et as DatabaseWithQuery, f as OrmApiResult, fi as ColumnBuilderWithTableName, fn as deletion, fr as MutationPaginatedResult, ft as ConvexTimestampMode, g as OrmReaderCtx, gi as IsPrimaryKey, gn as rlsPolicy, gr as OrderByClause, gt as textEnum, h as OrmFunctions, hi as HasDefault, hn as RlsPolicyToOption, hr as MutationRunMode, ht as ConvexTextEnumBuilderInitial, i as desc, ii as OrmSchemaPluginTables, in as ConvexDeletionBuilder, ir as InferInsertModel, it as RlsMode, j as MigrationRunArgs, jn as ConvexVectorIndexConfig, jr as LogicalExpression, jt as ConvexCustomBuilderInitial, kn as ConvexVectorIndexBuilder, kr as FieldReference, kt as date, l as CreateOrmOptions, li as ColumnBuilderBaseConfig, ln as OrmLifecycleOperation, lr as MutationExecuteResult, lt as vector, m as OrmClientWithApi, mi as DrizzleEntity, mn as RlsPolicyConfig, mr as MutationReturning, mt as ConvexTextEnumBuilder, n as defineSchema, ni as Columns, nn as defineRelations, nr as FilterOperators, nt as OrmWriter, o as getTableColumns, oi as SystemFields, on as ConvexTable, or as InferSelectModel, ot as extractRelationsConfig, p as OrmClientBase, pi as ColumnDataType, pn as RlsPolicy, pr as MutationResult, pt as timestamp, q as MigrationTableName, qn as unique, qr as lt, qt as CountBackfillStatusArgs, r as asc, ri as OrmSchemaPlugin, rn as defineRelationsPart, rr as GetColumnData, rt as RlsContext, s as getTableConfig, si as AnyColumn, sr as InsertValue, st as ConvexVectorBuilder, t as WhereClauseResult, ti as Brand, tn as TablesRelationalConfig, tr as DBQueryConfig, tt as OrmReader, u as GenericOrm, ui as ColumnBuilderRuntimeConfig, un as TableConfig, ur as MutationExecutionMode, ut as ConvexTimestampBuilder, v as createOrm, vi as NotNull, vn as RlsRoleConfig, vr as PaginatedResult, vt as ConvexTextBuilderInitial, w as OrmTableTriggers, wn as ConvexRankIndexBuilder, wr as VectorQueryConfig, wt as ConvexIdBuilderInitial, x as ScheduledDeleteArgs, xn as ConvexAggregateIndexBuilderOn, xr as ReturningResult, xt as ConvexNumberBuilderInitial, y as ScheduledMutationBatchArgs, yn as rlsRole, yr as PredicateWhereIndexConfig, yt as text, z as MigrationDriftIssue, zn as ConvexCheckConfig, zr as gt, zt as ConvexBooleanBuilder } from "../where-clause-compiler-_b1UHbYW.js";
|
|
3
3
|
import { a as QueryCtxWithPreferredOrmQueryTable, i as QueryCtxWithOrmQueryTable, n as LookupByIdResultByCtx, o as getByIdWithOrmQueryFallback, r as QueryCtxWithOptionalOrmQueryTable, t as DocByCtx } from "../query-context-ji7By8u0.js";
|
|
4
4
|
import { DefineSchemaOptions, GenericSchema, SchemaDefinition } from "convex/server";
|
|
5
5
|
export { type AggregateConfig, type AggregateFieldValue, type AggregateResult, type AnyColumn, type BinaryExpression, Brand, type BuildQueryResult, type BuildRelationResult, type ColumnBuilder, type ColumnBuilderBaseConfig, type ColumnBuilderRuntimeConfig, type ColumnBuilderTypeConfig, type ColumnBuilderWithTableName, type ColumnDataType, Columns, type ConvexAggregateIndexBuilder, type ConvexAggregateIndexBuilderOn, type ConvexBigIntBuilder, type ConvexBigIntBuilderInitial, type ConvexBooleanBuilder, type ConvexBooleanBuilderInitial, type ConvexBytesBuilder, type ConvexBytesBuilderInitial, type ConvexCheckBuilder, type ConvexCheckConfig, type ConvexCustomBuilder, type ConvexCustomBuilderInitial, type ConvexDateBuilder, type ConvexDateBuilderInitial, type ConvexDateMode, type ConvexDeletionBuilder, type ConvexDeletionConfig, type ConvexForeignKeyBuilder, type ConvexForeignKeyConfig, type ConvexIdBuilder, type ConvexIdBuilderInitial, type ConvexIndexBuilder, type ConvexIndexBuilderOn, type ConvexNumberBuilder, type ConvexNumberBuilderInitial, type ConvexRankIndexBuilder, type ConvexRankIndexBuilderOn, type ConvexSearchIndexBuilder, type ConvexSearchIndexBuilderOn, type ConvexSearchIndexConfig, type ConvexTable, type ConvexTextBuilder, type ConvexTextBuilderInitial, type ConvexTextEnumBuilder, type ConvexTextEnumBuilderInitial, type ConvexTimestampBuilder, type ConvexTimestampBuilderInitial, type ConvexTimestampMode, type ConvexUniqueConstraintBuilder, type ConvexUniqueConstraintBuilderOn, type ConvexUniqueConstraintConfig, type ConvexVectorBuilder, type ConvexVectorBuilderInitial, type ConvexVectorIndexBuilder, type ConvexVectorIndexBuilderOn, type ConvexVectorIndexConfig, type CountBackfillChunkArgs, type CountBackfillKickoffArgs, type CountBackfillStatusArgs, type CountConfig, type CountResult, type CreateOrmOptions, type DBQueryConfig, type DatabaseWithMutations, type DatabaseWithQuery, type DefineSchemaOptions, type DocByCtx, type DrizzleEntity, type EdgeMetadata, type ExpressionVisitor, type ExtractTablesWithRelations, type FieldReference, type FilterExpression, type FilterOperators, type GenericOrm, type GenericOrmCtx, type GenericSchema, type GetColumnData, type HasDefault, type InferInsertModel, type InferModelFromColumns, type InferSelectModel, type InsertValue, type IsPrimaryKey, type IsUnique, type LogicalExpression, type LookupByIdResultByCtx, type ManyConfig, type MigrationAppliedState, type MigrationCancelArgs, type MigrationDefinition, type MigrationDirection, type MigrationDoc, type MigrationDocContext, type MigrationDriftIssue, type MigrationManifestEntry, type MigrationMigrateOne, type MigrationPlan, type MigrationRunArgs, type MigrationRunChunkArgs, type MigrationRunStatus, type MigrationSet, type MigrationStateMap, type MigrationStatusArgs, type MigrationStep, type MigrationTableName, type MigrationWriteMode, type MutationExecuteConfig, type MutationExecuteResult, type MutationExecutionMode, type MutationPaginateConfig, type MutationPaginatedResult, type MutationResult, type MutationReturning, type MutationRunMode, type NotNull, type OneConfig, type OrderByClause, type OrderDirection, type OrmApiResult, type OrmBeforeResult, type OrmClientBase, type OrmClientWithApi, type OrmFunctions, type OrmLifecycleChange, type OrmLifecycleOperation, OrmNotFoundError, type OrmReader, type OrmReaderCtx, type OrmSchemaPlugin, OrmSchemaPluginTables, type OrmTableTriggers, type OrmTriggerChange, type OrmTriggerContext, type OrmTriggers, type OrmWriter, type OrmWriterCtx, type PaginatedResult, type PredicateWhereIndexConfig, type QueryCtxWithOptionalOrmQueryTable, type QueryCtxWithOrmQueryTable, type QueryCtxWithPreferredOrmQueryTable, type RelationsBuilder, type RelationsBuilderColumnBase, type RelationsBuilderColumnConfig, type ReturningAll, type ReturningResult, type ReturningSelection, type RlsContext, type RlsMode, RlsPolicy, type RlsPolicyConfig, type RlsPolicyToOption, RlsRole, type RlsRoleConfig, type ScheduledDeleteArgs, type ScheduledMutationBatchArgs, type SchemaDefinition, type SystemFields, type TableConfig, type TableConfigResult, TableName, type TableRelationalConfig, type TablesRelationalConfig, type UnaryExpression, type UpdateSet, type VectorQueryConfig, type VectorSearchProvider, type WhereClauseResult, aggregateIndex, and, arrayOf, asc, between, bigint, boolean, buildMigrationPlan, bytes, check, contains, convexTable, createOrm, custom, date, defineMigration, defineMigrationSet, defineRelations, defineRelationsPart, defineSchema, defineTriggers, deletion, deprecated, desc, detectMigrationDrift, endsWith, eq, extractRelationsConfig, fieldRef, foreignKey, getByIdWithOrmQueryFallback, getTableColumns, getTableConfig, gt, gte, id, ilike, inArray, index, integer, isFieldReference, isNotNull, isNull, json, like, lt, lte, ne, not, notBetween, notInArray, objectOf, or, pretend, pretendRequired, rankIndex, rlsPolicy, rlsRole, scheduledDeleteFactory, scheduledMutationBatchFactory, searchIndex, startsWith, text, textEnum, timestamp, unique, uniqueIndex, unsetToken, vector, vectorIndex };
|
package/dist/orm/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as DirectAggregate } from "../runtime-
|
|
1
|
+
import { t as DirectAggregate } from "../runtime-oWZgeWOJ.js";
|
|
2
2
|
import { C as integer, S as createSystemFields, T as entityKind, _ as rankIndex, a as EnableRLS, b as vectorIndex, c as OrmSchemaOptions, d as TableDeleteConfig, f as TableName, g as index, h as aggregateIndex, i as Columns, l as OrmSchemaPluginTables, m as rlsPolicy, n as deletion, o as OrmContext, p as RlsPolicy, r as Brand, s as OrmSchemaDefinition, t as convexTable, u as RlsPolicies, v as searchIndex, w as ConvexColumnBuilder, x as text, y as uniqueIndex } from "../table-B7yzBihE.js";
|
|
3
|
-
import { a as AGGREGATE_EXTREMA_TABLE, c as aggregatePlugin, i as AGGREGATE_BUCKET_TABLE, l as boolean, n as MIGRATION_STATE_TABLE, o as AGGREGATE_MEMBER_TABLE, r as migrationPlugin, s as AGGREGATE_STATE_TABLE, t as MIGRATION_RUN_TABLE } from "../schema-
|
|
3
|
+
import { a as AGGREGATE_EXTREMA_TABLE, c as aggregatePlugin, i as AGGREGATE_BUCKET_TABLE, l as boolean, n as MIGRATION_STATE_TABLE, o as AGGREGATE_MEMBER_TABLE, r as migrationPlugin, s as AGGREGATE_STATE_TABLE, t as MIGRATION_RUN_TABLE } from "../schema-DVFZAlKx.js";
|
|
4
4
|
import { a as pretendRequired, i as pretend, n as deprecated } from "../validators-D_i3BK7v.js";
|
|
5
|
-
import { a as objectOf, i as json, n as arrayOf, r as custom, t as id } from "../id-
|
|
5
|
+
import { a as objectOf, i as json, n as arrayOf, r as custom, t as id } from "../id-DdAxiGby.js";
|
|
6
6
|
import { t as textEnum } from "../text-enum-CFdcLUuw.js";
|
|
7
7
|
import { A as ne, C as inArray, D as like, E as isNull, F as notLike, I as or, L as startsWith, M as notBetween, N as notIlike, O as lt, P as notInArray, S as ilike, T as isNotNull, _ as endsWith, a as mergedStream, b as gt, c as isUnsetToken, d as arrayContained, f as arrayContains, g as contains, h as column, i as getIndexFields, j as not, k as lte, l as unsetToken, m as between, n as EmptyStream, o as stream, p as arrayOverlaps, r as QueryStream, s as streamIndexRange, t as getByIdWithOrmQueryFallback, u as and, v as eq, w as isFieldReference, x as gte, y as fieldRef } from "../query-context-DEUFBhXS.js";
|
|
8
8
|
import { v } from "convex/values";
|
|
@@ -4815,10 +4815,85 @@ var GelRelationalQuery = class extends QueryPromise {
|
|
|
4815
4815
|
if (hasFilterWith) this._stripFilterRelations(filtered, filterWith, requestedWith);
|
|
4816
4816
|
return filtered;
|
|
4817
4817
|
}
|
|
4818
|
+
_resolvePolymorphicFinalizeState() {
|
|
4819
|
+
const rawPolymorphic = this.config.polymorphic;
|
|
4820
|
+
if (rawPolymorphic === void 0) return null;
|
|
4821
|
+
if (!this._isRecord(rawPolymorphic)) throw new Error("polymorphic must be an object.");
|
|
4822
|
+
const discriminator = rawPolymorphic.discriminator;
|
|
4823
|
+
if (typeof discriminator !== "string" || discriminator.length === 0) throw new Error("polymorphic.discriminator must be a non-empty string.");
|
|
4824
|
+
const aliasRaw = rawPolymorphic.as;
|
|
4825
|
+
const alias = aliasRaw === void 0 ? "target" : typeof aliasRaw === "string" && aliasRaw.length > 0 ? aliasRaw : null;
|
|
4826
|
+
if (!alias) throw new Error("polymorphic.as must be a non-empty string when set.");
|
|
4827
|
+
const schema = rawPolymorphic.schema;
|
|
4828
|
+
if (!schema || typeof schema.safeParse !== "function" && typeof schema.parse !== "function") throw new Error("polymorphic.schema must provide safeParse() or parse().");
|
|
4829
|
+
const rawCases = rawPolymorphic.cases;
|
|
4830
|
+
if (!this._isRecord(rawCases) || Object.keys(rawCases).length === 0) throw new Error("polymorphic.cases must be a non-empty object of discriminator-to-relation mappings.");
|
|
4831
|
+
const cases = {};
|
|
4832
|
+
for (const [caseKey, caseRelation] of Object.entries(rawCases)) {
|
|
4833
|
+
if (typeof caseRelation !== "string" || caseRelation.length === 0) throw new Error(`polymorphic.cases.${caseKey} must be a relation name string.`);
|
|
4834
|
+
const relation = this.tableConfig.relations[caseRelation];
|
|
4835
|
+
if (!relation) throw new Error(`polymorphic.cases.${caseKey} references unknown relation '${caseRelation}' on '${this.tableConfig.name}'.`);
|
|
4836
|
+
if (relation.relationType !== "one") throw new Error(`polymorphic.cases.${caseKey} must map to a one() relation; received '${caseRelation}'.`);
|
|
4837
|
+
cases[caseKey] = caseRelation;
|
|
4838
|
+
}
|
|
4839
|
+
const requestedWith = this.config.with;
|
|
4840
|
+
const effectiveWith = requestedWith ? { ...requestedWith } : {};
|
|
4841
|
+
const autoLoadedCaseRelations = /* @__PURE__ */ new Set();
|
|
4842
|
+
for (const relationName of new Set(Object.values(cases))) if (effectiveWith[relationName] === void 0) {
|
|
4843
|
+
effectiveWith[relationName] = true;
|
|
4844
|
+
autoLoadedCaseRelations.add(relationName);
|
|
4845
|
+
}
|
|
4846
|
+
return {
|
|
4847
|
+
requestedWith,
|
|
4848
|
+
effectiveWith: Object.keys(effectiveWith).length ? effectiveWith : void 0,
|
|
4849
|
+
autoLoadedCaseRelations,
|
|
4850
|
+
discriminator,
|
|
4851
|
+
alias,
|
|
4852
|
+
cases,
|
|
4853
|
+
schema
|
|
4854
|
+
};
|
|
4855
|
+
}
|
|
4856
|
+
_extractPolymorphicSchemaErrorMessage(error) {
|
|
4857
|
+
if (!error || typeof error !== "object") return String(error);
|
|
4858
|
+
const issueMessage = error.issues?.[0]?.message;
|
|
4859
|
+
if (issueMessage) return issueMessage;
|
|
4860
|
+
return error.message ?? String(error);
|
|
4861
|
+
}
|
|
4862
|
+
_synthesizePolymorphicRows(rows, config) {
|
|
4863
|
+
for (const row of rows) {
|
|
4864
|
+
const discriminatorValue = row[config.discriminator];
|
|
4865
|
+
const caseKey = String(discriminatorValue);
|
|
4866
|
+
const relationName = config.cases[caseKey];
|
|
4867
|
+
if (!relationName) throw new Error(`polymorphic discriminator '${config.discriminator}' value '${caseKey}' has no matching case mapping.`);
|
|
4868
|
+
const targetValue = row[relationName];
|
|
4869
|
+
if (targetValue === null || targetValue === void 0) throw new Error(`polymorphic case '${caseKey}' resolved relation '${relationName}' but no target row was loaded.`);
|
|
4870
|
+
row[config.alias] = targetValue;
|
|
4871
|
+
const payload = {
|
|
4872
|
+
[config.discriminator]: discriminatorValue,
|
|
4873
|
+
[config.alias]: targetValue
|
|
4874
|
+
};
|
|
4875
|
+
if (typeof config.schema.safeParse === "function") {
|
|
4876
|
+
const result = config.schema.safeParse(payload);
|
|
4877
|
+
if (!result.success) throw new Error(`polymorphic schema parse failed: ${this._extractPolymorphicSchemaErrorMessage(result.error)}`);
|
|
4878
|
+
} else if (typeof config.schema.parse === "function") try {
|
|
4879
|
+
config.schema.parse(payload);
|
|
4880
|
+
} catch (error) {
|
|
4881
|
+
throw new Error(`polymorphic schema parse failed: ${this._extractPolymorphicSchemaErrorMessage(error)}`);
|
|
4882
|
+
}
|
|
4883
|
+
}
|
|
4884
|
+
for (const relationName of config.autoLoadedCaseRelations) {
|
|
4885
|
+
if (relationName === config.alias) continue;
|
|
4886
|
+
for (const row of rows) delete row[relationName];
|
|
4887
|
+
}
|
|
4888
|
+
}
|
|
4818
4889
|
async _finalizeRows(rows) {
|
|
4890
|
+
const polymorphicState = this._resolvePolymorphicFinalizeState();
|
|
4891
|
+
const requestedWith = polymorphicState?.requestedWith ?? this.config.with;
|
|
4892
|
+
const effectiveWith = polymorphicState?.effectiveWith ?? this.config.with;
|
|
4819
4893
|
let rowsWithRelations = rows;
|
|
4820
|
-
if (
|
|
4821
|
-
if (
|
|
4894
|
+
if (effectiveWith) rowsWithRelations = await this._loadRelations(rowsWithRelations, effectiveWith, 0, 3, this.edgeMetadata, this.tableConfig);
|
|
4895
|
+
if (polymorphicState) this._synthesizePolymorphicRows(rowsWithRelations, polymorphicState);
|
|
4896
|
+
if (this.config.extras) rowsWithRelations = this._applyExtras(rowsWithRelations, this.config.extras, this._getColumns(this.tableConfig), requestedWith, this.tableConfig.name, this.tableConfig);
|
|
4822
4897
|
return this._selectColumns(rowsWithRelations, this.config.columns, this._getColumns(this.tableConfig), this.tableConfig);
|
|
4823
4898
|
}
|
|
4824
4899
|
_getSchemaDefinitionOrThrow() {
|
|
@@ -5961,6 +6036,7 @@ var GelRelationalQuery = class extends QueryPromise {
|
|
|
5961
6036
|
if (config.with !== void 0) throw new Error("pipeline cannot be combined with with in findMany().");
|
|
5962
6037
|
if (config.extras !== void 0) throw new Error("pipeline cannot be combined with extras in findMany().");
|
|
5963
6038
|
if (config.columns !== void 0) throw new Error("pipeline cannot be combined with columns in findMany().");
|
|
6039
|
+
if (config.polymorphic !== void 0) throw new Error("pipeline cannot be combined with polymorphic in findMany().");
|
|
5964
6040
|
}
|
|
5965
6041
|
if (pageByKey) {
|
|
5966
6042
|
if (this.mode !== "many") throw new Error("pageByKey is only supported on findMany().");
|
|
@@ -6191,11 +6267,8 @@ var GelRelationalQuery = class extends QueryPromise {
|
|
|
6191
6267
|
let pageRows = paginationResult.page;
|
|
6192
6268
|
pageRows = await this._applyRlsSelectFilter(pageRows, this.tableConfig);
|
|
6193
6269
|
if (whereFilter) pageRows = await this._applyRelationsFilterToRows(pageRows, this.tableConfig, whereFilter, this.edgeMetadata, 0, 3, this.config.with);
|
|
6194
|
-
let pageWithRelations = pageRows;
|
|
6195
|
-
if (this.config.with) pageWithRelations = await this._loadRelations(pageWithRelations, this.config.with, 0, 3, this.edgeMetadata, this.tableConfig);
|
|
6196
|
-
if (this.config.extras) pageWithRelations = this._applyExtras(pageWithRelations, this.config.extras, this._getColumns(this.tableConfig), this.config.with, this.tableConfig.name, this.tableConfig);
|
|
6197
6270
|
return {
|
|
6198
|
-
page:
|
|
6271
|
+
page: await this._finalizeRows(pageRows),
|
|
6199
6272
|
continueCursor: paginationResult.continueCursor,
|
|
6200
6273
|
isDone: paginationResult.isDone,
|
|
6201
6274
|
pageStatus: paginationResult.pageStatus,
|
|
@@ -6215,10 +6288,7 @@ var GelRelationalQuery = class extends QueryPromise {
|
|
|
6215
6288
|
if (offset > 0) rows = rows.slice(offset);
|
|
6216
6289
|
if (limit !== void 0) rows = rows.slice(0, limit);
|
|
6217
6290
|
}
|
|
6218
|
-
|
|
6219
|
-
if (this.config.with) rowsWithRelations = await this._loadRelations(rowsWithRelations, this.config.with, 0, 3, this.edgeMetadata, this.tableConfig);
|
|
6220
|
-
if (this.config.extras) rowsWithRelations = this._applyExtras(rowsWithRelations, this.config.extras, this._getColumns(this.tableConfig), this.config.with, this.tableConfig.name, this.tableConfig);
|
|
6221
|
-
const selectedRows = this._selectColumns(rowsWithRelations, this.config.columns, this._getColumns(this.tableConfig), this.tableConfig);
|
|
6291
|
+
const selectedRows = await this._finalizeRows(rows);
|
|
6222
6292
|
return this._returnSelectedRows(selectedRows);
|
|
6223
6293
|
}
|
|
6224
6294
|
if (queryConfig.strategy === "multiProbe" && queryConfig.index && !isCursorPaginated) {
|
|
@@ -6248,10 +6318,7 @@ var GelRelationalQuery = class extends QueryPromise {
|
|
|
6248
6318
|
const limit = this._resolveNonPaginatedLimit(config);
|
|
6249
6319
|
if (offset > 0) rows = rows.slice(offset);
|
|
6250
6320
|
if (limit !== void 0) rows = rows.slice(0, limit);
|
|
6251
|
-
|
|
6252
|
-
if (this.config.with) rowsWithRelations = await this._loadRelations(rowsWithRelations, this.config.with, 0, 3, this.edgeMetadata, this.tableConfig);
|
|
6253
|
-
if (this.config.extras) rowsWithRelations = this._applyExtras(rowsWithRelations, this.config.extras, this._getColumns(this.tableConfig), this.config.with, this.tableConfig.name, this.tableConfig);
|
|
6254
|
-
const selectedRows = this._selectColumns(rowsWithRelations, this.config.columns, this._getColumns(this.tableConfig), this.tableConfig);
|
|
6321
|
+
const selectedRows = await this._finalizeRows(rows);
|
|
6255
6322
|
return this._returnSelectedRows(selectedRows);
|
|
6256
6323
|
}
|
|
6257
6324
|
if (isCursorPaginated) {
|
|
@@ -6279,11 +6346,8 @@ var GelRelationalQuery = class extends QueryPromise {
|
|
|
6279
6346
|
let pageRows = paginationResult.page;
|
|
6280
6347
|
pageRows = await this._applyRlsSelectFilter(pageRows, this.tableConfig);
|
|
6281
6348
|
if (whereFilter) pageRows = await this._applyRelationsFilterToRows(pageRows, this.tableConfig, whereFilter, this.edgeMetadata, 0, 3, this.config.with);
|
|
6282
|
-
let pageWithRelations = pageRows;
|
|
6283
|
-
if (this.config.with) pageWithRelations = await this._loadRelations(pageWithRelations, this.config.with, 0, 3, this.edgeMetadata, this.tableConfig);
|
|
6284
|
-
if (this.config.extras) pageWithRelations = this._applyExtras(pageWithRelations, this.config.extras, this._getColumns(this.tableConfig), this.config.with, this.tableConfig.name, this.tableConfig);
|
|
6285
6349
|
return {
|
|
6286
|
-
page:
|
|
6350
|
+
page: await this._finalizeRows(pageRows),
|
|
6287
6351
|
continueCursor: paginationResult.continueCursor,
|
|
6288
6352
|
isDone: paginationResult.isDone,
|
|
6289
6353
|
pageStatus: paginationResult.pageStatus,
|
|
@@ -6313,11 +6377,8 @@ var GelRelationalQuery = class extends QueryPromise {
|
|
|
6313
6377
|
let pageRows = paginationResult.page;
|
|
6314
6378
|
pageRows = await this._applyRlsSelectFilter(pageRows, this.tableConfig);
|
|
6315
6379
|
if (whereFilter) pageRows = await this._applyRelationsFilterToRows(pageRows, this.tableConfig, whereFilter, this.edgeMetadata, 0, 3, this.config.with);
|
|
6316
|
-
let pageWithRelations = pageRows;
|
|
6317
|
-
if (this.config.with) pageWithRelations = await this._loadRelations(pageWithRelations, this.config.with, 0, 3, this.edgeMetadata, this.tableConfig);
|
|
6318
|
-
if (this.config.extras) pageWithRelations = this._applyExtras(pageWithRelations, this.config.extras, this._getColumns(this.tableConfig), this.config.with, this.tableConfig.name, this.tableConfig);
|
|
6319
6380
|
return {
|
|
6320
|
-
page:
|
|
6381
|
+
page: await this._finalizeRows(pageRows),
|
|
6321
6382
|
continueCursor: paginationResult.continueCursor,
|
|
6322
6383
|
isDone: paginationResult.isDone,
|
|
6323
6384
|
pageStatus: paginationResult.pageStatus,
|
|
@@ -6347,11 +6408,8 @@ var GelRelationalQuery = class extends QueryPromise {
|
|
|
6347
6408
|
let pageRows = paginationResult.page;
|
|
6348
6409
|
pageRows = await this._applyRlsSelectFilter(pageRows, this.tableConfig);
|
|
6349
6410
|
if (whereFilter) pageRows = await this._applyRelationsFilterToRows(pageRows, this.tableConfig, whereFilter, this.edgeMetadata, 0, 3, this.config.with);
|
|
6350
|
-
let pageWithRelations = pageRows;
|
|
6351
|
-
if (this.config.with) pageWithRelations = await this._loadRelations(pageWithRelations, this.config.with, 0, 3, this.edgeMetadata, this.tableConfig);
|
|
6352
|
-
if (this.config.extras) pageWithRelations = this._applyExtras(pageWithRelations, this.config.extras, this._getColumns(this.tableConfig), this.config.with, this.tableConfig.name, this.tableConfig);
|
|
6353
6411
|
return {
|
|
6354
|
-
page:
|
|
6412
|
+
page: await this._finalizeRows(pageRows),
|
|
6355
6413
|
continueCursor: paginationResult.continueCursor,
|
|
6356
6414
|
isDone: paginationResult.isDone
|
|
6357
6415
|
};
|
|
@@ -6378,10 +6436,7 @@ var GelRelationalQuery = class extends QueryPromise {
|
|
|
6378
6436
|
if (offset > 0) rows = rows.slice(offset);
|
|
6379
6437
|
if (limit !== void 0) rows = rows.slice(0, limit);
|
|
6380
6438
|
}
|
|
6381
|
-
|
|
6382
|
-
if (this.config.with) rowsWithRelations = await this._loadRelations(rowsWithRelations, this.config.with, 0, 3, this.edgeMetadata, this.tableConfig);
|
|
6383
|
-
if (this.config.extras) rowsWithRelations = this._applyExtras(rowsWithRelations, this.config.extras, this._getColumns(this.tableConfig), this.config.with, this.tableConfig.name, this.tableConfig);
|
|
6384
|
-
const selectedRows = this._selectColumns(rowsWithRelations, this.config.columns, this._getColumns(this.tableConfig), this.tableConfig);
|
|
6439
|
+
const selectedRows = await this._finalizeRows(rows);
|
|
6385
6440
|
return this._returnSelectedRows(selectedRows);
|
|
6386
6441
|
}
|
|
6387
6442
|
/**
|
|
@@ -8210,18 +8265,27 @@ var RelationalQueryBuilder = class RelationalQueryBuilder {
|
|
|
8210
8265
|
return new GelRankQuery(this.db, this.tableConfig, indexName, config, this.rls);
|
|
8211
8266
|
}
|
|
8212
8267
|
findMany(config) {
|
|
8213
|
-
if (config && config.pipeline !== void 0)
|
|
8268
|
+
if (config && config.pipeline !== void 0) {
|
|
8269
|
+
if (config.polymorphic !== void 0) throw new Error("polymorphic cannot be combined with pipeline in findMany().");
|
|
8270
|
+
throw new Error("findMany({ pipeline }) is removed; use db.query.<table>.select() chain instead");
|
|
8271
|
+
}
|
|
8214
8272
|
return this.createQuery(config ? config : {}, "many");
|
|
8215
8273
|
}
|
|
8216
8274
|
findFirst(config) {
|
|
8217
|
-
if (config && config.pipeline !== void 0)
|
|
8275
|
+
if (config && config.pipeline !== void 0) {
|
|
8276
|
+
if (config.polymorphic !== void 0) throw new Error("polymorphic cannot be combined with pipeline in findFirst().");
|
|
8277
|
+
throw new Error("findMany({ pipeline }) is removed; use db.query.<table>.select() chain instead");
|
|
8278
|
+
}
|
|
8218
8279
|
return this.createQuery({
|
|
8219
8280
|
...config ? config : {},
|
|
8220
8281
|
limit: 1
|
|
8221
8282
|
}, "first");
|
|
8222
8283
|
}
|
|
8223
8284
|
findFirstOrThrow(config) {
|
|
8224
|
-
if (config && config.pipeline !== void 0)
|
|
8285
|
+
if (config && config.pipeline !== void 0) {
|
|
8286
|
+
if (config.polymorphic !== void 0) throw new Error("polymorphic cannot be combined with pipeline in findFirstOrThrow().");
|
|
8287
|
+
throw new Error("findMany({ pipeline }) is removed; use db.query.<table>.select() chain instead");
|
|
8288
|
+
}
|
|
8225
8289
|
return this.createQuery({
|
|
8226
8290
|
...config ? config : {},
|
|
8227
8291
|
limit: 1
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as migrationPlugin, ri as OrmSchemaPlugin } from "../where-clause-compiler-_b1UHbYW.js";
|
|
2
|
+
import "../orm/index.js";
|
|
2
3
|
|
|
3
|
-
//#region src/orm/migrations/schema.d.ts
|
|
4
|
-
declare function migrationPlugin(): OrmSchemaPlugin;
|
|
5
|
-
//#endregion
|
|
6
4
|
//#region src/orm/aggregate-index/schema.d.ts
|
|
7
5
|
declare function aggregatePlugin(): OrmSchemaPlugin;
|
|
8
6
|
//#endregion
|
package/dist/plugins/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ri as OrmSchemaPlugin } from "../../where-clause-compiler-_b1UHbYW.js";
|
|
2
|
+
import "../../orm/index.js";
|
|
2
3
|
import * as convex_server0 from "convex/server";
|
|
3
4
|
|
|
4
5
|
//#region src/plugins/ratelimit/duration.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as integer, g as index, t as convexTable, x as text } from "./table-B7yzBihE.js";
|
|
2
|
-
import { r as custom, t as id } from "./id-
|
|
2
|
+
import { r as custom, t as id } from "./id-DdAxiGby.js";
|
|
3
3
|
import { ConvexError, convexToJson, jsonToConvex, v } from "convex/values";
|
|
4
4
|
|
|
5
5
|
//#region src/aggregate-core/compare.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as integer, T as entityKind, g as index, t as convexTable, w as ConvexColumnBuilder, x as text } from "./table-B7yzBihE.js";
|
|
2
|
-
import { r as custom, t as id } from "./id-
|
|
2
|
+
import { r as custom, t as id } from "./id-DdAxiGby.js";
|
|
3
3
|
import { v } from "convex/values";
|
|
4
4
|
|
|
5
5
|
//#region src/orm/builders/boolean.ts
|
package/dist/server/index.js
CHANGED
|
@@ -2024,12 +2024,19 @@ function isProcedureType(value) {
|
|
|
2024
2024
|
function isProcedureDefinition(value) {
|
|
2025
2025
|
return isRecord(value) && isProcedureType(value._type);
|
|
2026
2026
|
}
|
|
2027
|
+
function getProcedureTypeFromExport(value) {
|
|
2028
|
+
const crpcType = value._crpcMeta?.type;
|
|
2029
|
+
if (isProcedureType(crpcType)) return crpcType;
|
|
2030
|
+
if (value.isQuery === true) return "query";
|
|
2031
|
+
if (value.isMutation === true) return "mutation";
|
|
2032
|
+
if (value.isAction === true) return "action";
|
|
2033
|
+
return null;
|
|
2034
|
+
}
|
|
2027
2035
|
function isProcedureExport(value) {
|
|
2028
2036
|
if (value === null || typeof value !== "object" && typeof value !== "function") return false;
|
|
2029
2037
|
const exportValue = value;
|
|
2030
2038
|
if (typeof exportValue._handler !== "function") return false;
|
|
2031
|
-
|
|
2032
|
-
return isProcedureType(type);
|
|
2039
|
+
return getProcedureTypeFromExport(exportValue) !== null;
|
|
2033
2040
|
}
|
|
2034
2041
|
function decodeProcedureResult(procedure, value) {
|
|
2035
2042
|
return decodeWire(value, procedure.__betterConvexTransformer);
|
|
@@ -2093,7 +2100,8 @@ function createRecursiveProxy(path, ctx, opts, mode) {
|
|
|
2093
2100
|
assertCanInvoke(getContextType(ctx), node._type, pathString);
|
|
2094
2101
|
const resolved = await opts.resolver(path);
|
|
2095
2102
|
if (!isProcedureExport(resolved)) throw new Error(`[better-convex] Resolved value is not a cRPC procedure: "${pathString}".`);
|
|
2096
|
-
|
|
2103
|
+
const resolvedType = getProcedureTypeFromExport(resolved);
|
|
2104
|
+
if (resolvedType !== node._type) throw new Error(`[better-convex] Procedure type mismatch at "${pathString}". Expected "${node._type}" but got "${resolvedType ?? "unknown"}".`);
|
|
2097
2105
|
return executeProcedure(resolved, mode, pathString, ctx, argsList[0] ?? {});
|
|
2098
2106
|
}
|
|
2099
2107
|
});
|
|
@@ -2164,7 +2172,8 @@ function createActionsRegistryProxy(path, ctx, registry) {
|
|
|
2164
2172
|
const procedure = isProcedureExport(resolved) ? resolved : null;
|
|
2165
2173
|
const canDispatchDirectly = !!getResolverFunctionReference(resolveProcedure);
|
|
2166
2174
|
if (!procedure && !canDispatchDirectly) throw new Error(`[better-convex] Resolved value is not a cRPC procedure: "${pathString}".`);
|
|
2167
|
-
|
|
2175
|
+
const resolvedType = procedure ? getProcedureTypeFromExport(procedure) : null;
|
|
2176
|
+
if (procedure && resolvedType !== procedureType) throw new Error(`[better-convex] Procedure type mismatch at "${pathString}". Expected "${procedureType}" but got "${resolvedType ?? "unknown"}".`);
|
|
2168
2177
|
return executeActionContextActionProcedure(ctx, procedure, pathString, resolveProcedure, argsList[0] ?? {});
|
|
2169
2178
|
}
|
|
2170
2179
|
});
|
|
@@ -2191,7 +2200,8 @@ function createScheduledRegistryProxy(path, ctx, registry, mode) {
|
|
|
2191
2200
|
const procedure = isProcedureExport(resolved) ? resolved : null;
|
|
2192
2201
|
const canDispatchDirectly = !!getResolverFunctionReference(resolveProcedure);
|
|
2193
2202
|
if (!procedure && !canDispatchDirectly) throw new Error(`[better-convex] Resolved value is not a cRPC procedure: "${pathString}".`);
|
|
2194
|
-
|
|
2203
|
+
const resolvedType = procedure ? getProcedureTypeFromExport(procedure) : null;
|
|
2204
|
+
if (procedure && resolvedType !== procedureType) throw new Error(`[better-convex] Procedure type mismatch at "${pathString}". Expected "${procedureType}" but got "${resolvedType ?? "unknown"}".`);
|
|
2195
2205
|
return executeScheduledProcedure(ctx, mode, procedure, pathString, resolveProcedure, argsList[0] ?? {});
|
|
2196
2206
|
}
|
|
2197
2207
|
});
|
|
@@ -2241,7 +2251,8 @@ function createRegistryProxy(path, ctx, registry, mode, supportsActionContext) {
|
|
|
2241
2251
|
const procedure = isProcedureExport(resolved) ? resolved : null;
|
|
2242
2252
|
const canDispatchDirectly = mode === "caller" && ctxType === "action" && !!getResolverFunctionReference(resolveProcedure);
|
|
2243
2253
|
if (!procedure && !canDispatchDirectly) throw new Error(`[better-convex] Resolved value is not a cRPC procedure: "${pathString}".`);
|
|
2244
|
-
|
|
2254
|
+
const resolvedType = procedure ? getProcedureTypeFromExport(procedure) : null;
|
|
2255
|
+
if (procedure && resolvedType !== procedureType) throw new Error(`[better-convex] Procedure type mismatch at "${pathString}". Expected "${procedureType}" but got "${resolvedType ?? "unknown"}".`);
|
|
2245
2256
|
const input = argsList[0] ?? {};
|
|
2246
2257
|
if (ctxType === "action" && mode === "caller") {
|
|
2247
2258
|
if (procedureType === "action") throw new Error(`[better-convex] Cannot call action procedures from action context: "${pathString}".`);
|
|
@@ -2,6 +2,7 @@ import { a as ReturnTypeOrValue, i as KnownKeysOnly, o as Simplify, t as Assume
|
|
|
2
2
|
import * as convex_values0 from "convex/values";
|
|
3
3
|
import { GenericId, Validator, Value } from "convex/values";
|
|
4
4
|
import { DefineSchemaOptions, FilterExpression, GenericDatabaseReader, GenericDatabaseWriter, GenericIndexFields, GenericSchema, GenericTableIndexes, GenericTableSearchIndexes, GenericTableVectorIndexes, IndexRange, IndexRangeBuilder, SchedulableFunctionReference, Scheduler, SchemaDefinition, TableDefinition, VectorFilterBuilder, internalActionGeneric, internalMutationGeneric } from "convex/server";
|
|
5
|
+
import { z } from "zod";
|
|
5
6
|
|
|
6
7
|
//#region src/orm/builders/column-builder.d.ts
|
|
7
8
|
/**
|
|
@@ -753,6 +754,16 @@ type AggregateNoScanWhere<TTableConfig extends TableRelationalConfig = TableRela
|
|
|
753
754
|
OR?: AggregateNoScanWhereBase<TTableConfig>[] | undefined;
|
|
754
755
|
}>;
|
|
755
756
|
type AggregateNoScanWhereArg<TTableConfig extends TableRelationalConfig = TableRelationalConfig> = [AggregateWhereFieldName<TTableConfig>] extends [never] ? never : AggregateNoScanWhere<TTableConfig>;
|
|
757
|
+
type OneRelationName<TTableConfig extends TableRelationalConfig = TableRelationalConfig> = Extract<{ [K in keyof TTableConfig['relations']]: TTableConfig['relations'][K] extends One<any, any> ? K : never }[keyof TTableConfig['relations']], string>;
|
|
758
|
+
type PolymorphicZodSchema$1 = z.ZodDiscriminatedUnion<any, any>;
|
|
759
|
+
type PolymorphicDiscriminatorFromSchema$1<TSchema extends PolymorphicZodSchema$1 = PolymorphicZodSchema$1> = TSchema extends z.ZodDiscriminatedUnion<any, infer TDisc extends string> ? TDisc : string;
|
|
760
|
+
type PolymorphicCaseLiteralFromSchema$1<TSchema extends PolymorphicZodSchema$1 = PolymorphicZodSchema$1, TDiscriminator extends string = string> = Extract<z.output<TSchema> extends Record<TDiscriminator, infer TValue> ? TValue : never, string>;
|
|
761
|
+
type PolymorphicQueryConfig<TTableConfig extends TableRelationalConfig = TableRelationalConfig, TSchema extends PolymorphicZodSchema$1 = PolymorphicZodSchema$1, TDiscriminator extends string = PolymorphicDiscriminatorFromSchema$1<TSchema>> = {
|
|
762
|
+
schema: TSchema;
|
|
763
|
+
discriminator: TDiscriminator;
|
|
764
|
+
cases: Record<PolymorphicCaseLiteralFromSchema$1<TSchema, TDiscriminator>, OneRelationName<TTableConfig>>;
|
|
765
|
+
as?: string | undefined;
|
|
766
|
+
};
|
|
756
767
|
/**
|
|
757
768
|
* Query configuration for findMany/findFirst
|
|
758
769
|
*
|
|
@@ -818,6 +829,10 @@ type DBQueryConfig<TRelationType extends 'one' | 'many' = 'one' | 'many', _TIsRo
|
|
|
818
829
|
* Stream-backed advanced query pipeline.
|
|
819
830
|
*/
|
|
820
831
|
pipeline?: _TIsRoot extends true ? FindManyPipelineConfig<TSchema, TTableConfig> : never;
|
|
832
|
+
/**
|
|
833
|
+
* Synthesize a discriminated-union relation field from one() cases.
|
|
834
|
+
*/
|
|
835
|
+
polymorphic?: PolymorphicQueryConfig<TTableConfig> | undefined;
|
|
821
836
|
/**
|
|
822
837
|
* Key-based page boundaries.
|
|
823
838
|
*/
|
|
@@ -1151,6 +1166,10 @@ type PaginatedResult<T> = {
|
|
|
1151
1166
|
splitCursor?: string;
|
|
1152
1167
|
};
|
|
1153
1168
|
type BuildQueryResult<TSchema extends TablesRelationalConfig, TTableConfig extends TableRelationalConfig, TFullSelection> = Equal<TFullSelection, true> extends true ? InferModelFromColumns<TableColumns<TTableConfig>> : TFullSelection extends Record<string, unknown> ? Simplify<InferRelationalQueryTableResult<InferModelFromColumns<TableColumns<TTableConfig>>, TFullSelection['columns'] extends Record<string, unknown> ? TFullSelection['columns'] : 'Full'> & (Exclude<TFullSelection['extras'], undefined> extends Record<string, unknown> | ((...args: any[]) => Record<string, unknown>) ? ReturnTypeOrValue<Exclude<TFullSelection['extras'], undefined>> extends infer TExtras extends Record<string, unknown> ? { [K in NonUndefinedKeysOnly$1<TExtras>]: ReturnTypeOrValue<TExtras[K]> } : {} : {}) & (Exclude<TFullSelection['with'], undefined> extends Record<string, unknown> ? BuildRelationResult<TSchema, Exclude<TFullSelection['with'], undefined>, TTableConfig['relations']> : {}) & (TFullSelection extends {
|
|
1169
|
+
polymorphic: infer TPolymorphicConfig;
|
|
1170
|
+
} ? TPolymorphicConfig extends {
|
|
1171
|
+
schema: infer TPolymorphicSchema extends z.ZodTypeAny;
|
|
1172
|
+
} ? z.output<TPolymorphicSchema> : {} : {}) & (TFullSelection extends {
|
|
1154
1173
|
vectorSearch: infer TVectorSearch;
|
|
1155
1174
|
} ? [TVectorSearch] extends [undefined] ? {} : {
|
|
1156
1175
|
_score?: number;
|
|
@@ -2086,7 +2105,9 @@ type InferBuilderNestedValue<TBuilder extends AnyColumnBuilder> = TBuilder['_']
|
|
|
2086
2105
|
$type: infer TType;
|
|
2087
2106
|
} ? TType : TBuilder['_'] extends {
|
|
2088
2107
|
data: infer TData;
|
|
2089
|
-
} ?
|
|
2108
|
+
} ? TBuilder['_'] extends {
|
|
2109
|
+
notNull: true;
|
|
2110
|
+
} ? TData : TData | null : never;
|
|
2090
2111
|
type InferValidatorNestedValue<TValidator extends AnyValidator> = Exclude<TValidator['type'], undefined>;
|
|
2091
2112
|
type InferNestedValue<TInput extends NestedInput> = TInput extends AnyColumnBuilder ? InferBuilderNestedValue<TInput> : TInput extends AnyValidator ? InferValidatorNestedValue<TInput> : TInput extends NestedShapeInput ? InferObjectShape<TInput> : never;
|
|
2092
2113
|
type InferObjectShape<TShape extends NestedShapeInput> = { [K in keyof TShape]: InferNestedValue<TShape[K]> };
|
|
@@ -2751,6 +2772,9 @@ declare class GelRelationalQuery<TSchema extends TablesRelationalConfig, TTableC
|
|
|
2751
2772
|
private _extractSearchEqFromWhereField;
|
|
2752
2773
|
private _mergeSearchFiltersWithWhereEq;
|
|
2753
2774
|
private _applyRelationsFilterToRows;
|
|
2775
|
+
private _resolvePolymorphicFinalizeState;
|
|
2776
|
+
private _extractPolymorphicSchemaErrorMessage;
|
|
2777
|
+
private _synthesizePolymorphicRows;
|
|
2754
2778
|
private _finalizeRows;
|
|
2755
2779
|
private _getSchemaDefinitionOrThrow;
|
|
2756
2780
|
private _applyEqBounds;
|
|
@@ -2888,7 +2912,35 @@ declare class GelRelationalQuery<TSchema extends TablesRelationalConfig, TTableC
|
|
|
2888
2912
|
}
|
|
2889
2913
|
//#endregion
|
|
2890
2914
|
//#region src/orm/query-builder.d.ts
|
|
2891
|
-
type
|
|
2915
|
+
type OneRelationNameByType<TTableConfig extends TableRelationalConfig = TableRelationalConfig> = Extract<{ [K in keyof TTableConfig['relations']]: TTableConfig['relations'][K] extends {
|
|
2916
|
+
relationType: 'one';
|
|
2917
|
+
} ? K : never }[keyof TTableConfig['relations']], string>;
|
|
2918
|
+
type PolymorphicZodSchema = z.ZodDiscriminatedUnion<any, any>;
|
|
2919
|
+
type PolymorphicDiscriminatorFromSchema<TSchema extends PolymorphicZodSchema = PolymorphicZodSchema> = TSchema extends z.ZodDiscriminatedUnion<any, infer TDisc extends string> ? TDisc : string;
|
|
2920
|
+
type PolymorphicCaseLiteralFromSchema<TSchema extends PolymorphicZodSchema = PolymorphicZodSchema, TDiscriminator extends string = string> = Extract<z.output<TSchema> extends Record<TDiscriminator, infer TValue> ? TValue : never, string>;
|
|
2921
|
+
type IsWidenedString<T extends string> = string extends T ? true : false;
|
|
2922
|
+
type ValidatePolymorphicConfig<TConfig, TTableConfig extends TableRelationalConfig> = TConfig extends {
|
|
2923
|
+
polymorphic: infer TPolymorphic;
|
|
2924
|
+
} ? [TPolymorphic] extends [undefined] ? unknown : TPolymorphic extends {
|
|
2925
|
+
schema: infer TSchema;
|
|
2926
|
+
discriminator: infer TDiscriminator;
|
|
2927
|
+
cases: infer TCases;
|
|
2928
|
+
} ? TSchema extends PolymorphicZodSchema ? TDiscriminator extends string ? TCases extends Record<string, OneRelationNameByType<TTableConfig>> ? [PolymorphicCaseLiteralFromSchema<TSchema, PolymorphicDiscriminatorFromSchema<TSchema>>] extends [Extract<keyof TCases, string>] ? [Extract<keyof TCases, string>] extends [PolymorphicCaseLiteralFromSchema<TSchema, PolymorphicDiscriminatorFromSchema<TSchema>>] ? IsWidenedString<TDiscriminator> extends true ? unknown : TDiscriminator extends PolymorphicDiscriminatorFromSchema<TSchema> ? unknown : {
|
|
2929
|
+
__polymorphicDiscriminatorMustMatchSchema__: never;
|
|
2930
|
+
} : {
|
|
2931
|
+
__polymorphicCasesCannotContainUnknownLiterals__: never;
|
|
2932
|
+
} : {
|
|
2933
|
+
__polymorphicCasesMustCoverAllDiscriminatorLiterals__: never;
|
|
2934
|
+
} : {
|
|
2935
|
+
__polymorphicCasesMustMapToOneRelations__: never;
|
|
2936
|
+
} : {
|
|
2937
|
+
__polymorphicDiscriminatorMustBeString__: never;
|
|
2938
|
+
} : {
|
|
2939
|
+
__polymorphicSchemaMustBeDiscriminatedUnion__: never;
|
|
2940
|
+
} : {
|
|
2941
|
+
__polymorphicConfigInvalid__: never;
|
|
2942
|
+
} : unknown;
|
|
2943
|
+
type EnforcedConfig<TConfig, TTableConfig extends TableRelationalConfig, THasIndex extends boolean = false> = ValidatePolymorphicConfig<TConfig, TTableConfig> & EnforceVectorSearchConstraints<EnforceSearchConstraints<EnforceCursorMaxScan<EnforceNoAllowFullScanWhenIndexed<EnforceWithIndexForWhere<TConfig, TTableConfig, THasIndex>, THasIndex>>, TTableConfig>, TTableConfig>;
|
|
2892
2944
|
type DisallowWithIndexSearchOrVector<THasIndex extends boolean> = THasIndex extends true ? {
|
|
2893
2945
|
search?: never;
|
|
2894
2946
|
vectorSearch?: never;
|
|
@@ -3112,6 +3164,14 @@ declare class RelationalQueryBuilder<TSchema extends TablesRelationalConfig, TTa
|
|
|
3112
3164
|
* });
|
|
3113
3165
|
*/
|
|
3114
3166
|
findMany(config: RelationCountWithConfig<TSchema, TTableConfig> & EnforcedConfig<RelationCountWithConfig<TSchema, TTableConfig>, TTableConfig, THasIndex> & DisallowWithIndexSearchOrVector<THasIndex>): GelRelationalQuery<TSchema, TTableConfig, FindManyResult<TSchema, TTableConfig, RelationCountWithConfig<TSchema, TTableConfig>>>;
|
|
3167
|
+
findMany<TPolymorphicSchema extends PolymorphicZodSchema, TPolymorphicDiscriminator extends PolymorphicDiscriminatorFromSchema<TPolymorphicSchema>, TPolymorphicCases extends Record<PolymorphicCaseLiteralFromSchema<TPolymorphicSchema, TPolymorphicDiscriminator>, OneRelationNameByType<TTableConfig>>, TConfig extends Omit<NonCursorConfigNoRelationCount<TSchema, TTableConfig>, 'polymorphic'> & {
|
|
3168
|
+
polymorphic: {
|
|
3169
|
+
schema: TPolymorphicSchema;
|
|
3170
|
+
discriminator: TPolymorphicDiscriminator;
|
|
3171
|
+
cases: TPolymorphicCases;
|
|
3172
|
+
as?: string | undefined;
|
|
3173
|
+
};
|
|
3174
|
+
}>(config: KnownKeysOnlyStrict<TConfig, NonCursorConfigNoSearch<TSchema, TTableConfig>> & EnforcedConfig<TConfig, TTableConfig, THasIndex>): GelRelationalQuery<TSchema, TTableConfig, FindManyResult<TSchema, TTableConfig, TConfig>>;
|
|
3115
3175
|
findMany<TConfig extends SearchPaginatedConfig<TSchema, TTableConfig>>(config: KnownKeysOnlyStrict<TConfig, SearchPaginatedConfig<TSchema, TTableConfig>> & DisallowWithIndexSearchOrVector<THasIndex>): GelRelationalQuery<TSchema, TTableConfig, PaginatedResult<BuildQueryResult<TSchema, TTableConfig, TConfig>>>;
|
|
3116
3176
|
findMany<TConfig extends SearchNonPaginatedConfig<TSchema, TTableConfig>>(config: KnownKeysOnlyStrict<TConfig, SearchNonPaginatedConfig<TSchema, TTableConfig>> & DisallowWithIndexSearchOrVector<THasIndex>): GelRelationalQuery<TSchema, TTableConfig, BuildQueryResult<TSchema, TTableConfig, TConfig>[]>;
|
|
3117
3177
|
findMany<TConfig extends VectorNonPaginatedConfig<TSchema, TTableConfig>>(config: KnownKeysOnlyStrict<TConfig, VectorNonPaginatedConfig<TSchema, TTableConfig>> & DisallowWithIndexSearchOrVector<THasIndex>): GelRelationalQuery<TSchema, TTableConfig, BuildQueryResult<TSchema, TTableConfig, TConfig>[]>;
|
|
@@ -3133,6 +3193,14 @@ declare class RelationalQueryBuilder<TSchema extends TablesRelationalConfig, TTa
|
|
|
3133
3193
|
* });
|
|
3134
3194
|
*/
|
|
3135
3195
|
findFirst<TConfig extends SearchFindFirstConfig<TSchema, TTableConfig>>(config: KnownKeysOnlyStrict<TConfig, SearchFindFirstConfig<TSchema, TTableConfig>> & DisallowWithIndexSearchOrVector<THasIndex>): GelRelationalQuery<TSchema, TTableConfig, BuildQueryResult<TSchema, TTableConfig, TConfig> | null>;
|
|
3196
|
+
findFirst<TPolymorphicSchema extends PolymorphicZodSchema, TPolymorphicDiscriminator extends PolymorphicDiscriminatorFromSchema<TPolymorphicSchema>, TPolymorphicCases extends Record<PolymorphicCaseLiteralFromSchema<TPolymorphicSchema, TPolymorphicDiscriminator>, OneRelationNameByType<TTableConfig>>, TConfig extends Omit<FindFirstConfigNoSearch<TSchema, TTableConfig>, 'polymorphic'> & {
|
|
3197
|
+
polymorphic: {
|
|
3198
|
+
schema: TPolymorphicSchema;
|
|
3199
|
+
discriminator: TPolymorphicDiscriminator;
|
|
3200
|
+
cases: TPolymorphicCases;
|
|
3201
|
+
as?: string | undefined;
|
|
3202
|
+
};
|
|
3203
|
+
}>(config: KnownKeysOnlyStrict<TConfig, FindFirstConfigNoSearch<TSchema, TTableConfig>> & EnforcedConfig<TConfig, TTableConfig, THasIndex>): GelRelationalQuery<TSchema, TTableConfig, BuildQueryResult<TSchema, TTableConfig, TConfig> | null>;
|
|
3136
3204
|
findFirst<TConfig extends FindFirstConfigNoSearch<TSchema, TTableConfig>>(config?: KnownKeysOnlyStrict<TConfig, FindFirstConfigNoSearch<TSchema, TTableConfig>> & EnforcedConfig<TConfig, TTableConfig, THasIndex>): GelRelationalQuery<TSchema, TTableConfig, BuildQueryResult<TSchema, TTableConfig, TConfig> | null>;
|
|
3137
3205
|
/**
|
|
3138
3206
|
* Find first row matching the query configuration, or throw if none exists.
|
|
@@ -3141,6 +3209,14 @@ declare class RelationalQueryBuilder<TSchema extends TablesRelationalConfig, TTa
|
|
|
3141
3209
|
* useful when callers expect a row to exist.
|
|
3142
3210
|
*/
|
|
3143
3211
|
findFirstOrThrow<TConfig extends SearchFindFirstConfig<TSchema, TTableConfig>>(config: KnownKeysOnlyStrict<TConfig, SearchFindFirstConfig<TSchema, TTableConfig>> & DisallowWithIndexSearchOrVector<THasIndex>): GelRelationalQuery<TSchema, TTableConfig, BuildQueryResult<TSchema, TTableConfig, TConfig>>;
|
|
3212
|
+
findFirstOrThrow<TPolymorphicSchema extends PolymorphicZodSchema, TPolymorphicDiscriminator extends PolymorphicDiscriminatorFromSchema<TPolymorphicSchema>, TPolymorphicCases extends Record<PolymorphicCaseLiteralFromSchema<TPolymorphicSchema, TPolymorphicDiscriminator>, OneRelationNameByType<TTableConfig>>, TConfig extends Omit<FindFirstConfigNoSearch<TSchema, TTableConfig>, 'polymorphic'> & {
|
|
3213
|
+
polymorphic: {
|
|
3214
|
+
schema: TPolymorphicSchema;
|
|
3215
|
+
discriminator: TPolymorphicDiscriminator;
|
|
3216
|
+
cases: TPolymorphicCases;
|
|
3217
|
+
as?: string | undefined;
|
|
3218
|
+
};
|
|
3219
|
+
}>(config: KnownKeysOnlyStrict<TConfig, FindFirstConfigNoSearch<TSchema, TTableConfig>> & EnforcedConfig<TConfig, TTableConfig, THasIndex>): GelRelationalQuery<TSchema, TTableConfig, BuildQueryResult<TSchema, TTableConfig, TConfig>>;
|
|
3144
3220
|
findFirstOrThrow<TConfig extends FindFirstConfigNoSearch<TSchema, TTableConfig>>(config?: KnownKeysOnlyStrict<TConfig, FindFirstConfigNoSearch<TSchema, TTableConfig>> & EnforcedConfig<TConfig, TTableConfig, THasIndex>): GelRelationalQuery<TSchema, TTableConfig, BuildQueryResult<TSchema, TTableConfig, TConfig>>;
|
|
3145
3221
|
}
|
|
3146
3222
|
//#endregion
|
|
@@ -3324,6 +3400,9 @@ type MigrationCancelArgs = {
|
|
|
3324
3400
|
runId?: string;
|
|
3325
3401
|
};
|
|
3326
3402
|
//#endregion
|
|
3403
|
+
//#region src/orm/migrations/schema.d.ts
|
|
3404
|
+
declare function migrationPlugin(): OrmSchemaPlugin;
|
|
3405
|
+
//#endregion
|
|
3327
3406
|
//#region src/orm/triggers.d.ts
|
|
3328
3407
|
type MaybePromise<T> = T | Promise<T>;
|
|
3329
3408
|
type AnyRecord = Record<string, unknown>;
|
|
@@ -3596,4 +3675,4 @@ interface IndexLike {
|
|
|
3596
3675
|
indexName: string;
|
|
3597
3676
|
}
|
|
3598
3677
|
//#endregion
|
|
3599
|
-
export {
|
|
3678
|
+
export { DatabaseWithMutations as $, CountConfig as $n, or as $r, RelationsBuilderColumnConfig as $t, MigrationCancelArgs as A, ConvexVectorIndexBuilderOn as An, FilterExpression$1 as Ar, ConvexCustomBuilder as At, MigrationManifestEntry as B, ConvexForeignKeyBuilder as Bn, gte as Br, ConvexBooleanBuilderInitial as Bt, OrmBeforeResult as C, ConvexIndexBuilderOn as Cn, UpdateSet as Cr, ConvexIdBuilder as Ct, OrmTriggers as D, ConvexSearchIndexBuilderOn as Dn, BinaryExpression as Dr, ConvexDateBuilderInitial as Dt, OrmTriggerContext as E, ConvexSearchIndexBuilder as En, unsetToken as Er, ConvexDateBuilder as Et, MigrationDefinition as F, searchIndex as Fn, contains as Fr, objectOf as Ft, MigrationStateMap as G, check as Gn, isNull as Gr, CountBackfillChunkArgs as Gt, MigrationPlan as H, ConvexUniqueConstraintBuilder as Hn, inArray as Hr, ConvexBigIntBuilder as Ht, MigrationDirection as I, uniqueIndex as In, endsWith as Ir, ConvexBytesBuilder as It, MigrationWriteMode as J, AggregateConfig as Jn, lte as Jr, ExtractTablesWithRelations as Jt, MigrationStep as K, foreignKey as Kn, like as Kr, CountBackfillKickoffArgs as Kt, MigrationDoc as L, vectorIndex as Ln, eq as Lr, ConvexBytesBuilderInitial as Lt, MigrationRunChunkArgs as M, aggregateIndex as Mn, UnaryExpression as Mr, arrayOf as Mt, MigrationStatusArgs as N, index as Nn, and as Nr, custom as Nt, defineTriggers as O, ConvexSearchIndexConfig as On, ExpressionVisitor as Or, ConvexDateMode as Ot, MigrationAppliedState as P, rankIndex as Pn, between as Pr, json as Pt, detectMigrationDrift as Q, BuildRelationResult as Qn, notInArray as Qr, RelationsBuilderColumnBase as Qt, MigrationDocContext as R, ConvexCheckBuilder as Rn, fieldRef as Rr, bytes as Rt, scheduledDeleteFactory as S, ConvexIndexBuilder as Sn, ReturningSelection as Sr, integer as St, OrmTriggerChange as T, ConvexRankIndexBuilderOn as Tn, VectorSearchProvider as Tr, id as Tt, MigrationRunStatus as U, ConvexUniqueConstraintBuilderOn as Un, isFieldReference as Ur, ConvexBigIntBuilderInitial as Ut, MigrationMigrateOne as V, ConvexForeignKeyConfig as Vn, ilike as Vr, boolean as Vt, MigrationSet as W, ConvexUniqueConstraintConfig as Wn, isNotNull as Wr, bigint as Wt, defineMigration as X, AggregateResult as Xn, not as Xr, OneConfig as Xt, buildMigrationPlan as Y, AggregateFieldValue as Yn, ne as Yr, ManyConfig as Yt, defineMigrationSet as Z, BuildQueryResult as Zn, notBetween as Zr, RelationsBuilder as Zt, OrmWriterCtx as _, IsUnique as _i, RlsRole as _n, OrderDirection as _r, ConvexTextBuilder as _t, TableConfigResult as a, TableName as ai, ConvexDeletionConfig as an, InferModelFromColumns as ar, EdgeMetadata as at, scheduledMutationBatchFactory as b, ConvexAggregateIndexBuilder as bn, ReturningAll as br, ConvexNumberBuilder as bt, OrmNotFoundError as c, ColumnBuilder as ci, OrmLifecycleChange as cn, MutationExecuteConfig as cr, ConvexVectorBuilderInitial as ct, GenericOrmCtx as d, ColumnBuilderTypeConfig as di, convexTable as dn, MutationPaginateConfig as dr, ConvexTimestampBuilderInitial as dt, startsWith as ei, TableRelationalConfig as en, CountResult as er, DatabaseWithQuery as et, OrmApiResult as f, ColumnBuilderWithTableName as fi, deletion as fn, MutationPaginatedResult as fr, ConvexTimestampMode as ft, OrmReaderCtx as g, IsPrimaryKey as gi, rlsPolicy as gn, OrderByClause as gr, textEnum as gt, OrmFunctions as h, HasDefault as hi, RlsPolicyToOption as hn, MutationRunMode as hr, ConvexTextEnumBuilderInitial as ht, desc as i, OrmSchemaPluginTables as ii, ConvexDeletionBuilder as in, InferInsertModel as ir, RlsMode as it, MigrationRunArgs as j, ConvexVectorIndexConfig as jn, LogicalExpression as jr, ConvexCustomBuilderInitial as jt, migrationPlugin as k, ConvexVectorIndexBuilder as kn, FieldReference as kr, date as kt, CreateOrmOptions as l, ColumnBuilderBaseConfig as li, OrmLifecycleOperation as ln, MutationExecuteResult as lr, vector as lt, OrmClientWithApi as m, DrizzleEntity as mi, RlsPolicyConfig as mn, MutationReturning as mr, ConvexTextEnumBuilder as mt, defineSchema$1 as n, Columns as ni, defineRelations as nn, FilterOperators as nr, OrmWriter as nt, getTableColumns as o, SystemFields as oi, ConvexTable as on, InferSelectModel as or, extractRelationsConfig as ot, OrmClientBase as p, ColumnDataType as pi, RlsPolicy as pn, MutationResult as pr, timestamp as pt, MigrationTableName as q, unique as qn, lt as qr, CountBackfillStatusArgs as qt, asc as r, OrmSchemaPlugin as ri, defineRelationsPart as rn, GetColumnData as rr, RlsContext as rt, getTableConfig as s, AnyColumn as si, ConvexTableWithColumns as sn, InsertValue as sr, ConvexVectorBuilder as st, WhereClauseResult as t, Brand as ti, TablesRelationalConfig as tn, DBQueryConfig as tr, OrmReader as tt, GenericOrm as u, ColumnBuilderRuntimeConfig as ui, TableConfig as un, MutationExecutionMode as ur, ConvexTimestampBuilder as ut, createOrm as v, NotNull as vi, RlsRoleConfig as vn, PaginatedResult as vr, ConvexTextBuilderInitial as vt, OrmTableTriggers as w, ConvexRankIndexBuilder as wn, VectorQueryConfig as wr, ConvexIdBuilderInitial as wt, ScheduledDeleteArgs as x, ConvexAggregateIndexBuilderOn as xn, ReturningResult as xr, ConvexNumberBuilderInitial as xt, ScheduledMutationBatchArgs as y, rlsRole as yn, PredicateWhereIndexConfig as yr, text as yt, MigrationDriftIssue as z, ConvexCheckConfig as zn, gt as zr, ConvexBooleanBuilder as zt };
|