@dbsp/types 1.0.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/dist/index.js ADDED
@@ -0,0 +1,85 @@
1
+ import {
2
+ UnsupportedFeatureError,
3
+ getNodeIdAlias,
4
+ isAdjacencyTraversal,
5
+ isAggregateWindowFunction,
6
+ isCoalesceExpression,
7
+ isColumnAliasExpression,
8
+ isCustomTraversal,
9
+ isDeleteIntent,
10
+ isEdgeTableTraversal,
11
+ isFieldRef,
12
+ isInsertIntent,
13
+ isMutationIntent,
14
+ isRankingWindowFunction,
15
+ isRawExpression,
16
+ isRecursiveIntent,
17
+ isRelationColumnExpression,
18
+ isSelectAggregate,
19
+ isSelectAll,
20
+ isSelectFields,
21
+ isSelectWithExpressions,
22
+ isSubqueryRef,
23
+ isUpdateIntent,
24
+ isUpsertIntent,
25
+ isValidSchema,
26
+ isWhereAnd,
27
+ isWhereAny,
28
+ isWhereComparison,
29
+ isWhereExists,
30
+ isWhereIn,
31
+ isWhereLike,
32
+ isWhereLogical,
33
+ isWhereNot,
34
+ isWhereNotExists,
35
+ isWhereNull,
36
+ isWhereOr,
37
+ isWhereRange,
38
+ isWhereRelationBased,
39
+ isWhereRelationFilter,
40
+ isWhereSubquery,
41
+ isWindowIntent
42
+ } from "./chunk-5L5N5N5J.js";
43
+ export {
44
+ UnsupportedFeatureError,
45
+ getNodeIdAlias,
46
+ isAdjacencyTraversal,
47
+ isAggregateWindowFunction,
48
+ isCoalesceExpression,
49
+ isColumnAliasExpression,
50
+ isCustomTraversal,
51
+ isDeleteIntent,
52
+ isEdgeTableTraversal,
53
+ isFieldRef,
54
+ isInsertIntent,
55
+ isMutationIntent,
56
+ isRankingWindowFunction,
57
+ isRawExpression,
58
+ isRecursiveIntent,
59
+ isRelationColumnExpression,
60
+ isSelectAggregate,
61
+ isSelectAll,
62
+ isSelectFields,
63
+ isSelectWithExpressions,
64
+ isSubqueryRef,
65
+ isUpdateIntent,
66
+ isUpsertIntent,
67
+ isValidSchema,
68
+ isWhereAnd,
69
+ isWhereAny,
70
+ isWhereComparison,
71
+ isWhereExists,
72
+ isWhereIn,
73
+ isWhereLike,
74
+ isWhereLogical,
75
+ isWhereNot,
76
+ isWhereNotExists,
77
+ isWhereNull,
78
+ isWhereOr,
79
+ isWhereRange,
80
+ isWhereRelationBased,
81
+ isWhereRelationFilter,
82
+ isWhereSubquery,
83
+ isWindowIntent
84
+ };
85
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,30 @@
1
+ export { Adapter, AdapterCapabilities, AdapterLogger, AdapterStreamOptions, AdjacencyTraversal, AggOrderByArg, AggregateExpressionIntent, AggregateFunction, AggregateIntent, AggregateWindowFunction, AliasIncludedColumnsMode, AlterColumnOptions, AmbiguityCheckResult, ArithmeticExpressionIntent, ArrayExpressionIntent, ArrayOperator, BaseAdapter, BatchUpdateIntent, BatchValuesJoinPayload, CTEDefinition, Cardinality, CaseExpressionIntent, CastExpressionIntent, CheckConstraintIR, CoalesceExpressionIntent, ColumnAliasIntent, ColumnExpressionIntent, ColumnIR, ColumnType, CommonColumnType, ComparisonExpressionIntent, ComparisonOperator, CompileOnlyAdapter, CompileOptions, CompileOptionsBase, CompileResultWithIncludes, CompiledQuery, CompilingAdapter, CreateIndexOptions, CteQueryIntent, CustomFnExpressionIntent, CustomOpExpressionIntent, CustomTraversal, DDLFeature, DDLFeatureElementMap, DDLFeatureVersionRange, DDLGeneratingAdapter, DbCasing, DecisionType, DeleteIntent, DialectCapabilities, DialectName, DropIndexOptions, DuckDBColumnType, Dump, DumpMeta, EdgeTableTraversal, EmitJoinClause, EnumIR, ExecutingAdapter, ExpressionIntent, FeatureBehaviorConfig, FeatureTranslator, FeatureWarning, FieldRef, FilterStrategy, ForeignKeyIR, FunctionExpressionIntent, HierarchyIR, IncludeIntent, IncludeRecursiveOptions, IncludeStrategy, IndexColumnDef, IndexIR, IndexInfo, IndexMethod, InsertFromIntent, InsertIntent, IntrospectingAdapter, IntrospectionOptions, IntrospectionResult, IsTypeSupported, JoinDefault, JoinIntent, JsonContainsIntent, JsonExistsIntent, JsonExtractIntent, JsonPathExtractIntent, LiteralExpressionIntent, LoadedSchema, LockIntent, LockStrength, LockWaitPolicy, LogicalOperator, MSSQLColumnType, ModelIR, MutationIntent, MySQLColumnType, NamedArgExpressionIntent, NullOperator, NullsPosition, OffsetWindowFunction, OnDeleteAction, Optionality, OrderByIntent, ParamExpressionIntent, PartitionIR, PlanDecision, PlanOptions, PlanReport, PlanWarning, PlanWarningCode, PolicyIR, PostgresColumnType, PostgresOnlyColumnType, PseudoColumnExpressionIntent, PseudoColumnMetadata, PseudoColumnTraversal, QueryIntent, RangeOperator, RangeValue, RankingWindowFunction, RawCteIntent, RawExpressionIntent, RawSqlAdapter, RecursiveAdvancedOptions, RecursiveDedupe, RecursiveDirection, RecursiveEmitOptions, RecursiveExistsOptions, RecursiveIntent, RecursiveMetadata, RecursiveNodeIdExpr, RecursivePlanOptions, RecursivePlanReport, RecursiveTrackOptions, RecursiveTraversal, RefExpressionIntent, RelationColumnIntent, RelationIR, RelationKind, RelationOperator, RelationType, ResolvedIncludeStrategy, SQLiteColumnType, ScalarSubqueryIntent, SelectAggregateIntent, SelectAllIntent, SelectFieldsIntent, SelectIntent, SelectWithExpressionsIntent, SequenceIR, SetOperationIntent, SetOperationType, SimpleCteIntent, SortDirection, StarExpressionIntent, StreamingAdapter, StringOperator, SubqueryExpressionIntent, SubqueryIncludeInfo, SubqueryRefIntent, SupportedColumnTypes, TableDDLGeneratorAdapter, TableIR, TransactionalAdapter, TranslationContext, TruncateOptions, UnaryExpressionIntent, UnnestCteIntent, UnsupportedFeatureBehavior, UnsupportedFeatureError, UpdateIntent, UpsertConflictAction, UpsertConflictTarget, UpsertFromIntent, UpsertIntent, VacuumOptions, WhereAndIntent, WhereAnyIntent, WhereComparisonIntent, WhereExistsIntent, WhereExpressionIntent, WhereInIntent, WhereIntent, WhereJsonContainsIntent, WhereJsonExistsIntent, WhereLikeIntent, WhereNotExistsIntent, WhereNotIntent, WhereNullIntent, WhereOrIntent, WhereRangeIntent, WhereRawExistsIntent, WhereRawNotExistsIntent, WhereRelationFilterIntent, WhereSubqueryIntent, WindowFunction, WindowIntent, WindowOrderBy, getNodeIdAlias, isAdjacencyTraversal, isAggregateWindowFunction, isCoalesceExpression, isColumnAliasExpression, isCustomTraversal, isDeleteIntent, isEdgeTableTraversal, isFieldRef, isInsertIntent, isMutationIntent, isRankingWindowFunction, isRawExpression, isRecursiveIntent, isRelationColumnExpression, isSelectAggregate, isSelectAll, isSelectFields, isSelectWithExpressions, isSubqueryRef, isUpdateIntent, isUpsertIntent, isValidSchema, isWhereAnd, isWhereAny, isWhereComparison, isWhereExists, isWhereIn, isWhereLike, isWhereLogical, isWhereNot, isWhereNotExists, isWhereNull, isWhereOr, isWhereRange, isWhereRelationBased, isWhereRelationFilter, isWhereSubquery, isWindowIntent } from './index.js';
2
+
3
+ /**
4
+ * @module builders
5
+ * Builder utility types for progressive intent construction.
6
+ *
7
+ * @internal Not part of the public API. Exported via @dbsp/types/internal only.
8
+ */
9
+ /**
10
+ * Utility type: removes readonly modifiers for progressive intent construction.
11
+ * Use for building intents step-by-step, then finalize to readonly type.
12
+ *
13
+ * @internal Not part of the public API. Exported via @dbsp/types/internal only.
14
+ */
15
+ type Mutable<T> = {
16
+ -readonly [K in keyof T]: T[K];
17
+ };
18
+ /**
19
+ * Intent builder type: required fields + optional rest.
20
+ * Use Pick for the required fields, Partial for the optional ones.
21
+ *
22
+ * @example
23
+ * type IncludeBuilder = IntentBuilder<IncludeIntent, 'relation'>;
24
+ * // = { relation: string } & Partial<Omit<IncludeIntent, 'relation'>>
25
+ *
26
+ * @internal Not part of the public API.
27
+ */
28
+ type IntentBuilder<T, TRequired extends keyof T> = Pick<T, TRequired> & Partial<Omit<T, TRequired>>;
29
+
30
+ export type { IntentBuilder, Mutable };
@@ -0,0 +1,85 @@
1
+ import {
2
+ UnsupportedFeatureError,
3
+ getNodeIdAlias,
4
+ isAdjacencyTraversal,
5
+ isAggregateWindowFunction,
6
+ isCoalesceExpression,
7
+ isColumnAliasExpression,
8
+ isCustomTraversal,
9
+ isDeleteIntent,
10
+ isEdgeTableTraversal,
11
+ isFieldRef,
12
+ isInsertIntent,
13
+ isMutationIntent,
14
+ isRankingWindowFunction,
15
+ isRawExpression,
16
+ isRecursiveIntent,
17
+ isRelationColumnExpression,
18
+ isSelectAggregate,
19
+ isSelectAll,
20
+ isSelectFields,
21
+ isSelectWithExpressions,
22
+ isSubqueryRef,
23
+ isUpdateIntent,
24
+ isUpsertIntent,
25
+ isValidSchema,
26
+ isWhereAnd,
27
+ isWhereAny,
28
+ isWhereComparison,
29
+ isWhereExists,
30
+ isWhereIn,
31
+ isWhereLike,
32
+ isWhereLogical,
33
+ isWhereNot,
34
+ isWhereNotExists,
35
+ isWhereNull,
36
+ isWhereOr,
37
+ isWhereRange,
38
+ isWhereRelationBased,
39
+ isWhereRelationFilter,
40
+ isWhereSubquery,
41
+ isWindowIntent
42
+ } from "./chunk-5L5N5N5J.js";
43
+ export {
44
+ UnsupportedFeatureError,
45
+ getNodeIdAlias,
46
+ isAdjacencyTraversal,
47
+ isAggregateWindowFunction,
48
+ isCoalesceExpression,
49
+ isColumnAliasExpression,
50
+ isCustomTraversal,
51
+ isDeleteIntent,
52
+ isEdgeTableTraversal,
53
+ isFieldRef,
54
+ isInsertIntent,
55
+ isMutationIntent,
56
+ isRankingWindowFunction,
57
+ isRawExpression,
58
+ isRecursiveIntent,
59
+ isRelationColumnExpression,
60
+ isSelectAggregate,
61
+ isSelectAll,
62
+ isSelectFields,
63
+ isSelectWithExpressions,
64
+ isSubqueryRef,
65
+ isUpdateIntent,
66
+ isUpsertIntent,
67
+ isValidSchema,
68
+ isWhereAnd,
69
+ isWhereAny,
70
+ isWhereComparison,
71
+ isWhereExists,
72
+ isWhereIn,
73
+ isWhereLike,
74
+ isWhereLogical,
75
+ isWhereNot,
76
+ isWhereNotExists,
77
+ isWhereNull,
78
+ isWhereOr,
79
+ isWhereRange,
80
+ isWhereRelationBased,
81
+ isWhereRelationFilter,
82
+ isWhereSubquery,
83
+ isWindowIntent
84
+ };
85
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@dbsp/types",
3
+ "version": "1.0.0",
4
+ "description": "Shared type definitions for the db-semantic-planner ecosystem",
5
+ "author": "Olivier Orabona <oorabona@users.noreply.github.com>",
6
+ "license": "MIT",
7
+ "engines": {
8
+ "node": ">=20"
9
+ },
10
+ "keywords": [
11
+ "typescript",
12
+ "types",
13
+ "orm",
14
+ "query-planner",
15
+ "database"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/oorabona/db-semantic-planner.git",
20
+ "directory": "packages/types"
21
+ },
22
+ "homepage": "https://github.com/oorabona/db-semantic-planner/tree/main/packages/types",
23
+ "bugs": {
24
+ "url": "https://github.com/oorabona/db-semantic-planner/issues"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "type": "module",
30
+ "main": "./dist/index.js",
31
+ "types": "./dist/index.d.ts",
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.js"
36
+ },
37
+ "./internal": {
38
+ "types": "./dist/internal.d.ts",
39
+ "import": "./dist/internal.js"
40
+ }
41
+ },
42
+ "files": [
43
+ "dist"
44
+ ],
45
+ "scripts": {
46
+ "build": "tsup",
47
+ "test": "vitest run",
48
+ "typecheck": "tsc --noEmit"
49
+ },
50
+ "devDependencies": {
51
+ "@types/node": "catalog:",
52
+ "typescript": "catalog:",
53
+ "tsup": "catalog:",
54
+ "vitest": "catalog:"
55
+ }
56
+ }