@sequenceholdings/orm 2.6.2 → 2.7.0
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/README.md +44 -1
- package/dist/cli.cjs +81 -29
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +81 -29
- package/dist/cli.js.map +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +4 -1
- package/dist/client.d.ts +4 -1
- package/dist/client.js.map +1 -1
- package/dist/compiler.cjs +68 -29
- package/dist/compiler.cjs.map +1 -1
- package/dist/compiler.js +68 -29
- package/dist/compiler.js.map +1 -1
- package/dist/index.cjs +73 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +72 -5
- package/dist/index.js.map +1 -1
- package/dist/ir.cjs +19 -3
- package/dist/ir.cjs.map +1 -1
- package/dist/ir.d.cts +13 -6
- package/dist/ir.d.ts +13 -6
- package/dist/ir.js +18 -4
- package/dist/ir.js.map +1 -1
- package/dist/predicate-v2.cjs +24 -2
- package/dist/predicate-v2.cjs.map +1 -1
- package/dist/predicate-v2.d.cts +4 -0
- package/dist/predicate-v2.d.ts +4 -0
- package/dist/predicate-v2.js +24 -2
- package/dist/predicate-v2.js.map +1 -1
- package/dist/sdl.cjs +16 -2
- package/dist/sdl.cjs.map +1 -1
- package/dist/sdl.js +16 -2
- package/dist/sdl.js.map +1 -1
- package/package.json +1 -1
- package/src/codegen-gql/preset.cjs +45 -8
- package/templates/orm-namespace/codegen.ts +5 -0
package/dist/index.d.cts
CHANGED
|
@@ -5,8 +5,8 @@ export { CANONICAL_FORMAT, CanonicalColumn, CanonicalEnum, CanonicalLink, Canoni
|
|
|
5
5
|
import { CustomRolesBlock } from '@sequenceholdings/custom-roles-manifest';
|
|
6
6
|
export { CustomRolesBlock, capabilityPinsSchema, customRolesBlockSchema, customRolesDeclared, parseCapabilityPin, validateCapabilityPins } from '@sequenceholdings/custom-roles-manifest';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { PredIr } from './ir.cjs';
|
|
9
|
-
export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, CellSelectionIr, ClaimKey, CmpOp, CompiledArtifact, CompiledOperation, DATE_BUCKETS, DateBucket, EXTERNAL_POLICY_CLAIM_KEYS, ExternalPolicyClaimKey, GUARDED_IR_VERSION, GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, InputRefKind, IrVersionError, LEGACY_IR_VERSION, LimitIr, OrderIr, PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, ResolvedMetaIr, ResolvedSourceIr, RootIr, SQL_IR_VERSION, SelectionIr,
|
|
8
|
+
import { PredIr, TableMetaIr } from './ir.cjs';
|
|
9
|
+
export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, CellSelectionIr, ClaimKey, CmpOp, CompiledArtifact, CompiledOperation, DATE_BUCKETS, DateBucket, EXTERNAL_POLICY_CLAIM_KEYS, ExternalPolicyClaimKey, GUARDED_IR_VERSION, GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, InputRefKind, IrVersionError, LEGACY_IR_VERSION, LimitIr, OrderIr, PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, ResolvedMetaIr, ResolvedSourceIr, RootIr, SERVICE_PRINCIPAL_IR_VERSION, SQL_IR_VERSION, SelectionIr, ValueIr, VariableDefaultIr, VariableIr, compiledArtifactSchema, compiledOperationSchema, indexByHash, isExternalPolicyClaimKey, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, usesServicePrincipal, valueIrSchema, variableDefaultIrSchema, variableIrSchema } from './ir.cjs';
|
|
10
10
|
export { e as CAPABILITY_KEY_PATTERN, C as CELLS_FIELD, a as CELL_PARTS, f as CELL_PART_SUFFIX, g as CLAIM_KEY_PATTERN, h as COLUMN_IDENTIFIER_PATTERN, i as CONSUMER_ROLE_SUFFIX, b as CellPart, D as DEFINITION_FILE_EXTENSIONS, H as HASH_DOMAIN, I as IDENTIFIER_PATTERN, M as MATERIALIZE_ACTOR, j as MATERIALIZE_CLAIMS_JSON, k as MAX_DEFINITION_FILE_BYTES, l as MAX_GENERATED_SDL_BYTES, m as MAX_IDENTIFIER_LENGTH, n as MAX_PERSISTED_READ_ROWS, o as MAX_TRACKED_COLUMN_NAME, p as NAMESPACE_CONFIG_FILENAMES, N as NAMESPACE_PATTERN, O as ORM_DATA_TOKEN_HEADER, q as ORM_REGISTRATION_MAX_BYTES, r as ORM_SCHEMA_PREFIX, d as ORM_SERVICE_DATA_TOKEN_HEADER, Q as QUALIFIED_TABLE_PATTERN, R as RESERVED_COLUMN_NAMES, s as RESERVED_TABLE_NAMES, S as SYNCED_SOURCE_PATTERN, c as cellColumnName, t as consumerRoleName, u as materializeLockKey, v as materializedRefreshFunctionName, w as ormSchemaName } from './constants-Dou1RkTo.cjs';
|
|
11
11
|
import { generateDrizzleJson } from 'drizzle-kit/api';
|
|
12
12
|
import { PgTableWithColumns } from 'drizzle-orm/pg-core';
|
|
@@ -592,11 +592,13 @@ interface SyncedBacking {
|
|
|
592
592
|
* SELECT before CREATE VIEW, or preserve a separately verified publisher grant.
|
|
593
593
|
*/
|
|
594
594
|
declare const SYNCED_VIEW_EXECUTION_OWNER_ROLE = "orm_exec";
|
|
595
|
-
declare function syncedViewStatements({ definition, backings, readPolicyIrByTable, columnNamesByTable, columnTypesByTable, executionOwnerRole, backingPrivileges, viewPrivileges, statementClaimChecks, }: {
|
|
595
|
+
declare function syncedViewStatements({ definition, backings, readPolicyIrByTable, policyTables, columnNamesByTable, columnTypesByTable, executionOwnerRole, backingPrivileges, viewPrivileges, statementClaimChecks, }: {
|
|
596
596
|
definition: NamespaceDefinition;
|
|
597
597
|
backings: readonly SyncedBacking[];
|
|
598
598
|
/** v2 compiled read policies (preserves capability/role variants). */
|
|
599
599
|
readPolicyIrByTable?: ReadonlyMap<string, PredIr>;
|
|
600
|
+
/** Shared compiler metadata, including qualified imported targets and platform users. */
|
|
601
|
+
policyTables?: Readonly<Record<string, TableMetaIr>>;
|
|
600
602
|
/** Logical column name → physical backing column name per synced table. */
|
|
601
603
|
columnNamesByTable?: ReadonlyMap<string, Readonly<Record<string, string>>>;
|
|
602
604
|
/**
|
|
@@ -1877,4 +1879,4 @@ declare function planTableImport({ definition, spec, after, }: {
|
|
|
1877
1879
|
after?: string;
|
|
1878
1880
|
}): ImportPlanResult;
|
|
1879
1881
|
|
|
1880
|
-
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, type ActionDefinition, CAPABILITIES_CLAIM_KEY, CLAIMS_SETTING, COLUMN_TYPES, COMPARE_OPS, CanonicalDefinition, type ColumnDefault, type ColumnDefinition, type ColumnType, type CommittedChainEntry, type CommittedMigration, type CompareOp, type CompilePredIrToSqlOptions, type CompiledStatement, type DefinitionFile, type DefinitionSource, type DestructiveStatement, type DiffOptions, type DrizzleEntities, IMPORT_CONFLICT_MODES, type ImportConflictMode, type ImportPlan, type ImportPlanResult, type ImportSpec, type IndexDefinition, type JournalEntry, type LinkDefinition, type LoadedNamespace, MIGRATIONS_DIRNAME, type MigrationJournal, type MigrationWorkspace, type NamespaceCapabilities, type NamespaceConfig, type NamespaceDefinition, type NamespaceSnapshot, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, type Operand, OrmDefinitionError, type OrmMigrationExport, type ParsedPredicate, type PlannedMigration, PredIr, type Predicate, type PredicateColumnTypes, PredicateParseError, ROLES_CLAIM_KEY, type RebaseEntry, type RebaseEntryInput, type RebaseNoopOptions, STATEMENT_KINDS, SYNCED_VIEW_EXECUTION_OWNER_ROLE, type StatementKind, type SyncedBacking, type SyncedColumnType, type SyncedPredicateColumnTypes, type TableFile, type ValidatesEntry, type WrittenMigration, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalizeDefinition, capabilityExpression, castParts, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, computeDefinitionHash, convertV1DefinitionToCanonical, createOrmMigrationExport, declaredCapabilityKeys, diffCommand, diffStatements, emptyJournal, emptySnapshot, extractNamedParams, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, identifierSchema, importSpecSchema, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, migrationName, namespaceConfigSchema, namespaceSchema, normalizeSnapshot, ormMigrationExportSchema, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, predicateOperands, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, rewriteSyncedSourceRelationsInViewQuery, roleExpression, securityStatements, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedTables, syncedViewDropStatements, syncedViewStatements, tableFileSchema, tableReferenceSchema, typesInterfaceName, validateViewCatalogStatement, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
|
1882
|
+
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, type ActionDefinition, CAPABILITIES_CLAIM_KEY, CLAIMS_SETTING, COLUMN_TYPES, COMPARE_OPS, CanonicalDefinition, type ColumnDefault, type ColumnDefinition, type ColumnType, type CommittedChainEntry, type CommittedMigration, type CompareOp, type CompilePredIrToSqlOptions, type CompiledStatement, type DefinitionFile, type DefinitionSource, type DestructiveStatement, type DiffOptions, type DrizzleEntities, IMPORT_CONFLICT_MODES, type ImportConflictMode, type ImportPlan, type ImportPlanResult, type ImportSpec, type IndexDefinition, type JournalEntry, type LinkDefinition, type LoadedNamespace, MIGRATIONS_DIRNAME, type MigrationJournal, type MigrationWorkspace, type NamespaceCapabilities, type NamespaceConfig, type NamespaceDefinition, type NamespaceSnapshot, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, type Operand, OrmDefinitionError, type OrmMigrationExport, type ParsedPredicate, type PlannedMigration, PredIr, type Predicate, type PredicateColumnTypes, PredicateParseError, ROLES_CLAIM_KEY, type RebaseEntry, type RebaseEntryInput, type RebaseNoopOptions, STATEMENT_KINDS, SYNCED_VIEW_EXECUTION_OWNER_ROLE, type StatementKind, type SyncedBacking, type SyncedColumnType, type SyncedPredicateColumnTypes, type TableFile, TableMetaIr, type ValidatesEntry, type WrittenMigration, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalizeDefinition, capabilityExpression, castParts, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, computeDefinitionHash, convertV1DefinitionToCanonical, createOrmMigrationExport, declaredCapabilityKeys, diffCommand, diffStatements, emptyJournal, emptySnapshot, extractNamedParams, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, identifierSchema, importSpecSchema, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, migrationName, namespaceConfigSchema, namespaceSchema, normalizeSnapshot, ormMigrationExportSchema, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, predicateOperands, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, rewriteSyncedSourceRelationsInViewQuery, roleExpression, securityStatements, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedTables, syncedViewDropStatements, syncedViewStatements, tableFileSchema, tableReferenceSchema, typesInterfaceName, validateViewCatalogStatement, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export { CANONICAL_FORMAT, CanonicalColumn, CanonicalEnum, CanonicalLink, Canoni
|
|
|
5
5
|
import { CustomRolesBlock } from '@sequenceholdings/custom-roles-manifest';
|
|
6
6
|
export { CustomRolesBlock, capabilityPinsSchema, customRolesBlockSchema, customRolesDeclared, parseCapabilityPin, validateCapabilityPins } from '@sequenceholdings/custom-roles-manifest';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { PredIr } from './ir.js';
|
|
9
|
-
export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, CellSelectionIr, ClaimKey, CmpOp, CompiledArtifact, CompiledOperation, DATE_BUCKETS, DateBucket, EXTERNAL_POLICY_CLAIM_KEYS, ExternalPolicyClaimKey, GUARDED_IR_VERSION, GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, InputRefKind, IrVersionError, LEGACY_IR_VERSION, LimitIr, OrderIr, PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, ResolvedMetaIr, ResolvedSourceIr, RootIr, SQL_IR_VERSION, SelectionIr,
|
|
8
|
+
import { PredIr, TableMetaIr } from './ir.js';
|
|
9
|
+
export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, CellSelectionIr, ClaimKey, CmpOp, CompiledArtifact, CompiledOperation, DATE_BUCKETS, DateBucket, EXTERNAL_POLICY_CLAIM_KEYS, ExternalPolicyClaimKey, GUARDED_IR_VERSION, GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, InputRefKind, IrVersionError, LEGACY_IR_VERSION, LimitIr, OrderIr, PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, ResolvedMetaIr, ResolvedSourceIr, RootIr, SERVICE_PRINCIPAL_IR_VERSION, SQL_IR_VERSION, SelectionIr, ValueIr, VariableDefaultIr, VariableIr, compiledArtifactSchema, compiledOperationSchema, indexByHash, isExternalPolicyClaimKey, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, usesServicePrincipal, valueIrSchema, variableDefaultIrSchema, variableIrSchema } from './ir.js';
|
|
10
10
|
export { e as CAPABILITY_KEY_PATTERN, C as CELLS_FIELD, a as CELL_PARTS, f as CELL_PART_SUFFIX, g as CLAIM_KEY_PATTERN, h as COLUMN_IDENTIFIER_PATTERN, i as CONSUMER_ROLE_SUFFIX, b as CellPart, D as DEFINITION_FILE_EXTENSIONS, H as HASH_DOMAIN, I as IDENTIFIER_PATTERN, M as MATERIALIZE_ACTOR, j as MATERIALIZE_CLAIMS_JSON, k as MAX_DEFINITION_FILE_BYTES, l as MAX_GENERATED_SDL_BYTES, m as MAX_IDENTIFIER_LENGTH, n as MAX_PERSISTED_READ_ROWS, o as MAX_TRACKED_COLUMN_NAME, p as NAMESPACE_CONFIG_FILENAMES, N as NAMESPACE_PATTERN, O as ORM_DATA_TOKEN_HEADER, q as ORM_REGISTRATION_MAX_BYTES, r as ORM_SCHEMA_PREFIX, d as ORM_SERVICE_DATA_TOKEN_HEADER, Q as QUALIFIED_TABLE_PATTERN, R as RESERVED_COLUMN_NAMES, s as RESERVED_TABLE_NAMES, S as SYNCED_SOURCE_PATTERN, c as cellColumnName, t as consumerRoleName, u as materializeLockKey, v as materializedRefreshFunctionName, w as ormSchemaName } from './constants-Dou1RkTo.js';
|
|
11
11
|
import { generateDrizzleJson } from 'drizzle-kit/api';
|
|
12
12
|
import { PgTableWithColumns } from 'drizzle-orm/pg-core';
|
|
@@ -592,11 +592,13 @@ interface SyncedBacking {
|
|
|
592
592
|
* SELECT before CREATE VIEW, or preserve a separately verified publisher grant.
|
|
593
593
|
*/
|
|
594
594
|
declare const SYNCED_VIEW_EXECUTION_OWNER_ROLE = "orm_exec";
|
|
595
|
-
declare function syncedViewStatements({ definition, backings, readPolicyIrByTable, columnNamesByTable, columnTypesByTable, executionOwnerRole, backingPrivileges, viewPrivileges, statementClaimChecks, }: {
|
|
595
|
+
declare function syncedViewStatements({ definition, backings, readPolicyIrByTable, policyTables, columnNamesByTable, columnTypesByTable, executionOwnerRole, backingPrivileges, viewPrivileges, statementClaimChecks, }: {
|
|
596
596
|
definition: NamespaceDefinition;
|
|
597
597
|
backings: readonly SyncedBacking[];
|
|
598
598
|
/** v2 compiled read policies (preserves capability/role variants). */
|
|
599
599
|
readPolicyIrByTable?: ReadonlyMap<string, PredIr>;
|
|
600
|
+
/** Shared compiler metadata, including qualified imported targets and platform users. */
|
|
601
|
+
policyTables?: Readonly<Record<string, TableMetaIr>>;
|
|
600
602
|
/** Logical column name → physical backing column name per synced table. */
|
|
601
603
|
columnNamesByTable?: ReadonlyMap<string, Readonly<Record<string, string>>>;
|
|
602
604
|
/**
|
|
@@ -1877,4 +1879,4 @@ declare function planTableImport({ definition, spec, after, }: {
|
|
|
1877
1879
|
after?: string;
|
|
1878
1880
|
}): ImportPlanResult;
|
|
1879
1881
|
|
|
1880
|
-
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, type ActionDefinition, CAPABILITIES_CLAIM_KEY, CLAIMS_SETTING, COLUMN_TYPES, COMPARE_OPS, CanonicalDefinition, type ColumnDefault, type ColumnDefinition, type ColumnType, type CommittedChainEntry, type CommittedMigration, type CompareOp, type CompilePredIrToSqlOptions, type CompiledStatement, type DefinitionFile, type DefinitionSource, type DestructiveStatement, type DiffOptions, type DrizzleEntities, IMPORT_CONFLICT_MODES, type ImportConflictMode, type ImportPlan, type ImportPlanResult, type ImportSpec, type IndexDefinition, type JournalEntry, type LinkDefinition, type LoadedNamespace, MIGRATIONS_DIRNAME, type MigrationJournal, type MigrationWorkspace, type NamespaceCapabilities, type NamespaceConfig, type NamespaceDefinition, type NamespaceSnapshot, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, type Operand, OrmDefinitionError, type OrmMigrationExport, type ParsedPredicate, type PlannedMigration, PredIr, type Predicate, type PredicateColumnTypes, PredicateParseError, ROLES_CLAIM_KEY, type RebaseEntry, type RebaseEntryInput, type RebaseNoopOptions, STATEMENT_KINDS, SYNCED_VIEW_EXECUTION_OWNER_ROLE, type StatementKind, type SyncedBacking, type SyncedColumnType, type SyncedPredicateColumnTypes, type TableFile, type ValidatesEntry, type WrittenMigration, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalizeDefinition, capabilityExpression, castParts, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, computeDefinitionHash, convertV1DefinitionToCanonical, createOrmMigrationExport, declaredCapabilityKeys, diffCommand, diffStatements, emptyJournal, emptySnapshot, extractNamedParams, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, identifierSchema, importSpecSchema, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, migrationName, namespaceConfigSchema, namespaceSchema, normalizeSnapshot, ormMigrationExportSchema, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, predicateOperands, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, rewriteSyncedSourceRelationsInViewQuery, roleExpression, securityStatements, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedTables, syncedViewDropStatements, syncedViewStatements, tableFileSchema, tableReferenceSchema, typesInterfaceName, validateViewCatalogStatement, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
|
1882
|
+
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, type ActionDefinition, CAPABILITIES_CLAIM_KEY, CLAIMS_SETTING, COLUMN_TYPES, COMPARE_OPS, CanonicalDefinition, type ColumnDefault, type ColumnDefinition, type ColumnType, type CommittedChainEntry, type CommittedMigration, type CompareOp, type CompilePredIrToSqlOptions, type CompiledStatement, type DefinitionFile, type DefinitionSource, type DestructiveStatement, type DiffOptions, type DrizzleEntities, IMPORT_CONFLICT_MODES, type ImportConflictMode, type ImportPlan, type ImportPlanResult, type ImportSpec, type IndexDefinition, type JournalEntry, type LinkDefinition, type LoadedNamespace, MIGRATIONS_DIRNAME, type MigrationJournal, type MigrationWorkspace, type NamespaceCapabilities, type NamespaceConfig, type NamespaceDefinition, type NamespaceSnapshot, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, type Operand, OrmDefinitionError, type OrmMigrationExport, type ParsedPredicate, type PlannedMigration, PredIr, type Predicate, type PredicateColumnTypes, PredicateParseError, ROLES_CLAIM_KEY, type RebaseEntry, type RebaseEntryInput, type RebaseNoopOptions, STATEMENT_KINDS, SYNCED_VIEW_EXECUTION_OWNER_ROLE, type StatementKind, type SyncedBacking, type SyncedColumnType, type SyncedPredicateColumnTypes, type TableFile, TableMetaIr, type ValidatesEntry, type WrittenMigration, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalizeDefinition, capabilityExpression, castParts, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, computeDefinitionHash, convertV1DefinitionToCanonical, createOrmMigrationExport, declaredCapabilityKeys, diffCommand, diffStatements, emptyJournal, emptySnapshot, extractNamedParams, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, identifierSchema, importSpecSchema, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, migrationName, namespaceConfigSchema, namespaceSchema, normalizeSnapshot, ormMigrationExportSchema, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, predicateOperands, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, rewriteSyncedSourceRelationsInViewQuery, roleExpression, securityStatements, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedTables, syncedViewDropStatements, syncedViewStatements, tableFileSchema, tableReferenceSchema, typesInterfaceName, validateViewCatalogStatement, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
package/dist/index.js
CHANGED
|
@@ -4218,6 +4218,8 @@ function compilePredIrToSql(pred, options = {}) {
|
|
|
4218
4218
|
return `(NOT ${compilePredIrToSql(pred.operand, options)})`;
|
|
4219
4219
|
case "cmp":
|
|
4220
4220
|
return compileCmp(pred.op, pred.column, pred.value, options);
|
|
4221
|
+
case "servicePrincipal":
|
|
4222
|
+
return `coalesce(${claimExpression("servicePrincipal")} = 'true', false)`;
|
|
4221
4223
|
case "capability":
|
|
4222
4224
|
return `(${options.statementClaimChecks ? "SELECT " : ""}${capabilityExpression(pred.key, pred.namespace ?? options.namespace)})`;
|
|
4223
4225
|
case "role":
|
|
@@ -4445,6 +4447,39 @@ function resolveValidatesTarget(definition, entry) {
|
|
|
4445
4447
|
}
|
|
4446
4448
|
return { schema: ormSchemaName(definition.namespace), table: entry.table, key };
|
|
4447
4449
|
}
|
|
4450
|
+
|
|
4451
|
+
// src/compiler/static-policy-sql.ts
|
|
4452
|
+
function compileStaticPolicySql({ table, predicate, tables, namespace, alias, rootRelation, statementClaimChecks, onRead }) {
|
|
4453
|
+
let sequence = 0;
|
|
4454
|
+
const aliases = new Set([alias, rootRelation].filter((value) => value !== void 0));
|
|
4455
|
+
const column = (meta, qualifier, name2) => {
|
|
4456
|
+
const found = meta.columns.find((c) => c.name === name2 || c.columnName === name2);
|
|
4457
|
+
if (!found) throw new OrmDefinitionError("Static policy relationship column is unavailable");
|
|
4458
|
+
return `${quoteIdentifier(qualifier)}.${quoteIdentifier(found.columnName)}`;
|
|
4459
|
+
};
|
|
4460
|
+
const render = (meta, pred, qualifier, outerRelation) => compilePredIrToSql(pred, {
|
|
4461
|
+
alias: qualifier,
|
|
4462
|
+
namespace: meta.namespace ?? namespace,
|
|
4463
|
+
statementClaimChecks,
|
|
4464
|
+
columnNames: Object.fromEntries(meta.columns.map((c) => [c.name, c.columnName])),
|
|
4465
|
+
columnTypes: Object.fromEntries(meta.columns.map((c) => [c.name, c.type])),
|
|
4466
|
+
exists: (node) => {
|
|
4467
|
+
const link = meta.links.find((candidate) => candidate.name === node.link);
|
|
4468
|
+
const target = link?.target ? tables[link.target] : void 0;
|
|
4469
|
+
const parent = qualifier ?? outerRelation;
|
|
4470
|
+
if (!link || !target || !parent) throw new OrmDefinitionError("Static policy relationship metadata is unavailable");
|
|
4471
|
+
onRead?.(target);
|
|
4472
|
+
let child;
|
|
4473
|
+
do {
|
|
4474
|
+
child = `policy_${++sequence}`;
|
|
4475
|
+
} while (aliases.has(child));
|
|
4476
|
+
aliases.add(child);
|
|
4477
|
+
const join4 = link.kind === "toMany" ? `${column(target, child, link.on)} = ${column(meta, parent, link.references)}` : `${column(meta, parent, link.on)} = ${column(target, child, link.references)}`;
|
|
4478
|
+
return `EXISTS (SELECT 1 FROM ${quoteIdentifier(target.schema)}.${quoteIdentifier(target.table)} AS ${quoteIdentifier(child)} WHERE ${join4} AND (${render(target, node.where, child)}))`;
|
|
4479
|
+
}
|
|
4480
|
+
});
|
|
4481
|
+
return render(table, predicate, alias, rootRelation);
|
|
4482
|
+
}
|
|
4448
4483
|
var linkSchema = z.strictObject({
|
|
4449
4484
|
to: tableReferenceSchema,
|
|
4450
4485
|
on: identifierSchema,
|
|
@@ -4794,6 +4829,7 @@ function syncedViewStatements({
|
|
|
4794
4829
|
definition,
|
|
4795
4830
|
backings,
|
|
4796
4831
|
readPolicyIrByTable,
|
|
4832
|
+
policyTables,
|
|
4797
4833
|
columnNamesByTable,
|
|
4798
4834
|
columnTypesByTable,
|
|
4799
4835
|
executionOwnerRole = SYNCED_VIEW_EXECUTION_OWNER_ROLE,
|
|
@@ -4840,7 +4876,15 @@ function syncedViewStatements({
|
|
|
4840
4876
|
});
|
|
4841
4877
|
const readPolicyIr = readPolicyIrByTable?.get(table.table);
|
|
4842
4878
|
const readPolicy = table.policies?.read;
|
|
4843
|
-
const
|
|
4879
|
+
const policyTable = policyTables?.[table.table];
|
|
4880
|
+
const policyClause = readPolicyIr ? ` WHERE ${policyTable && policyTables ? compileStaticPolicySql({
|
|
4881
|
+
table: policyTable,
|
|
4882
|
+
predicate: readPolicyIr,
|
|
4883
|
+
tables: policyTables,
|
|
4884
|
+
namespace: definition.namespace,
|
|
4885
|
+
rootRelation: physical2.table,
|
|
4886
|
+
statementClaimChecks
|
|
4887
|
+
}) : compilePredIrToSql(readPolicyIr, {
|
|
4844
4888
|
namespace: definition.namespace,
|
|
4845
4889
|
statementClaimChecks,
|
|
4846
4890
|
columnTypes,
|
|
@@ -6425,6 +6469,15 @@ function correctIntrospectionQuery(query) {
|
|
|
6425
6469
|
if (!is(query, SQL)) return query;
|
|
6426
6470
|
const compiled = new PgDialect().sqlToQuery(query);
|
|
6427
6471
|
let text4 = compiled.sql;
|
|
6472
|
+
if (text4.includes("JOIN information_schema.constraint_column_usage AS ccu USING (constraint_schema, constraint_name)")) {
|
|
6473
|
+
text4 = text4.replace(/;\s*$/, "") + ` ORDER BY tc.constraint_name,
|
|
6474
|
+
(SELECT key_usage.ordinal_position FROM information_schema.key_column_usage AS key_usage
|
|
6475
|
+
WHERE key_usage.constraint_schema = tc.constraint_schema
|
|
6476
|
+
AND key_usage.constraint_name = tc.constraint_name
|
|
6477
|
+
AND key_usage.table_schema = tc.table_schema
|
|
6478
|
+
AND key_usage.table_name = tc.table_name
|
|
6479
|
+
AND key_usage.column_name = c.column_name)`;
|
|
6480
|
+
}
|
|
6428
6481
|
const indexJoin = "pg_constraint con ON con.conindid = idx.indexrelid";
|
|
6429
6482
|
if (text4.includes("AS generated_by_constraint") && text4.includes(indexJoin)) {
|
|
6430
6483
|
text4 = text4.replace(indexJoin, `${indexJoin} AND con.contype IN ('p', 'u', 'x')`);
|
|
@@ -6657,14 +6710,21 @@ function renderOrmMigrationExport(exported) {
|
|
|
6657
6710
|
var BUILTIN_SQL_READ_HASH = "sha256:a50c477c952a5e0fe68ed158a4530e4aab573c09bcbb1a8ac454dc88a39a6258";
|
|
6658
6711
|
|
|
6659
6712
|
// src/ir/index.ts
|
|
6660
|
-
var IR_VERSION =
|
|
6713
|
+
var IR_VERSION = 6;
|
|
6661
6714
|
var LEGACY_IR_VERSION = 1;
|
|
6662
6715
|
var GUARDED_IR_VERSION = 2;
|
|
6663
6716
|
var COMPOSED_IR_VERSION = 3;
|
|
6664
6717
|
var SQL_IR_VERSION = 4;
|
|
6665
6718
|
var RUNTIME_SQL_IR_VERSION = 5;
|
|
6666
|
-
var
|
|
6719
|
+
var SERVICE_PRINCIPAL_IR_VERSION = 6;
|
|
6720
|
+
var irVersionSchema = z.union([z.literal(LEGACY_IR_VERSION), z.literal(GUARDED_IR_VERSION), z.literal(COMPOSED_IR_VERSION), z.literal(SQL_IR_VERSION), z.literal(RUNTIME_SQL_IR_VERSION), z.literal(SERVICE_PRINCIPAL_IR_VERSION)]);
|
|
6667
6721
|
var operationVersionSchema = z.object({ irVersion: irVersionSchema });
|
|
6722
|
+
function usesServicePrincipal(value) {
|
|
6723
|
+
if (value === null || typeof value !== "object") return false;
|
|
6724
|
+
if (Array.isArray(value)) return value.some(usesServicePrincipal);
|
|
6725
|
+
const row = value;
|
|
6726
|
+
return row.kind === "servicePrincipal" || Object.values(row).some(usesServicePrincipal);
|
|
6727
|
+
}
|
|
6668
6728
|
function requiredArtifactIrVersion(operations) {
|
|
6669
6729
|
let required = LEGACY_IR_VERSION;
|
|
6670
6730
|
for (const operation of operations) {
|
|
@@ -6724,6 +6784,7 @@ var predIrSchema = z.lazy(
|
|
|
6724
6784
|
z.object({ kind: z.literal("capability"), key: z.string(), namespace: z.string().optional() }),
|
|
6725
6785
|
z.object({ kind: z.literal("role"), key: z.string(), namespace: z.string().optional() }),
|
|
6726
6786
|
z.object({ kind: z.literal("dynamicFilter"), slot: z.string() }),
|
|
6787
|
+
z.object({ kind: z.literal("servicePrincipal") }).strict(),
|
|
6727
6788
|
z.object({ kind: z.literal("const"), value: z.boolean() })
|
|
6728
6789
|
])
|
|
6729
6790
|
);
|
|
@@ -6949,7 +7010,7 @@ var variableIrSchema = z.object({
|
|
|
6949
7010
|
/** Absent = no default declared; see {@link variableDefaultIrSchema}. */
|
|
6950
7011
|
defaultValue: variableDefaultIrSchema.optional()
|
|
6951
7012
|
});
|
|
6952
|
-
var sqlColumnSchema = z.object({ name: z.string(), type: z.enum(["text", "boolean", "integer", "bigint", "numeric", "double", "uuid", "date", "timestamptz"]), nullable: z.boolean() });
|
|
7013
|
+
var sqlColumnSchema = z.object({ name: z.string(), type: z.enum(["text", "boolean", "integer", "bigint", "numeric", "double", "uuid", "date", "timestamptz", "jsonb"]), nullable: z.boolean() });
|
|
6953
7014
|
var compiledOperationSchema = z.object({
|
|
6954
7015
|
language: z.literal("sql").optional(),
|
|
6955
7016
|
/** Server-compiled object catalog and permission ceiling, never caller SQL. */
|
|
@@ -6987,6 +7048,9 @@ var compiledOperationSchema = z.object({
|
|
|
6987
7048
|
tableSet: z.array(z.string()).min(1),
|
|
6988
7049
|
roots: z.array(rootIrSchema)
|
|
6989
7050
|
}).superRefine((operation, ctx) => {
|
|
7051
|
+
if (operation.irVersion < SERVICE_PRINCIPAL_IR_VERSION && usesServicePrincipal(operation.roots)) {
|
|
7052
|
+
ctx.addIssue({ code: "custom", message: "servicePrincipal() requires IR v6" });
|
|
7053
|
+
}
|
|
6990
7054
|
if (operation.language === "sql") {
|
|
6991
7055
|
const validPlan = operation.sqlQuery ? !operation.sql && operation.irVersion === RUNTIME_SQL_IR_VERSION : !!operation.sql && operation.irVersion === SQL_IR_VERSION;
|
|
6992
7056
|
const builtin = operation.name === "BuiltinSqlRead" && operation.opHash === BUILTIN_SQL_READ_HASH && operation.requires === null;
|
|
@@ -7119,6 +7183,9 @@ var compiledArtifactSchema = z.object({
|
|
|
7119
7183
|
tables: z.record(z.string(), tableMetaIrSchema),
|
|
7120
7184
|
operations: z.record(z.string(), compiledOperationSchema)
|
|
7121
7185
|
}).superRefine((artifact, ctx) => {
|
|
7186
|
+
if (artifact.irVersion < SERVICE_PRINCIPAL_IR_VERSION && usesServicePrincipal(artifact)) {
|
|
7187
|
+
ctx.addIssue({ code: "custom", message: "servicePrincipal() requires IR v6" });
|
|
7188
|
+
}
|
|
7122
7189
|
if (Object.keys(artifact.dependencies ?? {}).length > 0 && artifact.irVersion < COMPOSED_IR_VERSION) {
|
|
7123
7190
|
ctx.addIssue({ code: "custom", path: ["irVersion"], message: "cross-namespace dependencies require IR v3" });
|
|
7124
7191
|
}
|
|
@@ -8361,6 +8428,6 @@ function resumeArguments({
|
|
|
8361
8428
|
return [literal2.sql];
|
|
8362
8429
|
}
|
|
8363
8430
|
|
|
8364
|
-
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, CANONICAL_FORMAT, CAPABILITIES_CLAIM_KEY, CAPABILITY_KEY_PATTERN, CELLS_FIELD, CELL_PARTS, CELL_PART_SUFFIX, CLAIMS_CONTRACT, CLAIMS_SETTING, CLAIM_KEY_PATTERN, CMP_OPS, COLUMN_BRAND, COLUMN_DEFAULT_FNS, COLUMN_IDENTIFIER_PATTERN, COLUMN_TYPES2 as COLUMN_TYPES, COMPARE_OPS, COMPOSED_IR_VERSION, CONSUMER_ROLE_SUFFIX, ColumnBuilder, DATE_BUCKETS, DEFINITION_FILE_EXTENSIONS, ENUM_BRAND, EXTERNAL_POLICY_CLAIM_KEYS, GUARDED_IR_VERSION, HASH_DOMAIN, IDENTIFIER_PATTERN, IDENTIFIER_RE, IMPORT_CONFLICT_MODES, INPUT_REF_KINDS, IR_VERSION, IrVersionError, LEGACY_IR_VERSION, LINK_BRAND, MATERIALIZE_ACTOR, MATERIALIZE_CLAIMS_JSON, MAX_DEFINITION_FILE_BYTES, MAX_GENERATED_SDL_BYTES, MAX_IDENTIFIER_LENGTH, MAX_PERSISTED_READ_ROWS, MAX_TRACKED_COLUMN_NAME, MIGRATIONS_DIRNAME, NAMESPACE_CONFIG_BRAND, NAMESPACE_CONFIG_FILE, NAMESPACE_CONFIG_FILENAMES, NAMESPACE_PATTERN, ORM_DATA_TOKEN_HEADER, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, ORM_REGISTRATION_MAX_BYTES, ORM_SCHEMA_PREFIX, ORM_SERVICE_DATA_TOKEN_HEADER, ORM_TO_PIPELINE_TYPE, OrmDefinitionError, PredicateParseError, QUALIFIED_TABLE_PATTERN, RESERVED_COLUMN_NAMES, RESERVED_TABLE_NAMES, ROLES_CLAIM_KEY, RUNTIME_SQL_IR_VERSION, SCHEMA_DIR, SQL_IR_VERSION, STATEMENT_KINDS, SYNCED_CONTRACT_HASH_DOMAIN, SYNCED_SOURCE_PATTERN, SYNCED_VIEW_EXECUTION_OWNER_ROLE, TABLE_BRAND, VIEW_BRAND, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, activeAuthoringContext, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, beginAuthoringContext, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalActionSchema, canonicalColumnSchema, canonicalDefinitionSchema, canonicalEnumSchema, canonicalIndexSchema, canonicalLinkSchema, canonicalPoliciesSchema, canonicalRelations, canonicalTableSchema, canonicalViewSchema, canonicalizeDefinition, capabilityExpression, castParts, cellColumnName, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema2 as columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, compiledArtifactSchema, compiledOperationSchema, computeCanonicalHash, computeDefinitionHash, computeSyncedContractHash, consumerRoleName, convertV1DefinitionToCanonical, createOrmMigrationExport, custom, declaredCapabilityKeys, defineEnum, defineNamespace, defineOperation, defineResolvedTable, defineSyncedTable, defineTable, defineView, deriveColumnName, diffCommand, diffStatements, emptyJournal, emptySnapshot, endAuthoringContext, etlSource, extractNamedParams, extractOrmSyncedTableContract, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, highest, identifierSchema, importSpecSchema, indexByHash, isColumnBuilder, isEnumRef, isExternalPolicyClaimKey, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, isSeqLink, isSeqNamespaceConfig, isSeqTable, isSeqView, latest, limitIrSchema, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, loadNamespaceFromDir, lowest, managedFn, manualSource, materializeLockKey, materializedRefreshFunctionName, migrationName, namespaceConfigSchema, namespaceSchema, nonNullFirst, normalizeCanonical, normalizeIr, normalizeSnapshot, objectRef, ontologyContractSchema, orderIrSchema, ormMigrationExportSchema, ormSchemaName, overlayWinsUnion, overrideRowMutation, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, policyExpressionSchema, policyVariantSchema, predIrSchema, predicateOperands, prefetchPlanIrSchema, prefetchSource, priority, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readOntologyContract, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, revertOverlayMutation, rewriteSyncedSourceRelationsInViewQuery, roleExpression, rootIrSchema, securityStatements, selectionIrSchema, serializeNamespace, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedContractSurface, syncedTables, syncedViewDropStatements, syncedViewStatements, t, tableFileSchema, tableMetaIrSchema, tableReferenceSchema, toMany, toOne, toPlatformUser, typesInterfaceName, validateNamespaceCatalog, validateViewCatalogStatement, valueIrSchema, variableDefaultIrSchema, variableIrSchema, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
|
8431
|
+
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, CANONICAL_FORMAT, CAPABILITIES_CLAIM_KEY, CAPABILITY_KEY_PATTERN, CELLS_FIELD, CELL_PARTS, CELL_PART_SUFFIX, CLAIMS_CONTRACT, CLAIMS_SETTING, CLAIM_KEY_PATTERN, CMP_OPS, COLUMN_BRAND, COLUMN_DEFAULT_FNS, COLUMN_IDENTIFIER_PATTERN, COLUMN_TYPES2 as COLUMN_TYPES, COMPARE_OPS, COMPOSED_IR_VERSION, CONSUMER_ROLE_SUFFIX, ColumnBuilder, DATE_BUCKETS, DEFINITION_FILE_EXTENSIONS, ENUM_BRAND, EXTERNAL_POLICY_CLAIM_KEYS, GUARDED_IR_VERSION, HASH_DOMAIN, IDENTIFIER_PATTERN, IDENTIFIER_RE, IMPORT_CONFLICT_MODES, INPUT_REF_KINDS, IR_VERSION, IrVersionError, LEGACY_IR_VERSION, LINK_BRAND, MATERIALIZE_ACTOR, MATERIALIZE_CLAIMS_JSON, MAX_DEFINITION_FILE_BYTES, MAX_GENERATED_SDL_BYTES, MAX_IDENTIFIER_LENGTH, MAX_PERSISTED_READ_ROWS, MAX_TRACKED_COLUMN_NAME, MIGRATIONS_DIRNAME, NAMESPACE_CONFIG_BRAND, NAMESPACE_CONFIG_FILE, NAMESPACE_CONFIG_FILENAMES, NAMESPACE_PATTERN, ORM_DATA_TOKEN_HEADER, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, ORM_REGISTRATION_MAX_BYTES, ORM_SCHEMA_PREFIX, ORM_SERVICE_DATA_TOKEN_HEADER, ORM_TO_PIPELINE_TYPE, OrmDefinitionError, PredicateParseError, QUALIFIED_TABLE_PATTERN, RESERVED_COLUMN_NAMES, RESERVED_TABLE_NAMES, ROLES_CLAIM_KEY, RUNTIME_SQL_IR_VERSION, SCHEMA_DIR, SERVICE_PRINCIPAL_IR_VERSION, SQL_IR_VERSION, STATEMENT_KINDS, SYNCED_CONTRACT_HASH_DOMAIN, SYNCED_SOURCE_PATTERN, SYNCED_VIEW_EXECUTION_OWNER_ROLE, TABLE_BRAND, VIEW_BRAND, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, activeAuthoringContext, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, beginAuthoringContext, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalActionSchema, canonicalColumnSchema, canonicalDefinitionSchema, canonicalEnumSchema, canonicalIndexSchema, canonicalLinkSchema, canonicalPoliciesSchema, canonicalRelations, canonicalTableSchema, canonicalViewSchema, canonicalizeDefinition, capabilityExpression, castParts, cellColumnName, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema2 as columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, compiledArtifactSchema, compiledOperationSchema, computeCanonicalHash, computeDefinitionHash, computeSyncedContractHash, consumerRoleName, convertV1DefinitionToCanonical, createOrmMigrationExport, custom, declaredCapabilityKeys, defineEnum, defineNamespace, defineOperation, defineResolvedTable, defineSyncedTable, defineTable, defineView, deriveColumnName, diffCommand, diffStatements, emptyJournal, emptySnapshot, endAuthoringContext, etlSource, extractNamedParams, extractOrmSyncedTableContract, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, highest, identifierSchema, importSpecSchema, indexByHash, isColumnBuilder, isEnumRef, isExternalPolicyClaimKey, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, isSeqLink, isSeqNamespaceConfig, isSeqTable, isSeqView, latest, limitIrSchema, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, loadNamespaceFromDir, lowest, managedFn, manualSource, materializeLockKey, materializedRefreshFunctionName, migrationName, namespaceConfigSchema, namespaceSchema, nonNullFirst, normalizeCanonical, normalizeIr, normalizeSnapshot, objectRef, ontologyContractSchema, orderIrSchema, ormMigrationExportSchema, ormSchemaName, overlayWinsUnion, overrideRowMutation, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, policyExpressionSchema, policyVariantSchema, predIrSchema, predicateOperands, prefetchPlanIrSchema, prefetchSource, priority, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readOntologyContract, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, revertOverlayMutation, rewriteSyncedSourceRelationsInViewQuery, roleExpression, rootIrSchema, securityStatements, selectionIrSchema, serializeNamespace, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedContractSurface, syncedTables, syncedViewDropStatements, syncedViewStatements, t, tableFileSchema, tableMetaIrSchema, tableReferenceSchema, toMany, toOne, toPlatformUser, typesInterfaceName, usesServicePrincipal, validateNamespaceCatalog, validateViewCatalogStatement, valueIrSchema, variableDefaultIrSchema, variableIrSchema, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
|
8365
8432
|
//# sourceMappingURL=index.js.map
|
|
8366
8433
|
//# sourceMappingURL=index.js.map
|