@prisma/orm-target-mysql 0.0.0-stage → 8.0.0-rc.21
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/LICENSE +201 -0
- package/README.md +20 -2
- package/dist/adapter-_WBomuTw.d.mts +27 -0
- package/dist/adapter-_WBomuTw.d.mts.map +1 -0
- package/dist/adapter.d.mts +6 -0
- package/dist/adapter.mjs +3 -0
- package/dist/adapter__adapter.d.mts +2 -0
- package/dist/adapter__adapter.mjs +2 -0
- package/dist/adapter__codec-types.d.mts +3 -0
- package/dist/adapter__codec-types.mjs +1 -0
- package/dist/adapter__control.d.mts +2 -0
- package/dist/adapter__control.mjs +2 -0
- package/dist/adapter__runtime.d.mts +2 -0
- package/dist/adapter__runtime.mjs +417 -0
- package/dist/adapter__runtime.mjs.map +1 -0
- package/dist/codec-descriptor-DXyubAS6-siA0R8Ow.d.mts +43 -0
- package/dist/codec-descriptor-DXyubAS6-siA0R8Ow.d.mts.map +1 -0
- package/dist/codec-descriptor-Du6DSz-3-ytBCu_mq.mjs +93 -0
- package/dist/codec-descriptor-Du6DSz-3-ytBCu_mq.mjs.map +1 -0
- package/dist/codec-descriptor-J3TP08l8-ekLvUVxW.d.mts +1 -0
- package/dist/codec-descriptor-oLRh9E29.d.mts +2 -0
- package/dist/codec-ids-BHUwoNOM.d.mts +2 -0
- package/dist/codec-ids-C00hAFkc.mjs +2 -0
- package/dist/codec-ids-cjxtOcLM-vFeQhgPm.mjs +10 -0
- package/dist/codec-ids-cjxtOcLM-vFeQhgPm.mjs.map +1 -0
- package/dist/codec-ids-sMOU8F-B-BQbCq2dr.d.mts +10 -0
- package/dist/codec-ids-sMOU8F-B-BQbCq2dr.d.mts.map +1 -0
- package/dist/codec-types-Bd7DL1Mr-CZWNfnp9.d.mts +21 -0
- package/dist/codec-types-Bd7DL1Mr-CZWNfnp9.d.mts.map +1 -0
- package/dist/codec-types-Bo3Jfilx.d.mts +1 -0
- package/dist/codec-types-Ja2kLzLS.d.mts +1 -0
- package/dist/codecs-C00kjHgh.mjs +282 -0
- package/dist/codecs-C00kjHgh.mjs.map +1 -0
- package/dist/codecs-CO_VNEYU-CwAnKzRs.d.mts +102 -0
- package/dist/codecs-CO_VNEYU-CwAnKzRs.d.mts.map +1 -0
- package/dist/codecs-DM61agRr.d.mts +21 -0
- package/dist/codecs-DM61agRr.d.mts.map +1 -0
- package/dist/contract-contributions-B9njRJbt-ClEtrK2L.mjs +14 -0
- package/dist/contract-contributions-B9njRJbt-ClEtrK2L.mjs.map +1 -0
- package/dist/contract-free-BvCdx_Ee.mjs +71 -0
- package/dist/contract-free-BvCdx_Ee.mjs.map +1 -0
- package/dist/contract-free-Cw9Mjcro.d.mts +22 -0
- package/dist/contract-free-Cw9Mjcro.d.mts.map +1 -0
- package/dist/control-C9zxRXNN.mjs +74 -0
- package/dist/control-C9zxRXNN.mjs.map +1 -0
- package/dist/control-DHkZbo58.d.mts +25 -0
- package/dist/control-DHkZbo58.d.mts.map +1 -0
- package/dist/control-Ez_PtlFI.d.mts +121 -0
- package/dist/control-Ez_PtlFI.d.mts.map +1 -0
- package/dist/control-WTY7Jpxk.mjs +577 -0
- package/dist/control-WTY7Jpxk.mjs.map +1 -0
- package/dist/control-_4epnrIW.d.mts +27 -0
- package/dist/control-_4epnrIW.d.mts.map +1 -0
- package/dist/control-tables-CHw2F-rg.d.mts +9 -0
- package/dist/control-tables-CHw2F-rg.d.mts.map +1 -0
- package/dist/control-tables-CcQ77JE7-CxTQYoQJ.mjs +9 -0
- package/dist/control-tables-CcQ77JE7-CxTQYoQJ.mjs.map +1 -0
- package/dist/data-type-entries-B0AoBozh-f9AEUIUQ.mjs +42 -0
- package/dist/data-type-entries-B0AoBozh-f9AEUIUQ.mjs.map +1 -0
- package/dist/data-types-BpihGKoK-BMW-m4EN.d.mts +52 -0
- package/dist/data-types-BpihGKoK-BMW-m4EN.d.mts.map +1 -0
- package/dist/data-types-Dv9gwVRV-BZPzCWZk.mjs +181 -0
- package/dist/data-types-Dv9gwVRV-BZPzCWZk.mjs.map +1 -0
- package/dist/data-types-SXrh0Lou.d.mts +8 -0
- package/dist/data-types-SXrh0Lou.d.mts.map +1 -0
- package/dist/ddl-CT6DPEqg.d.mts +1 -0
- package/dist/ddl-DDmMHyA_-Bb8sXoS0.mjs +12 -0
- package/dist/ddl-DDmMHyA_-Bb8sXoS0.mjs.map +1 -0
- package/dist/default-normalizer-BBhGpw7r.d.mts +27 -0
- package/dist/default-normalizer-BBhGpw7r.d.mts.map +1 -0
- package/dist/default-normalizer-BDUgHXUn-Xk7HQJuI.mjs +90 -0
- package/dist/default-normalizer-BDUgHXUn-Xk7HQJuI.mjs.map +1 -0
- package/dist/descriptor-meta-BurjcSiU-Cbk2L1jf.mjs +82 -0
- package/dist/descriptor-meta-BurjcSiU-Cbk2L1jf.mjs.map +1 -0
- package/dist/descriptor-meta-runtime-Bk_00UrX-BLN4Ahpj.mjs +17 -0
- package/dist/descriptor-meta-runtime-Bk_00UrX-BLN4Ahpj.mjs.map +1 -0
- package/dist/driver.d.mts +3 -0
- package/dist/driver.mjs +2 -0
- package/dist/driver__control.d.mts +2 -0
- package/dist/driver__control.mjs +2 -0
- package/dist/driver__runtime.d.mts +2 -0
- package/dist/driver__runtime.mjs +325 -0
- package/dist/driver__runtime.mjs.map +1 -0
- package/dist/errors-BYhjQT7y.d.mts +10 -0
- package/dist/errors-BYhjQT7y.d.mts.map +1 -0
- package/dist/errors-rvH_F2Yj-BQrO_--u.mjs +20 -0
- package/dist/errors-rvH_F2Yj-BQrO_--u.mjs.map +1 -0
- package/dist/marker-lock-CmGvN4hw-Com29AtQ.mjs +51 -0
- package/dist/marker-lock-CmGvN4hw-Com29AtQ.mjs.map +1 -0
- package/dist/marker-lock-su6IxinO.d.mts +18 -0
- package/dist/marker-lock-su6IxinO.d.mts.map +1 -0
- package/dist/marker-read-aEaHihYj-Cyg16yn1.mjs +78 -0
- package/dist/marker-read-aEaHihYj-Cyg16yn1.mjs.map +1 -0
- package/dist/migration-DmlblTTw.d.mts +284 -0
- package/dist/migration-DmlblTTw.d.mts.map +1 -0
- package/dist/migration-tFuoN9GB.mjs +5 -0
- package/dist/mysql-contract-serializer-DLv0uW_f-Cg4A43Ry.mjs +160 -0
- package/dist/mysql-contract-serializer-DLv0uW_f-Cg4A43Ry.mjs.map +1 -0
- package/dist/nodes-CvcX47ot-B-ZaUYRj.mjs +25 -0
- package/dist/nodes-CvcX47ot-B-ZaUYRj.mjs.map +1 -0
- package/dist/nodes-xc0cR0_c-2YbhgEjb.d.mts +27 -0
- package/dist/nodes-xc0cR0_c-2YbhgEjb.d.mts.map +1 -0
- package/dist/pack-YVG-iBMQ.d.mts +1073 -0
- package/dist/pack-YVG-iBMQ.d.mts.map +1 -0
- package/dist/planner-target-details-D6g2uSp--C5NKHmCc.d.mts +12 -0
- package/dist/planner-target-details-D6g2uSp--C5NKHmCc.d.mts.map +1 -0
- package/dist/runner-C4r6yEd1-BWQrxW9q.mjs +1644 -0
- package/dist/runner-C4r6yEd1-BWQrxW9q.mjs.map +1 -0
- package/dist/runtime-BGyTXcQH.d.mts +36 -0
- package/dist/runtime-BGyTXcQH.d.mts.map +1 -0
- package/dist/runtime-CeuRr9nE.d.mts +29 -0
- package/dist/runtime-CeuRr9nE.d.mts.map +1 -0
- package/dist/runtime-Cl0BbTZq.d.mts +22 -0
- package/dist/runtime-Cl0BbTZq.d.mts.map +1 -0
- package/dist/sql-utils-BOS1c2QT.d.mts +30 -0
- package/dist/sql-utils-BOS1c2QT.d.mts.map +1 -0
- package/dist/sql-utils-Db0IQO_B-PaULnfrE.mjs +30 -0
- package/dist/sql-utils-Db0IQO_B-PaULnfrE.mjs.map +1 -0
- package/dist/sql-utils-RW0vJvDl.mjs +94 -0
- package/dist/sql-utils-RW0vJvDl.mjs.map +1 -0
- package/dist/statement-A6bbPBf1-q61iHQLb.mjs +483 -0
- package/dist/statement-A6bbPBf1-q61iHQLb.mjs.map +1 -0
- package/dist/target.d.mts +24 -0
- package/dist/target.mjs +19 -0
- package/dist/target__codec-descriptor.d.mts +3 -0
- package/dist/target__codec-descriptor.mjs +2 -0
- package/dist/target__codec-ids.d.mts +3 -0
- package/dist/target__codec-ids.mjs +3 -0
- package/dist/target__codec-types.d.mts +3 -0
- package/dist/target__codec-types.mjs +1 -0
- package/dist/target__codecs.d.mts +3 -0
- package/dist/target__codecs.mjs +2 -0
- package/dist/target__contract-free.d.mts +2 -0
- package/dist/target__contract-free.mjs +3 -0
- package/dist/target__control-tables.d.mts +2 -0
- package/dist/target__control-tables.mjs +2 -0
- package/dist/target__control.d.mts +3 -0
- package/dist/target__control.mjs +58 -0
- package/dist/target__control.mjs.map +1 -0
- package/dist/target__data-types.d.mts +3 -0
- package/dist/target__data-types.mjs +3 -0
- package/dist/target__ddl.d.mts +3 -0
- package/dist/target__ddl.mjs +2 -0
- package/dist/target__default-normalizer.d.mts +2 -0
- package/dist/target__default-normalizer.mjs +2 -0
- package/dist/target__errors.d.mts +2 -0
- package/dist/target__errors.mjs +2 -0
- package/dist/target__marker-lock.d.mts +2 -0
- package/dist/target__marker-lock.mjs +2 -0
- package/dist/target__migration.d.mts +2 -0
- package/dist/target__migration.mjs +3 -0
- package/dist/target__pack.d.mts +2 -0
- package/dist/target__pack.mjs +2 -0
- package/dist/target__runtime.d.mts +2 -0
- package/dist/target__runtime.mjs +17 -0
- package/dist/target__runtime.mjs.map +1 -0
- package/dist/target__sql-utils.d.mts +2 -0
- package/dist/target__sql-utils.mjs +3 -0
- package/package.json +71 -3
|
@@ -0,0 +1,1073 @@
|
|
|
1
|
+
import { t as CodecTypes } from "./codec-types-Bd7DL1Mr-CZWNfnp9.mjs";
|
|
2
|
+
import { DataTypeId, DataTypeValue } from "@prisma/orm-framework/components/codec";
|
|
3
|
+
import "@prisma/orm-framework/components/control";
|
|
4
|
+
import { AuthoringTypeAliasDescriptor, AuthoringTypeChoiceDescriptor, AuthoringTypeConstructorDescriptor, TaggedLiteralCanonicalization } from "@prisma/orm-framework/components/authoring";
|
|
5
|
+
import { SignatureArgumentOutput, SignatureOptionalArgument } from "@prisma/orm-framework/components/components";
|
|
6
|
+
import { Result } from "@prisma/orm-framework/utils/result";
|
|
7
|
+
import { PslSpan } from "@prisma/orm-framework/components/psl-ast";
|
|
8
|
+
import "@prisma/orm-framework/utils/types";
|
|
9
|
+
//#region ../../../3-targets/mysql/1-target/dist/pack.d.mts
|
|
10
|
+
//#region ../../../1-framework/2-authoring/psl-parser/dist/tokenizer-i8RaVWVa.d.mts
|
|
11
|
+
//#region src/tokenizer.d.ts
|
|
12
|
+
type TokenKind = 'Ident' | 'StringLiteral' | 'NumberLiteral' | 'At' | 'DoubleAt' | 'LBrace' | 'RBrace' | 'LParen' | 'RParen' | 'LBracket' | 'RBracket' | 'Equals' | 'Question' | 'Dot' | 'Comma' | 'Colon' | 'Plus' | 'Whitespace' | 'Newline' | 'Comment' | 'Invalid' | 'Eof';
|
|
13
|
+
interface Token {
|
|
14
|
+
readonly kind: TokenKind;
|
|
15
|
+
readonly text: string;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ../../../1-framework/2-authoring/psl-parser/dist/parse-djL5wker.d.mts
|
|
19
|
+
//#region src/syntax/syntax-kind.d.ts
|
|
20
|
+
type SyntaxKind = 'Document' | 'ModelDeclaration' | 'CompositeTypeDeclaration' | 'Namespace' | 'TypesBlock' | 'GenericBlockDeclaration' | 'MixinDeclaration' | 'MixinInclusion' | 'FieldDeclaration' | 'NamedTypeDeclaration' | 'KeyValuePair' | 'FieldAttribute' | 'ModelAttribute' | 'AttributeArgList' | 'AttributeArg' | 'TypeAnnotation' | 'Identifier' | 'QualifiedName' | 'FunctionCall' | 'PathExpr' | 'ArrayLiteral' | 'StringLiteralExpr' | 'TaggedLiteral' | 'NumberLiteralExpr' | 'BooleanLiteralExpr' | 'ObjectLiteralExpr' | 'ObjectField';
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/syntax/green.d.ts
|
|
23
|
+
interface GreenToken {
|
|
24
|
+
readonly type: 'token';
|
|
25
|
+
readonly kind: TokenKind;
|
|
26
|
+
readonly text: string;
|
|
27
|
+
}
|
|
28
|
+
interface GreenNode {
|
|
29
|
+
readonly type: 'node';
|
|
30
|
+
readonly kind: SyntaxKind;
|
|
31
|
+
readonly children: ReadonlyArray<GreenElement>;
|
|
32
|
+
readonly textLength: number;
|
|
33
|
+
}
|
|
34
|
+
type GreenElement = GreenNode | GreenToken;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/syntax/red.d.ts
|
|
37
|
+
/**
|
|
38
|
+
* A token in the red tree. Unlike the green-layer {@link Token} (kind + text
|
|
39
|
+
* only), a red token also carries its absolute `offset` within the source and a
|
|
40
|
+
* link back to its `parent` {@link SyntaxNode}, so a cursor anchored on a token
|
|
41
|
+
* can walk outward (parent, previous/next token, siblings) without re-scanning
|
|
42
|
+
* from the document root.
|
|
43
|
+
*/
|
|
44
|
+
declare class SyntaxToken implements Token {
|
|
45
|
+
readonly green: GreenToken;
|
|
46
|
+
readonly kind: TokenKind;
|
|
47
|
+
readonly text: string;
|
|
48
|
+
readonly offset: number;
|
|
49
|
+
readonly parent: SyntaxNode;
|
|
50
|
+
/** Position within the parent's children, enabling O(1) sibling navigation without rescanning the green layer. */
|
|
51
|
+
readonly index: number;
|
|
52
|
+
constructor(green: GreenToken, offset: number, parent: SyntaxNode, index: number);
|
|
53
|
+
get textLength(): number;
|
|
54
|
+
get endOffset(): number;
|
|
55
|
+
/** Whether `offset` falls within this token, inclusive of both ends. */
|
|
56
|
+
isInside(offset: number): boolean;
|
|
57
|
+
isOutside(offset: number): boolean;
|
|
58
|
+
/** The sibling element immediately after this token within its parent. */
|
|
59
|
+
get nextSiblingOrToken(): SyntaxElement | undefined;
|
|
60
|
+
/** The sibling element immediately before this token within its parent. */
|
|
61
|
+
get prevSiblingOrToken(): SyntaxElement | undefined;
|
|
62
|
+
/** The next token in document order, crossing node boundaries. */
|
|
63
|
+
get nextToken(): SyntaxToken | undefined;
|
|
64
|
+
/** The previous token in document order, crossing node boundaries. */
|
|
65
|
+
get prevToken(): SyntaxToken | undefined;
|
|
66
|
+
}
|
|
67
|
+
type SyntaxElement = SyntaxNode | SyntaxToken;
|
|
68
|
+
declare class TokenAtOffset {
|
|
69
|
+
#private;
|
|
70
|
+
private constructor();
|
|
71
|
+
static none(): TokenAtOffset;
|
|
72
|
+
static single(token: SyntaxToken): TokenAtOffset;
|
|
73
|
+
static between(left: SyntaxToken, right: SyntaxToken): TokenAtOffset;
|
|
74
|
+
get isEmpty(): boolean;
|
|
75
|
+
get isBetween(): boolean;
|
|
76
|
+
leftBiased(): SyntaxToken | undefined;
|
|
77
|
+
rightBiased(): SyntaxToken | undefined;
|
|
78
|
+
}
|
|
79
|
+
declare class SyntaxNode {
|
|
80
|
+
#private;
|
|
81
|
+
readonly green: GreenNode;
|
|
82
|
+
readonly offset: number;
|
|
83
|
+
readonly parent: SyntaxNode | undefined;
|
|
84
|
+
/** Position within the parent's children, enabling O(1) sibling navigation without rescanning the green layer. */
|
|
85
|
+
readonly index: number;
|
|
86
|
+
constructor(green: GreenNode, offset: number, parent: SyntaxNode | undefined, index: number);
|
|
87
|
+
childAt(index: number): SyntaxElement | undefined;
|
|
88
|
+
get kind(): SyntaxKind;
|
|
89
|
+
get textLength(): number;
|
|
90
|
+
get endOffset(): number;
|
|
91
|
+
/** Whether `offset` falls within this node, inclusive of both ends. */
|
|
92
|
+
isInside(offset: number): boolean;
|
|
93
|
+
isOutside(offset: number): boolean;
|
|
94
|
+
get firstChild(): SyntaxElement | undefined;
|
|
95
|
+
get lastChild(): SyntaxElement | undefined;
|
|
96
|
+
get nextSibling(): SyntaxElement | undefined;
|
|
97
|
+
get prevSibling(): SyntaxElement | undefined;
|
|
98
|
+
/** The sibling element immediately after this node within its parent. */
|
|
99
|
+
get nextSiblingOrToken(): SyntaxElement | undefined;
|
|
100
|
+
/** The sibling element immediately before this node within its parent. */
|
|
101
|
+
get prevSiblingOrToken(): SyntaxElement | undefined;
|
|
102
|
+
/** The first token in this subtree (depth-first), or `undefined` if empty. */
|
|
103
|
+
get firstToken(): SyntaxToken | undefined;
|
|
104
|
+
/** The last token in this subtree (depth-first), or `undefined` if empty. */
|
|
105
|
+
get lastToken(): SyntaxToken | undefined;
|
|
106
|
+
children(): Iterable<SyntaxElement>;
|
|
107
|
+
childNodes(): Iterable<SyntaxNode>;
|
|
108
|
+
root(): SyntaxNode;
|
|
109
|
+
ancestors(): Iterable<SyntaxNode>;
|
|
110
|
+
/** The nearest match, testing this node itself before walking its ancestors. */
|
|
111
|
+
findAncestor<T>(cast: (node: SyntaxNode) => T | undefined): T | undefined;
|
|
112
|
+
descendants(): Iterable<SyntaxElement>;
|
|
113
|
+
tokens(): Iterable<SyntaxToken>;
|
|
114
|
+
/**
|
|
115
|
+
* The token(s) at `offset`. The between-two-tokens case (offset exactly on a
|
|
116
|
+
* token seam) is represented explicitly so callers can left/right bias.
|
|
117
|
+
*/
|
|
118
|
+
tokenAtOffset(offset: number): TokenAtOffset;
|
|
119
|
+
/**
|
|
120
|
+
* The smallest element fully containing the range `[start, end]`. At a seam
|
|
121
|
+
* (and for empty ranges) the left-hand element is preferred, matching
|
|
122
|
+
* {@link containsOffset}'s inclusive span.
|
|
123
|
+
*/
|
|
124
|
+
coveringElement(start: number, end: number): SyntaxElement;
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/source-file.d.ts
|
|
128
|
+
interface Position {
|
|
129
|
+
readonly line: number;
|
|
130
|
+
readonly character: number;
|
|
131
|
+
}
|
|
132
|
+
interface Range {
|
|
133
|
+
readonly start: Position;
|
|
134
|
+
readonly end: Position;
|
|
135
|
+
}
|
|
136
|
+
declare class SourceFile {
|
|
137
|
+
#private;
|
|
138
|
+
constructor(filename: string, text: string);
|
|
139
|
+
get filename(): string;
|
|
140
|
+
get text(): string;
|
|
141
|
+
get length(): number;
|
|
142
|
+
get lineCount(): number;
|
|
143
|
+
lineStartOffsets(): readonly number[];
|
|
144
|
+
lineStartOffset(line: number): number;
|
|
145
|
+
lineEndOffset(line: number): number;
|
|
146
|
+
positionAt(offset: number): Position;
|
|
147
|
+
offsetAt(position: Position): number;
|
|
148
|
+
offsetToPslPosition(offset: number): PslSpan['start'];
|
|
149
|
+
rangeToPslSpan(range: Range): PslSpan;
|
|
150
|
+
pslSpanToRange(span: PslSpan): Range;
|
|
151
|
+
}
|
|
152
|
+
declare class PslSources {
|
|
153
|
+
#private;
|
|
154
|
+
constructor(entries: Iterable<readonly [SyntaxNode, SourceFile]>);
|
|
155
|
+
/**
|
|
156
|
+
* A new registry uniting this one with `others` — e.g. the per-document
|
|
157
|
+
* `PslSources` registries `parse()` returns for each member of a
|
|
158
|
+
* multi-file schema, united into the one registry `buildSymbolTable` and
|
|
159
|
+
* the interpreters expect.
|
|
160
|
+
*/
|
|
161
|
+
merge(...others: readonly PslSources[]): PslSources;
|
|
162
|
+
sourceFileNamed(filename: string): SourceFile;
|
|
163
|
+
sourceFileFor(node: SyntaxNode): SourceFile;
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/diagnostic.d.ts
|
|
167
|
+
interface PslDiagnostic {
|
|
168
|
+
readonly filename: string;
|
|
169
|
+
readonly code: string;
|
|
170
|
+
readonly message: string;
|
|
171
|
+
readonly range: Range;
|
|
172
|
+
readonly data?: Readonly<Record<string, unknown>>;
|
|
173
|
+
}
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/syntax/ast-helpers.d.ts
|
|
176
|
+
interface AstNode {
|
|
177
|
+
readonly syntax: SyntaxNode;
|
|
178
|
+
}
|
|
179
|
+
interface BracedBlock extends AstNode {
|
|
180
|
+
lbrace(): SyntaxToken | undefined;
|
|
181
|
+
rbrace(): SyntaxToken | undefined;
|
|
182
|
+
}
|
|
183
|
+
interface HasDocComment {
|
|
184
|
+
docComment(): string | undefined;
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/syntax/ast/identifier.d.ts
|
|
188
|
+
declare class IdentifierAst implements AstNode {
|
|
189
|
+
readonly syntax: SyntaxNode;
|
|
190
|
+
constructor(syntax: SyntaxNode);
|
|
191
|
+
token(): SyntaxToken | undefined;
|
|
192
|
+
name(): string | undefined;
|
|
193
|
+
static cast(node: SyntaxNode): IdentifierAst | undefined;
|
|
194
|
+
}
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/syntax/ast/qualified-name.d.ts
|
|
197
|
+
/** A namespace-qualified name, e.g. `pgvector.Vector` or `supabase:auth.User`. */
|
|
198
|
+
declare class QualifiedNameAst implements AstNode {
|
|
199
|
+
#private;
|
|
200
|
+
readonly syntax: SyntaxNode;
|
|
201
|
+
constructor(syntax: SyntaxNode);
|
|
202
|
+
colon(): SyntaxToken | undefined;
|
|
203
|
+
dot(): SyntaxToken | undefined;
|
|
204
|
+
space(): IdentifierAst | undefined;
|
|
205
|
+
namespace(): IdentifierAst | undefined;
|
|
206
|
+
identifier(): IdentifierAst | undefined;
|
|
207
|
+
segments(): Iterable<IdentifierAst>;
|
|
208
|
+
/**
|
|
209
|
+
* Every identifier segment, in source order. A bare `Vector` yields
|
|
210
|
+
* `['Vector']`; a qualified `pgvector.Vector` yields `['pgvector', 'Vector']`.
|
|
211
|
+
*/
|
|
212
|
+
path(): readonly string[];
|
|
213
|
+
/** True iff this is a single unqualified identifier whose text equals `name`. */
|
|
214
|
+
isSimpleName(name: string): boolean;
|
|
215
|
+
/**
|
|
216
|
+
* Flags a malformed name with more qualifier segments than allowed (a second
|
|
217
|
+
* `:`-space or a second `.`-namespace).
|
|
218
|
+
*/
|
|
219
|
+
isOverQualified(): boolean;
|
|
220
|
+
static cast(node: SyntaxNode): QualifiedNameAst | undefined;
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region src/syntax/ast/expressions.d.ts
|
|
224
|
+
declare class FunctionCallAst implements AstNode {
|
|
225
|
+
readonly syntax: SyntaxNode;
|
|
226
|
+
constructor(syntax: SyntaxNode);
|
|
227
|
+
/** The callee when it is a bare name, such as `now` in `now()`; `undefined` when the callee is dotted. */
|
|
228
|
+
name(): QualifiedNameAst | undefined;
|
|
229
|
+
/**
|
|
230
|
+
* The callee's segments, in source order. A bare `Vector(…)` yields
|
|
231
|
+
* `['Vector']`; `pgvector.Vector(…)` yields `['pgvector', 'Vector']`;
|
|
232
|
+
* `address.geo.lat(…)` yields `['address', 'geo', 'lat']`. Empty when the
|
|
233
|
+
* call carries no identifier.
|
|
234
|
+
*/
|
|
235
|
+
path(): readonly string[];
|
|
236
|
+
/** The callee when it is dotted, such as `address.city` in `address.city(sort: Asc)`; `undefined` for a bare callee. */
|
|
237
|
+
memberPath(): PathExprAst | undefined;
|
|
238
|
+
lparen(): SyntaxToken | undefined;
|
|
239
|
+
rparen(): SyntaxToken | undefined;
|
|
240
|
+
args(): Iterable<AttributeArgAst>;
|
|
241
|
+
static cast(node: SyntaxNode): FunctionCallAst | undefined;
|
|
242
|
+
}
|
|
243
|
+
/** A dotted member path in expression position, such as `address.city` in `@@index([address.city])`. */
|
|
244
|
+
declare class PathExprAst implements AstNode {
|
|
245
|
+
readonly syntax: SyntaxNode;
|
|
246
|
+
constructor(syntax: SyntaxNode);
|
|
247
|
+
segments(): Iterable<IdentifierAst>;
|
|
248
|
+
/**
|
|
249
|
+
* The segment names, in source order: `['address', 'city']` for `address.city`. A path that ends
|
|
250
|
+
* in a `.` with no name after it, as in `address.`, ends in an empty name.
|
|
251
|
+
*/
|
|
252
|
+
path(): readonly string[];
|
|
253
|
+
static cast(node: SyntaxNode): PathExprAst | undefined;
|
|
254
|
+
}
|
|
255
|
+
declare class ArrayLiteralAst implements AstNode {
|
|
256
|
+
readonly syntax: SyntaxNode;
|
|
257
|
+
constructor(syntax: SyntaxNode);
|
|
258
|
+
lbracket(): SyntaxToken | undefined;
|
|
259
|
+
rbracket(): SyntaxToken | undefined;
|
|
260
|
+
elements(): Iterable<ExpressionAst>;
|
|
261
|
+
static cast(node: SyntaxNode): ArrayLiteralAst | undefined;
|
|
262
|
+
}
|
|
263
|
+
type StringLiteralQuote = '"' | "'" | '`';
|
|
264
|
+
declare class StringLiteralExprAst implements AstNode {
|
|
265
|
+
readonly syntax: SyntaxNode;
|
|
266
|
+
constructor(syntax: SyntaxNode);
|
|
267
|
+
token(): SyntaxToken | undefined;
|
|
268
|
+
quote(): StringLiteralQuote | undefined;
|
|
269
|
+
/**
|
|
270
|
+
* The decoded string. A `"` or `'` string resolves the usual escapes; a backtick string resolves
|
|
271
|
+
* only `` \` `` and `\\`, keeping every other backslash sequence as written.
|
|
272
|
+
*/
|
|
273
|
+
value(): string | undefined;
|
|
274
|
+
static cast(node: SyntaxNode): StringLiteralExprAst | undefined;
|
|
275
|
+
}
|
|
276
|
+
/** `` tag`body` ``, `tag"body"`, or `tag'body'`: a qualified-name tag followed by a string literal. */
|
|
277
|
+
declare class TaggedLiteralExprAst implements AstNode {
|
|
278
|
+
readonly syntax: SyntaxNode;
|
|
279
|
+
constructor(syntax: SyntaxNode);
|
|
280
|
+
tag(): QualifiedNameAst | undefined;
|
|
281
|
+
/** The tag without trivia, e.g. `postgis.geometry`. */
|
|
282
|
+
tagName(): string;
|
|
283
|
+
literal(): StringLiteralExprAst | undefined;
|
|
284
|
+
canonicalization(): TaggedLiteralCanonicalization;
|
|
285
|
+
/** The canonical text shared with the TypeScript `sql` tag, or `undefined` when canonicalization fails. */
|
|
286
|
+
text(): string | undefined;
|
|
287
|
+
static cast(node: SyntaxNode): TaggedLiteralExprAst | undefined;
|
|
288
|
+
}
|
|
289
|
+
declare class NumberLiteralExprAst implements AstNode {
|
|
290
|
+
readonly syntax: SyntaxNode;
|
|
291
|
+
constructor(syntax: SyntaxNode);
|
|
292
|
+
token(): SyntaxToken | undefined;
|
|
293
|
+
value(): number | undefined;
|
|
294
|
+
static cast(node: SyntaxNode): NumberLiteralExprAst | undefined;
|
|
295
|
+
}
|
|
296
|
+
declare class BooleanLiteralExprAst implements AstNode {
|
|
297
|
+
readonly syntax: SyntaxNode;
|
|
298
|
+
constructor(syntax: SyntaxNode);
|
|
299
|
+
token(): SyntaxToken | undefined;
|
|
300
|
+
value(): boolean | undefined;
|
|
301
|
+
static cast(node: SyntaxNode): BooleanLiteralExprAst | undefined;
|
|
302
|
+
}
|
|
303
|
+
declare class ObjectLiteralExprAst implements AstNode {
|
|
304
|
+
readonly syntax: SyntaxNode;
|
|
305
|
+
constructor(syntax: SyntaxNode);
|
|
306
|
+
lbrace(): SyntaxToken | undefined;
|
|
307
|
+
rbrace(): SyntaxToken | undefined;
|
|
308
|
+
fields(): Iterable<ObjectFieldAst>;
|
|
309
|
+
static cast(node: SyntaxNode): ObjectLiteralExprAst | undefined;
|
|
310
|
+
}
|
|
311
|
+
declare class ObjectFieldAst implements AstNode {
|
|
312
|
+
readonly syntax: SyntaxNode;
|
|
313
|
+
constructor(syntax: SyntaxNode);
|
|
314
|
+
key(): IdentifierAst | undefined;
|
|
315
|
+
/**
|
|
316
|
+
* The field's logical key name, unquoted. An identifier key (`length:`) yields
|
|
317
|
+
* its text; a string-literal key (`"length":`) yields the decoded string.
|
|
318
|
+
* `undefined` when the field carries no key node.
|
|
319
|
+
*/
|
|
320
|
+
keyName(): string | undefined;
|
|
321
|
+
colon(): SyntaxToken | undefined;
|
|
322
|
+
value(): ExpressionAst | undefined;
|
|
323
|
+
static cast(node: SyntaxNode): ObjectFieldAst | undefined;
|
|
324
|
+
}
|
|
325
|
+
type ExpressionAst = FunctionCallAst | ArrayLiteralAst | StringLiteralExprAst | TaggedLiteralExprAst | NumberLiteralExprAst | BooleanLiteralExprAst | ObjectLiteralExprAst | PathExprAst | IdentifierAst;
|
|
326
|
+
declare class AttributeArgAst implements AstNode {
|
|
327
|
+
readonly syntax: SyntaxNode;
|
|
328
|
+
constructor(syntax: SyntaxNode);
|
|
329
|
+
name(): IdentifierAst | undefined;
|
|
330
|
+
colon(): SyntaxToken | undefined;
|
|
331
|
+
value(): ExpressionAst | undefined;
|
|
332
|
+
static cast(node: SyntaxNode): AttributeArgAst | undefined;
|
|
333
|
+
}
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region src/syntax/ast/attributes.d.ts
|
|
336
|
+
declare class AttributeArgListAst implements AstNode {
|
|
337
|
+
readonly syntax: SyntaxNode;
|
|
338
|
+
constructor(syntax: SyntaxNode);
|
|
339
|
+
lparen(): SyntaxToken | undefined;
|
|
340
|
+
rparen(): SyntaxToken | undefined;
|
|
341
|
+
args(): Iterable<AttributeArgAst>;
|
|
342
|
+
static cast(node: SyntaxNode): AttributeArgListAst | undefined;
|
|
343
|
+
}
|
|
344
|
+
declare class FieldAttributeAst implements AstNode {
|
|
345
|
+
readonly syntax: SyntaxNode;
|
|
346
|
+
constructor(syntax: SyntaxNode);
|
|
347
|
+
at(): SyntaxToken | undefined;
|
|
348
|
+
name(): QualifiedNameAst | undefined;
|
|
349
|
+
argList(): AttributeArgListAst | undefined;
|
|
350
|
+
static cast(node: SyntaxNode): FieldAttributeAst | undefined;
|
|
351
|
+
}
|
|
352
|
+
declare class ModelAttributeAst implements AstNode {
|
|
353
|
+
readonly syntax: SyntaxNode;
|
|
354
|
+
constructor(syntax: SyntaxNode);
|
|
355
|
+
doubleAt(): SyntaxToken | undefined;
|
|
356
|
+
name(): QualifiedNameAst | undefined;
|
|
357
|
+
argList(): AttributeArgListAst | undefined;
|
|
358
|
+
static cast(node: SyntaxNode): ModelAttributeAst | undefined;
|
|
359
|
+
}
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region src/syntax/ast/type-annotation.d.ts
|
|
362
|
+
declare class TypeAnnotationAst implements AstNode {
|
|
363
|
+
#private;
|
|
364
|
+
readonly syntax: SyntaxNode;
|
|
365
|
+
constructor(syntax: SyntaxNode);
|
|
366
|
+
/** The annotation's reference, doubling as the constructor callee when an {@link argList} follows. */
|
|
367
|
+
name(): QualifiedNameAst | undefined;
|
|
368
|
+
/** Present when the annotation is a constructor (`Vector(1536)`) rather than a plain reference. */
|
|
369
|
+
argList(): AttributeArgListAst | undefined;
|
|
370
|
+
isConstructor(): boolean;
|
|
371
|
+
lbracket(): SyntaxToken | undefined;
|
|
372
|
+
rbracket(): SyntaxToken | undefined;
|
|
373
|
+
questionMark(): SyntaxToken | undefined;
|
|
374
|
+
isList(): boolean;
|
|
375
|
+
/**
|
|
376
|
+
* The list/field axis: a `?` after `]` (list nullable) or, when this is not a
|
|
377
|
+
* list, the sole field-level `?`. A `?` before `[` is the element axis and
|
|
378
|
+
* does not count here.
|
|
379
|
+
*/
|
|
380
|
+
isOptional(): boolean;
|
|
381
|
+
/** The element axis: a `?` positioned before `[`, meaningful only for lists. */
|
|
382
|
+
isElementOptional(): boolean;
|
|
383
|
+
static cast(node: SyntaxNode): TypeAnnotationAst | undefined;
|
|
384
|
+
}
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region src/syntax/ast/declarations.d.ts
|
|
387
|
+
/**
|
|
388
|
+
* What may appear inside a `namespace` block: models, composite types,
|
|
389
|
+
* extension (block) declarations, and mixin declarations. `types {}` blocks
|
|
390
|
+
* and nested `namespace` blocks are document-only, so they are not namespace
|
|
391
|
+
* members.
|
|
392
|
+
*/
|
|
393
|
+
type NamespaceMemberAst = ModelDeclarationAst | CompositeTypeDeclarationAst | GenericBlockDeclarationAst | MixinDeclarationAst;
|
|
394
|
+
type BlockMemberAst = FieldDeclarationAst | ModelAttributeAst | MixinInclusionAst;
|
|
395
|
+
type GenericBlockMemberAst = KeyValuePairAst | ModelAttributeAst | MixinInclusionAst;
|
|
396
|
+
declare class ModelDeclarationAst implements BracedBlock, HasDocComment {
|
|
397
|
+
readonly syntax: SyntaxNode;
|
|
398
|
+
constructor(syntax: SyntaxNode);
|
|
399
|
+
keyword(): SyntaxToken | undefined;
|
|
400
|
+
name(): IdentifierAst | undefined;
|
|
401
|
+
lbrace(): SyntaxToken | undefined;
|
|
402
|
+
rbrace(): SyntaxToken | undefined;
|
|
403
|
+
fields(): Iterable<FieldDeclarationAst>;
|
|
404
|
+
attributes(): Iterable<ModelAttributeAst>;
|
|
405
|
+
inclusions(): Iterable<MixinInclusionAst>;
|
|
406
|
+
members(): Iterable<BlockMemberAst>;
|
|
407
|
+
docComment(): string | undefined;
|
|
408
|
+
static cast(node: SyntaxNode): ModelDeclarationAst | undefined;
|
|
409
|
+
}
|
|
410
|
+
declare class CompositeTypeDeclarationAst implements BracedBlock, HasDocComment {
|
|
411
|
+
readonly syntax: SyntaxNode;
|
|
412
|
+
constructor(syntax: SyntaxNode);
|
|
413
|
+
keyword(): SyntaxToken | undefined;
|
|
414
|
+
name(): IdentifierAst | undefined;
|
|
415
|
+
lbrace(): SyntaxToken | undefined;
|
|
416
|
+
rbrace(): SyntaxToken | undefined;
|
|
417
|
+
fields(): Iterable<FieldDeclarationAst>;
|
|
418
|
+
attributes(): Iterable<ModelAttributeAst>;
|
|
419
|
+
inclusions(): Iterable<MixinInclusionAst>;
|
|
420
|
+
members(): Iterable<BlockMemberAst>;
|
|
421
|
+
docComment(): string | undefined;
|
|
422
|
+
static cast(node: SyntaxNode): CompositeTypeDeclarationAst | undefined;
|
|
423
|
+
}
|
|
424
|
+
declare class NamespaceDeclarationAst implements BracedBlock {
|
|
425
|
+
readonly syntax: SyntaxNode;
|
|
426
|
+
constructor(syntax: SyntaxNode);
|
|
427
|
+
keyword(): SyntaxToken | undefined;
|
|
428
|
+
name(): IdentifierAst | undefined;
|
|
429
|
+
lbrace(): SyntaxToken | undefined;
|
|
430
|
+
rbrace(): SyntaxToken | undefined;
|
|
431
|
+
declarations(): Iterable<NamespaceMemberAst>;
|
|
432
|
+
static cast(node: SyntaxNode): NamespaceDeclarationAst | undefined;
|
|
433
|
+
}
|
|
434
|
+
declare class GenericBlockDeclarationAst implements BracedBlock, HasDocComment {
|
|
435
|
+
readonly syntax: SyntaxNode;
|
|
436
|
+
constructor(syntax: SyntaxNode);
|
|
437
|
+
keyword(): SyntaxToken | undefined;
|
|
438
|
+
name(): IdentifierAst | undefined;
|
|
439
|
+
lbrace(): SyntaxToken | undefined;
|
|
440
|
+
rbrace(): SyntaxToken | undefined;
|
|
441
|
+
entries(): Iterable<KeyValuePairAst>;
|
|
442
|
+
/** Field lines of a `view` body. Empty for every other generic block. */
|
|
443
|
+
fields(): Iterable<FieldDeclarationAst>;
|
|
444
|
+
attributes(): Iterable<ModelAttributeAst>;
|
|
445
|
+
inclusions(): Iterable<MixinInclusionAst>;
|
|
446
|
+
members(): Iterable<GenericBlockMemberAst>;
|
|
447
|
+
docComment(): string | undefined;
|
|
448
|
+
static cast(node: SyntaxNode): GenericBlockDeclarationAst | undefined;
|
|
449
|
+
}
|
|
450
|
+
declare class MixinDeclarationAst implements BracedBlock, HasDocComment {
|
|
451
|
+
readonly syntax: SyntaxNode;
|
|
452
|
+
constructor(syntax: SyntaxNode);
|
|
453
|
+
keyword(): SyntaxToken | undefined;
|
|
454
|
+
mixinKeyword(): SyntaxToken | undefined;
|
|
455
|
+
name(): IdentifierAst | undefined;
|
|
456
|
+
lbrace(): SyntaxToken | undefined;
|
|
457
|
+
rbrace(): SyntaxToken | undefined;
|
|
458
|
+
fields(): Iterable<FieldDeclarationAst>;
|
|
459
|
+
entries(): Iterable<KeyValuePairAst>;
|
|
460
|
+
attributes(): Iterable<ModelAttributeAst>;
|
|
461
|
+
/** A mixin cannot include a mixin, but the parser still reads an inclusion written in a mixin body, so that it can be reported as an error at that inclusion. */
|
|
462
|
+
inclusions(): Iterable<MixinInclusionAst>;
|
|
463
|
+
members(): Iterable<BlockMemberAst | GenericBlockMemberAst>;
|
|
464
|
+
docComment(): string | undefined;
|
|
465
|
+
static cast(node: SyntaxNode): MixinDeclarationAst | undefined;
|
|
466
|
+
}
|
|
467
|
+
declare class MixinInclusionAst implements AstNode {
|
|
468
|
+
readonly syntax: SyntaxNode;
|
|
469
|
+
constructor(syntax: SyntaxNode);
|
|
470
|
+
plus(): SyntaxToken | undefined;
|
|
471
|
+
name(): QualifiedNameAst | undefined;
|
|
472
|
+
static cast(node: SyntaxNode): MixinInclusionAst | undefined;
|
|
473
|
+
}
|
|
474
|
+
declare class KeyValuePairAst implements AstNode {
|
|
475
|
+
readonly syntax: SyntaxNode;
|
|
476
|
+
constructor(syntax: SyntaxNode);
|
|
477
|
+
key(): IdentifierAst | undefined;
|
|
478
|
+
equals(): SyntaxToken | undefined;
|
|
479
|
+
value(): ExpressionAst | undefined;
|
|
480
|
+
/** `@` attributes after the key or value, as in `USER @map("user")`. */
|
|
481
|
+
attributes(): Iterable<FieldAttributeAst>;
|
|
482
|
+
static cast(node: SyntaxNode): KeyValuePairAst | undefined;
|
|
483
|
+
}
|
|
484
|
+
declare class FieldDeclarationAst implements AstNode, HasDocComment {
|
|
485
|
+
readonly syntax: SyntaxNode;
|
|
486
|
+
constructor(syntax: SyntaxNode);
|
|
487
|
+
name(): IdentifierAst | undefined;
|
|
488
|
+
typeAnnotation(): TypeAnnotationAst | undefined;
|
|
489
|
+
attributes(): Iterable<FieldAttributeAst>;
|
|
490
|
+
docComment(): string | undefined;
|
|
491
|
+
static cast(node: SyntaxNode): FieldDeclarationAst | undefined;
|
|
492
|
+
}
|
|
493
|
+
declare class NamedTypeDeclarationAst implements AstNode, HasDocComment {
|
|
494
|
+
readonly syntax: SyntaxNode;
|
|
495
|
+
constructor(syntax: SyntaxNode);
|
|
496
|
+
name(): IdentifierAst | undefined;
|
|
497
|
+
equals(): SyntaxToken | undefined;
|
|
498
|
+
typeAnnotation(): TypeAnnotationAst | undefined;
|
|
499
|
+
attributes(): Iterable<FieldAttributeAst>;
|
|
500
|
+
docComment(): string | undefined;
|
|
501
|
+
static cast(node: SyntaxNode): NamedTypeDeclarationAst | undefined;
|
|
502
|
+
}
|
|
503
|
+
//#endregion
|
|
504
|
+
//#region ../../../1-framework/2-authoring/psl-parser/dist/binder-CMy3WM5A.d.mts
|
|
505
|
+
//#region src/resolve.d.ts
|
|
506
|
+
interface ResolvedAttributeArg {
|
|
507
|
+
readonly kind: 'positional' | 'named';
|
|
508
|
+
readonly name?: string;
|
|
509
|
+
readonly value: string;
|
|
510
|
+
readonly expression?: ExpressionAst;
|
|
511
|
+
readonly span: PslSpan;
|
|
512
|
+
/** The argument as the schema writes it; absent for an argument a reader builds. */
|
|
513
|
+
readonly node?: AttributeArgAst;
|
|
514
|
+
}
|
|
515
|
+
interface ResolvedAttribute<TNode extends FieldAttributeAst | ModelAttributeAst = FieldAttributeAst | ModelAttributeAst> {
|
|
516
|
+
readonly name: string;
|
|
517
|
+
readonly args: readonly ResolvedAttributeArg[];
|
|
518
|
+
readonly span: PslSpan;
|
|
519
|
+
readonly node: TNode;
|
|
520
|
+
}
|
|
521
|
+
interface ResolvedTypeConstructorCall {
|
|
522
|
+
readonly path: readonly string[];
|
|
523
|
+
readonly args: readonly ResolvedAttributeArg[];
|
|
524
|
+
readonly span: PslSpan;
|
|
525
|
+
}
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region src/symbol-table.d.ts
|
|
528
|
+
interface SymbolTable {
|
|
529
|
+
readonly defaultNamespace: NamespaceSymbol;
|
|
530
|
+
readonly namespaces: Record<string, NamespaceSymbol>;
|
|
531
|
+
readonly namedTypes: Record<string, NamedTypeSymbol>;
|
|
532
|
+
}
|
|
533
|
+
interface NamespaceDeclaration {
|
|
534
|
+
readonly node: NamespaceDeclarationAst;
|
|
535
|
+
readonly span: PslSpan;
|
|
536
|
+
}
|
|
537
|
+
interface NamespaceSymbol {
|
|
538
|
+
readonly kind: 'namespace';
|
|
539
|
+
readonly id: string;
|
|
540
|
+
readonly name: string;
|
|
541
|
+
readonly declarations: readonly NamespaceDeclaration[];
|
|
542
|
+
readonly models: Record<string, ModelSymbol>;
|
|
543
|
+
readonly compositeTypes: Record<string, CompositeTypeSymbol>;
|
|
544
|
+
readonly blocks: Record<string, BlockSymbol>;
|
|
545
|
+
readonly mixins: Record<string, MixinSymbol>;
|
|
546
|
+
}
|
|
547
|
+
interface ModelSymbol {
|
|
548
|
+
readonly kind: 'model';
|
|
549
|
+
readonly name: string;
|
|
550
|
+
readonly node: ModelDeclarationAst;
|
|
551
|
+
readonly span: PslSpan;
|
|
552
|
+
fields: Record<string, FieldSymbol>;
|
|
553
|
+
attributes: readonly ResolvedAttribute<ModelAttributeAst>[];
|
|
554
|
+
}
|
|
555
|
+
interface CompositeTypeSymbol {
|
|
556
|
+
readonly kind: 'compositeType';
|
|
557
|
+
readonly name: string;
|
|
558
|
+
readonly node: CompositeTypeDeclarationAst;
|
|
559
|
+
readonly span: PslSpan;
|
|
560
|
+
fields: Record<string, FieldSymbol>;
|
|
561
|
+
attributes: readonly ResolvedAttribute<ModelAttributeAst>[];
|
|
562
|
+
}
|
|
563
|
+
interface BlockSymbol {
|
|
564
|
+
readonly kind: 'block';
|
|
565
|
+
readonly name: string;
|
|
566
|
+
readonly keyword: string;
|
|
567
|
+
readonly node: GenericBlockDeclarationAst;
|
|
568
|
+
readonly span: PslSpan;
|
|
569
|
+
entries: readonly KeyValuePairAst[];
|
|
570
|
+
attributes: readonly ResolvedAttribute<ModelAttributeAst>[];
|
|
571
|
+
}
|
|
572
|
+
interface MixinSymbol {
|
|
573
|
+
readonly kind: 'mixin';
|
|
574
|
+
readonly name: string;
|
|
575
|
+
readonly keyword: string;
|
|
576
|
+
readonly node: MixinDeclarationAst;
|
|
577
|
+
readonly span: PslSpan;
|
|
578
|
+
readonly fields: Record<string, FieldSymbol>;
|
|
579
|
+
readonly entries: readonly KeyValuePairAst[];
|
|
580
|
+
readonly attributes: readonly ResolvedAttribute<ModelAttributeAst>[];
|
|
581
|
+
}
|
|
582
|
+
interface ResolvedNamedTypeBinding {
|
|
583
|
+
readonly baseType?: string;
|
|
584
|
+
readonly typeConstructor?: ResolvedTypeConstructorCall;
|
|
585
|
+
readonly isConstructor: boolean;
|
|
586
|
+
readonly attributes: readonly ResolvedAttribute<FieldAttributeAst>[];
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* A `types {}` binding, collected without classification: whether the binding
|
|
590
|
+
* refines a target scalar is pronounced by the interpreter
|
|
591
|
+
* (`resolveNamedTypeDeclarations`), not by the family-blind symbol table.
|
|
592
|
+
*/
|
|
593
|
+
interface NamedTypeSymbol extends ResolvedNamedTypeBinding {
|
|
594
|
+
readonly kind: 'namedType';
|
|
595
|
+
readonly name: string;
|
|
596
|
+
readonly node: NamedTypeDeclarationAst;
|
|
597
|
+
readonly span: PslSpan;
|
|
598
|
+
}
|
|
599
|
+
interface FieldSymbol {
|
|
600
|
+
readonly kind: 'field';
|
|
601
|
+
readonly name: string;
|
|
602
|
+
readonly node: FieldDeclarationAst;
|
|
603
|
+
readonly span: PslSpan;
|
|
604
|
+
readonly typeName: string;
|
|
605
|
+
readonly typeNamespaceId?: string;
|
|
606
|
+
readonly typeContractSpaceId?: string;
|
|
607
|
+
readonly optional: boolean;
|
|
608
|
+
readonly list: boolean;
|
|
609
|
+
/** Element-nullability axis (`Foo?[]`); meaningful only when {@link list}. */
|
|
610
|
+
readonly elementOptional: boolean;
|
|
611
|
+
readonly typeConstructor?: ResolvedTypeConstructorCall;
|
|
612
|
+
readonly attributes: readonly ResolvedAttribute<FieldAttributeAst>[];
|
|
613
|
+
/** Prevents cascading unsupported-type diagnostics after invalid qualification. */
|
|
614
|
+
readonly malformedType?: boolean;
|
|
615
|
+
}
|
|
616
|
+
//#endregion
|
|
617
|
+
//#region src/entity-reference.d.ts
|
|
618
|
+
type EntitySelector = {
|
|
619
|
+
readonly kind: 'model';
|
|
620
|
+
} | {
|
|
621
|
+
readonly kind: 'compositeType';
|
|
622
|
+
} | {
|
|
623
|
+
readonly kind: 'namedType';
|
|
624
|
+
} | {
|
|
625
|
+
readonly kind: 'block';
|
|
626
|
+
readonly keyword: string;
|
|
627
|
+
};
|
|
628
|
+
type EntityDeclaration = ModelSymbol | CompositeTypeSymbol | NamedTypeSymbol | BlockSymbol;
|
|
629
|
+
type NamespaceOfDeclaration<D extends EntityDeclaration> = D extends NamedTypeSymbol ? undefined : NamespaceSymbol;
|
|
630
|
+
interface ResolvedEntityReference<D extends EntityDeclaration = EntityDeclaration> {
|
|
631
|
+
readonly declaration: D;
|
|
632
|
+
readonly namespace: NamespaceOfDeclaration<D>;
|
|
633
|
+
}
|
|
634
|
+
//#endregion
|
|
635
|
+
//#region src/attribute-spec/types.d.ts
|
|
636
|
+
type AttributeLevel = 'field' | 'model' | 'block';
|
|
637
|
+
interface AttributeCtx {
|
|
638
|
+
readonly sources: PslSources;
|
|
639
|
+
readonly symbols: SymbolTable;
|
|
640
|
+
readonly binder: Binder;
|
|
641
|
+
}
|
|
642
|
+
interface ModelAttributeCtx extends AttributeCtx {
|
|
643
|
+
readonly selfModel: ModelSymbol;
|
|
644
|
+
}
|
|
645
|
+
interface BlockAttributeCtx extends AttributeCtx {
|
|
646
|
+
readonly selfBlock: BlockSymbol;
|
|
647
|
+
}
|
|
648
|
+
interface FieldAttributeCtx extends ModelAttributeCtx {
|
|
649
|
+
readonly field: FieldSymbol;
|
|
650
|
+
}
|
|
651
|
+
interface ArgTypeOutput<T, Ctx extends AttributeCtx> extends SignatureArgumentOutput<T> {
|
|
652
|
+
readonly label: string;
|
|
653
|
+
/** True when the argument has this type's shape, so that its diagnostics are about the argument. `oneOf` returns the result of the one alternative that claims the argument. */
|
|
654
|
+
readonly claims?: (arg: ExpressionAst) => boolean;
|
|
655
|
+
readonly parse: (arg: ExpressionAst, ctx: Ctx) => Result<T, readonly PslDiagnostic[]>;
|
|
656
|
+
}
|
|
657
|
+
interface BoolArgType<Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<boolean, Ctx> {
|
|
658
|
+
readonly kind: 'bool';
|
|
659
|
+
}
|
|
660
|
+
interface EntityRefArgType<D extends EntityDeclaration = EntityDeclaration, Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<ResolvedEntityReference<D>, Ctx> {
|
|
661
|
+
readonly kind: 'entityRef';
|
|
662
|
+
readonly expected: EntitySelector;
|
|
663
|
+
}
|
|
664
|
+
interface FieldRefArgType<Ctx extends ModelAttributeCtx = ModelAttributeCtx> extends ArgTypeOutput<string, Ctx> {
|
|
665
|
+
readonly kind: 'fieldRef';
|
|
666
|
+
}
|
|
667
|
+
interface ReferencedFieldRefArgType<Ctx extends FieldAttributeCtx = FieldAttributeCtx> extends ArgTypeOutput<string, Ctx> {
|
|
668
|
+
readonly kind: 'referencedFieldRef';
|
|
669
|
+
}
|
|
670
|
+
interface FuncCallSig<Ctx extends AttributeCtx = AttributeCtx> {
|
|
671
|
+
readonly documentation: string;
|
|
672
|
+
readonly positional?: readonly PositionalParam<unknown, Ctx>[];
|
|
673
|
+
readonly named?: Readonly<Record<string, Param<unknown, Ctx>>>;
|
|
674
|
+
}
|
|
675
|
+
interface TypedFuncCall {
|
|
676
|
+
readonly fn: string;
|
|
677
|
+
readonly span: PslSpan;
|
|
678
|
+
readonly args: Readonly<Record<string, unknown>>;
|
|
679
|
+
}
|
|
680
|
+
interface FuncCallArgType<Name extends string = string, Ctx extends AttributeCtx = AttributeCtx, Signature extends FuncCallSig<never> = FuncCallSig<Ctx>> extends ArgTypeOutput<TypedFuncCall, Ctx> {
|
|
681
|
+
readonly kind: 'funcCall';
|
|
682
|
+
readonly name: Name;
|
|
683
|
+
readonly signature: Signature;
|
|
684
|
+
readonly claims: (arg: ExpressionAst) => boolean;
|
|
685
|
+
}
|
|
686
|
+
interface FixedIdentifierArgType<Name extends string = string, Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<Name, Ctx> {
|
|
687
|
+
readonly kind: 'identifier';
|
|
688
|
+
readonly name: Name;
|
|
689
|
+
readonly documentation: string;
|
|
690
|
+
}
|
|
691
|
+
interface UnrestrictedIdentifierArgType<Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<string, Ctx> {
|
|
692
|
+
readonly kind: 'identifier';
|
|
693
|
+
readonly name: undefined;
|
|
694
|
+
}
|
|
695
|
+
type IdentifierArgType<Name extends string = string, Ctx extends AttributeCtx = AttributeCtx> = FixedIdentifierArgType<Name, Ctx> | UnrestrictedIdentifierArgType<Ctx>;
|
|
696
|
+
interface IntArgType<Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<number, Ctx> {
|
|
697
|
+
readonly kind: 'int';
|
|
698
|
+
readonly min?: number;
|
|
699
|
+
readonly max?: number;
|
|
700
|
+
}
|
|
701
|
+
interface JsonArgType<Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<Record<string, unknown>, Ctx> {
|
|
702
|
+
readonly kind: 'json';
|
|
703
|
+
}
|
|
704
|
+
interface NullArgType<Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<null, Ctx> {
|
|
705
|
+
readonly kind: 'null';
|
|
706
|
+
}
|
|
707
|
+
interface ListArgType<T = unknown, Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<T[], Ctx> {
|
|
708
|
+
readonly kind: 'list';
|
|
709
|
+
readonly of: ArgType<T, Ctx>;
|
|
710
|
+
readonly allowEmpty: boolean;
|
|
711
|
+
readonly unique: boolean;
|
|
712
|
+
}
|
|
713
|
+
interface UnrestrictedNumArgType<Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<number, Ctx> {
|
|
714
|
+
readonly kind: 'num';
|
|
715
|
+
readonly value: undefined;
|
|
716
|
+
}
|
|
717
|
+
interface FixedNumArgType<T extends number = number, Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<T, Ctx> {
|
|
718
|
+
readonly kind: 'num';
|
|
719
|
+
readonly value: T;
|
|
720
|
+
}
|
|
721
|
+
interface NumLiteral {
|
|
722
|
+
readonly text: string;
|
|
723
|
+
}
|
|
724
|
+
interface NumLiteralArgType<Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<NumLiteral, Ctx> {
|
|
725
|
+
readonly kind: 'num';
|
|
726
|
+
readonly value: undefined;
|
|
727
|
+
}
|
|
728
|
+
interface OneOfMetadata {
|
|
729
|
+
readonly kind: 'oneOf';
|
|
730
|
+
/** Whether the label reads as a union: several labels joined by ` | `. False for a union that names itself, as `JSON value` does. */
|
|
731
|
+
readonly labelIsUnion: boolean;
|
|
732
|
+
readonly alternatives: readonly [AnyArgType, ...AnyArgType[]];
|
|
733
|
+
}
|
|
734
|
+
interface RecordArgType<T = unknown, Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<Record<string, T>, Ctx> {
|
|
735
|
+
readonly kind: 'record';
|
|
736
|
+
readonly of: ArgType<T, Ctx>;
|
|
737
|
+
}
|
|
738
|
+
interface RejectingArgType<T = never, Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<T, Ctx> {
|
|
739
|
+
readonly kind: 'rejecting';
|
|
740
|
+
readonly message: string;
|
|
741
|
+
}
|
|
742
|
+
interface UnrestrictedStrArgType<Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<string, Ctx> {
|
|
743
|
+
readonly kind: 'str';
|
|
744
|
+
readonly value: undefined;
|
|
745
|
+
}
|
|
746
|
+
interface FixedStrArgType<T extends string = string, Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<T, Ctx> {
|
|
747
|
+
readonly kind: 'str';
|
|
748
|
+
readonly value: T;
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* A tagged literal argument as parsed: its tag, the canonicalization of its string literal, and its
|
|
752
|
+
* span. Neither the tag nor the canonicalization has been checked; the consumer checks both.
|
|
753
|
+
*/
|
|
754
|
+
interface ParsedTaggedLiteral {
|
|
755
|
+
readonly tag: string;
|
|
756
|
+
readonly canonicalization: TaggedLiteralCanonicalization;
|
|
757
|
+
readonly span: PslSpan;
|
|
758
|
+
}
|
|
759
|
+
interface TaggedLiteralArgType<Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<ParsedTaggedLiteral, Ctx> {
|
|
760
|
+
readonly kind: 'taggedLiteral';
|
|
761
|
+
readonly tags: readonly string[];
|
|
762
|
+
readonly documentation: string;
|
|
763
|
+
}
|
|
764
|
+
/** A value of a data type parsed from an argument, with the argument's span. */
|
|
765
|
+
interface ParsedTypedValue {
|
|
766
|
+
readonly value: DataTypeValue;
|
|
767
|
+
readonly span: PslSpan;
|
|
768
|
+
}
|
|
769
|
+
interface DataTypeValueArgType<Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<ParsedTypedValue, Ctx> {
|
|
770
|
+
readonly kind: 'dataTypeValue';
|
|
771
|
+
readonly dataType: DataTypeId;
|
|
772
|
+
/** The tags a position of this type admits, for completion. */
|
|
773
|
+
readonly tags: readonly string[];
|
|
774
|
+
/** The documentation of this type's authoring entry, or '' when it has none. */
|
|
775
|
+
readonly documentation: string;
|
|
776
|
+
/** Written values offered for completion besides the tags, such as the versions a function takes. */
|
|
777
|
+
readonly suggestions: readonly string[];
|
|
778
|
+
/** Whether the label reads as a union: several suggestions joined by ` | `. */
|
|
779
|
+
readonly labelIsUnion: boolean;
|
|
780
|
+
}
|
|
781
|
+
type ArgTypeMetadata<Type> = Type extends object ? Omit<Type, keyof ArgTypeOutput<unknown, never>> : never;
|
|
782
|
+
type ArgType<T, Ctx extends AttributeCtx> = ArgTypeOutput<T, Ctx> & ArgTypeMetadata<ArgTypeVariant<Ctx>>;
|
|
783
|
+
type AnyArgType = ArgType<unknown, AttributeCtx> | ArgType<unknown, ModelAttributeCtx> | ArgType<unknown, FieldAttributeCtx>;
|
|
784
|
+
type ArgTypeVariant<Ctx extends AttributeCtx> = BoolArgType<Ctx> | DataTypeValueArgType<Ctx> | EntityRefArgType<EntityDeclaration, Ctx> | FieldRefArgType<ModelAttributeCtx & Ctx> | FuncCallArgType<string, Ctx> | IdentifierArgType<string, Ctx> | IntArgType<Ctx> | JsonArgType<Ctx> | NullArgType<Ctx> | ListArgType<unknown, Ctx> | FixedNumArgType<number, Ctx> | UnrestrictedNumArgType<Ctx> | NumLiteralArgType<Ctx> | OneOfMetadata | RecordArgType<unknown, Ctx> | ReferencedFieldRefArgType<FieldAttributeCtx & Ctx> | RejectingArgType<never, Ctx> | FixedStrArgType<string, Ctx> | UnrestrictedStrArgType<Ctx> | TaggedLiteralArgType<Ctx>;
|
|
785
|
+
type OptionalArgType<T, Ctx extends AttributeCtx, Type extends object = ArgType<T, Ctx>, HasDefault extends boolean = boolean> = Type & OptionalArgumentMarks<T, HasDefault>;
|
|
786
|
+
/** What `optional(...)` adds to an argument type: the shared optional mark `gen` reads, and its default. */
|
|
787
|
+
interface OptionalArgumentMarks<T, HasDefault extends boolean> extends SignatureOptionalArgument {
|
|
788
|
+
readonly hasDefault: HasDefault;
|
|
789
|
+
readonly defaultValue?: T | undefined;
|
|
790
|
+
}
|
|
791
|
+
interface Param<T, Ctx extends AttributeCtx> {
|
|
792
|
+
readonly type: ArgType<T, Ctx>;
|
|
793
|
+
readonly documentation: string;
|
|
794
|
+
}
|
|
795
|
+
interface PositionalParam<T, Ctx extends AttributeCtx> extends Param<T, Ctx> {
|
|
796
|
+
readonly key: string;
|
|
797
|
+
}
|
|
798
|
+
interface AttributeSpec<Out, Ctx extends AttributeCtx> {
|
|
799
|
+
readonly documentation: string;
|
|
800
|
+
readonly level: AttributeLevel;
|
|
801
|
+
readonly name: string;
|
|
802
|
+
readonly positional: readonly PositionalParam<unknown, Ctx>[];
|
|
803
|
+
readonly named: Readonly<Record<string, Param<unknown, Ctx>>>;
|
|
804
|
+
/**
|
|
805
|
+
* Cross-argument validation after all arguments parse. `attributeNode` is
|
|
806
|
+
* the attribute's own AST node so refines can span-anchor their
|
|
807
|
+
* diagnostics at the attribute rather than the enclosing model.
|
|
808
|
+
*/
|
|
809
|
+
readonly refine?: (parsed: Out, ctx: Ctx, attributeNode: AstNode) => readonly PslDiagnostic[];
|
|
810
|
+
}
|
|
811
|
+
//#endregion
|
|
812
|
+
//#region src/contributed-type-scope.d.ts
|
|
813
|
+
type ContributedTypeDescriptor = AuthoringTypeConstructorDescriptor | AuthoringTypeAliasDescriptor | AuthoringTypeChoiceDescriptor;
|
|
814
|
+
interface ContributedTypeSymbolBase {
|
|
815
|
+
readonly kind: 'contributedType';
|
|
816
|
+
readonly name: string;
|
|
817
|
+
readonly path: readonly string[];
|
|
818
|
+
}
|
|
819
|
+
/** A contributed type choice, with the type constructors its rows name, by name, from the namespace that holds it. */
|
|
820
|
+
interface ContributedTypeChoiceSymbol extends ContributedTypeSymbolBase {
|
|
821
|
+
readonly descriptor: AuthoringTypeChoiceDescriptor;
|
|
822
|
+
readonly choiceTypes: ReadonlyMap<string, AuthoringTypeConstructorDescriptor>;
|
|
823
|
+
}
|
|
824
|
+
type ContributedTypeSymbol = (ContributedTypeSymbolBase & {
|
|
825
|
+
readonly descriptor: Exclude<ContributedTypeDescriptor, AuthoringTypeChoiceDescriptor>;
|
|
826
|
+
}) | ContributedTypeChoiceSymbol;
|
|
827
|
+
interface ContributedNamespaceSymbol {
|
|
828
|
+
readonly kind: 'contributedNamespace';
|
|
829
|
+
readonly name: string;
|
|
830
|
+
readonly path: readonly string[];
|
|
831
|
+
readonly members: ReadonlyMap<string, ContributedMember>;
|
|
832
|
+
}
|
|
833
|
+
type ContributedMember = ContributedTypeSymbol | ContributedNamespaceSymbol;
|
|
834
|
+
//#endregion
|
|
835
|
+
//#region src/scope.d.ts
|
|
836
|
+
type ScopeResolution = {
|
|
837
|
+
readonly kind: 'model';
|
|
838
|
+
readonly symbol: ModelSymbol;
|
|
839
|
+
readonly namespace: NamespaceSymbol;
|
|
840
|
+
} | {
|
|
841
|
+
readonly kind: 'compositeType';
|
|
842
|
+
readonly symbol: CompositeTypeSymbol;
|
|
843
|
+
readonly namespace: NamespaceSymbol;
|
|
844
|
+
} | {
|
|
845
|
+
readonly kind: 'namedType';
|
|
846
|
+
readonly symbol: NamedTypeSymbol;
|
|
847
|
+
readonly namespace?: NamespaceSymbol;
|
|
848
|
+
} | {
|
|
849
|
+
readonly kind: 'block';
|
|
850
|
+
readonly symbol: BlockSymbol;
|
|
851
|
+
readonly namespace: NamespaceSymbol;
|
|
852
|
+
} | {
|
|
853
|
+
readonly kind: 'mixin';
|
|
854
|
+
readonly symbol: MixinSymbol;
|
|
855
|
+
readonly namespace?: NamespaceSymbol;
|
|
856
|
+
} | {
|
|
857
|
+
readonly kind: 'namespace';
|
|
858
|
+
readonly symbol: NamespaceSymbol;
|
|
859
|
+
} | {
|
|
860
|
+
readonly kind: 'contributedNamespace';
|
|
861
|
+
readonly symbol: ContributedNamespaceSymbol;
|
|
862
|
+
} | {
|
|
863
|
+
readonly kind: 'contributedType';
|
|
864
|
+
readonly symbol: ContributedTypeSymbol;
|
|
865
|
+
};
|
|
866
|
+
declare abstract class Scope {
|
|
867
|
+
protected readonly parent: Scope | undefined;
|
|
868
|
+
constructor(parent: Scope | undefined);
|
|
869
|
+
abstract lookup(name: string): ScopeResolution | undefined;
|
|
870
|
+
protected abstract ownNames(): Iterable<string>;
|
|
871
|
+
entries(): Iterable<readonly [string, ScopeResolution]>;
|
|
872
|
+
}
|
|
873
|
+
type BoundSpec = AttributeSpec<never, ModelAttributeCtx> | AttributeSpec<never, FieldAttributeCtx> | AttributeSpec<never, BlockAttributeCtx>;
|
|
874
|
+
interface AttributeSymbol {
|
|
875
|
+
readonly kind: 'attribute';
|
|
876
|
+
readonly name: string;
|
|
877
|
+
readonly level: 'model' | 'field' | 'block';
|
|
878
|
+
readonly spec: BoundSpec;
|
|
879
|
+
}
|
|
880
|
+
interface ParameterSymbol {
|
|
881
|
+
readonly kind: 'parameter';
|
|
882
|
+
readonly name: string;
|
|
883
|
+
readonly param: Param<unknown, never>;
|
|
884
|
+
}
|
|
885
|
+
interface FunctionSymbol {
|
|
886
|
+
readonly kind: 'function';
|
|
887
|
+
readonly name: string;
|
|
888
|
+
readonly signature: FuncCallSig<never>;
|
|
889
|
+
}
|
|
890
|
+
interface ConstantSymbol {
|
|
891
|
+
readonly kind: 'constant';
|
|
892
|
+
readonly name: string;
|
|
893
|
+
readonly documentation: string;
|
|
894
|
+
}
|
|
895
|
+
type PslSymbol = ModelSymbol | CompositeTypeSymbol | NamedTypeSymbol | BlockSymbol | NamespaceSymbol | MixinSymbol | FieldSymbol;
|
|
896
|
+
type Resolution = ScopeResolution | {
|
|
897
|
+
readonly kind: 'field';
|
|
898
|
+
readonly symbol: FieldSymbol;
|
|
899
|
+
} | {
|
|
900
|
+
readonly kind: 'attribute';
|
|
901
|
+
readonly symbol: AttributeSymbol;
|
|
902
|
+
} | {
|
|
903
|
+
readonly kind: 'parameter';
|
|
904
|
+
readonly symbol: ParameterSymbol;
|
|
905
|
+
} | {
|
|
906
|
+
readonly kind: 'function';
|
|
907
|
+
readonly symbol: FunctionSymbol;
|
|
908
|
+
} | {
|
|
909
|
+
readonly kind: 'constant';
|
|
910
|
+
readonly symbol: ConstantSymbol;
|
|
911
|
+
} | {
|
|
912
|
+
readonly kind: 'crossSpace';
|
|
913
|
+
} | {
|
|
914
|
+
readonly kind: 'unresolved';
|
|
915
|
+
readonly name: string;
|
|
916
|
+
};
|
|
917
|
+
interface Binder {
|
|
918
|
+
declaredSymbol(node: SyntaxNode): PslSymbol | undefined;
|
|
919
|
+
symbolForNode(node: SyntaxNode): Resolution | undefined;
|
|
920
|
+
scopeAt(node: SyntaxNode): Scope;
|
|
921
|
+
}
|
|
922
|
+
//#endregion
|
|
923
|
+
//#region src/core/descriptor-meta.d.ts
|
|
924
|
+
declare const mysqlTargetDescriptorMetaBase: {
|
|
925
|
+
readonly defaultNamespaceId: "__unbound__";
|
|
926
|
+
readonly supportsNamespaces: false;
|
|
927
|
+
readonly displayName: "MySQL";
|
|
928
|
+
readonly authoring: {
|
|
929
|
+
readonly type: {
|
|
930
|
+
readonly sql: {
|
|
931
|
+
readonly String: {
|
|
932
|
+
readonly kind: "typeConstructor";
|
|
933
|
+
readonly documentation: "Variable-length text with a required maximum character length.";
|
|
934
|
+
readonly args: readonly [{
|
|
935
|
+
readonly kind: "value";
|
|
936
|
+
readonly dataType: "mysql/int";
|
|
937
|
+
readonly name: "length";
|
|
938
|
+
}];
|
|
939
|
+
readonly output: {
|
|
940
|
+
readonly codecId: "sql/varchar@1";
|
|
941
|
+
readonly typeParams: {
|
|
942
|
+
readonly length: {
|
|
943
|
+
readonly kind: "arg";
|
|
944
|
+
readonly index: 0;
|
|
945
|
+
};
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
};
|
|
949
|
+
readonly Char: {
|
|
950
|
+
readonly kind: "typeConstructor";
|
|
951
|
+
readonly documentation: "Fixed-length text with a required character length.";
|
|
952
|
+
readonly args: readonly [{
|
|
953
|
+
readonly kind: "value";
|
|
954
|
+
readonly dataType: "mysql/int";
|
|
955
|
+
readonly name: "length";
|
|
956
|
+
}];
|
|
957
|
+
readonly output: {
|
|
958
|
+
readonly codecId: "sql/char@1";
|
|
959
|
+
readonly typeParams: {
|
|
960
|
+
readonly length: {
|
|
961
|
+
readonly kind: "arg";
|
|
962
|
+
readonly index: 0;
|
|
963
|
+
};
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
};
|
|
968
|
+
readonly String: {
|
|
969
|
+
readonly kind: "typeConstructor";
|
|
970
|
+
readonly documentation: "Text of at most 191 characters, stored as MySQL varchar(191) so that it can be indexed.";
|
|
971
|
+
readonly output: {
|
|
972
|
+
readonly codecId: "sql/varchar@1";
|
|
973
|
+
readonly typeParams: {
|
|
974
|
+
readonly length: 191;
|
|
975
|
+
};
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
readonly Int: {
|
|
979
|
+
readonly kind: "typeConstructor";
|
|
980
|
+
readonly inferred: true;
|
|
981
|
+
readonly documentation: "A signed 32-bit integer stored as MySQL int and represented as a JavaScript number.";
|
|
982
|
+
readonly output: {
|
|
983
|
+
readonly codecId: "mysql/int@1";
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
readonly BigInt: {
|
|
987
|
+
readonly kind: "typeConstructor";
|
|
988
|
+
readonly inferred: true;
|
|
989
|
+
readonly documentation: "A signed 64-bit integer stored as MySQL bigint and represented as a JavaScript bigint.";
|
|
990
|
+
readonly output: {
|
|
991
|
+
readonly codecId: "mysql/bigint@1";
|
|
992
|
+
};
|
|
993
|
+
};
|
|
994
|
+
readonly DateTime: {
|
|
995
|
+
readonly kind: "typeConstructor";
|
|
996
|
+
readonly inferred: true;
|
|
997
|
+
readonly documentation: "A date and time with millisecond precision, stored as MySQL datetime(3) in UTC and represented as a JavaScript Date.";
|
|
998
|
+
readonly output: {
|
|
999
|
+
readonly codecId: "mysql/datetime@1";
|
|
1000
|
+
readonly typeParams: {
|
|
1001
|
+
readonly precision: 3;
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
1004
|
+
};
|
|
1005
|
+
};
|
|
1006
|
+
readonly dataTypes: Readonly<Record<string, import("@prisma/orm-framework/components/authoring").DataTypeAuthoringEntry>>;
|
|
1007
|
+
readonly textDataTypes: readonly import("@prisma/orm-framework/components/codec").DataTypeId[];
|
|
1008
|
+
};
|
|
1009
|
+
readonly generatorFunctions: readonly [{
|
|
1010
|
+
readonly name: "uuid";
|
|
1011
|
+
readonly signature: (dataTypes: import("@prisma/orm-framework/components/authoring").DataTypeSupport) => {
|
|
1012
|
+
readonly documentation: "Generates a UUID when a value is not supplied.";
|
|
1013
|
+
readonly positional: readonly [{
|
|
1014
|
+
readonly key: "version";
|
|
1015
|
+
readonly type: OptionalArgType<4 | 7, AttributeCtx, ArgType<4 | 7, AttributeCtx>>;
|
|
1016
|
+
readonly documentation: "The UUID version: `4` or `7`. Defaults to `4`.";
|
|
1017
|
+
}];
|
|
1018
|
+
};
|
|
1019
|
+
readonly bindings: readonly [];
|
|
1020
|
+
}, {
|
|
1021
|
+
readonly name: "cuid";
|
|
1022
|
+
readonly signature: (dataTypes: import("@prisma/orm-framework/components/authoring").DataTypeSupport) => {
|
|
1023
|
+
readonly documentation: "Generates a CUID2 identifier when a value is not supplied.";
|
|
1024
|
+
readonly positional: readonly [{
|
|
1025
|
+
readonly key: "version";
|
|
1026
|
+
readonly type: ArgType<2, AttributeCtx>;
|
|
1027
|
+
readonly documentation: "The CUID version. Only `2` is supported.";
|
|
1028
|
+
}];
|
|
1029
|
+
};
|
|
1030
|
+
readonly bindings: readonly [];
|
|
1031
|
+
}, {
|
|
1032
|
+
readonly name: "nanoid";
|
|
1033
|
+
readonly signature: (dataTypes: import("@prisma/orm-framework/components/authoring").DataTypeSupport) => {
|
|
1034
|
+
readonly documentation: "Generates a Nano ID when a value is not supplied.";
|
|
1035
|
+
readonly positional: readonly [{
|
|
1036
|
+
readonly key: "size";
|
|
1037
|
+
readonly type: OptionalArgType<number, AttributeCtx, ArgType<number, AttributeCtx>>;
|
|
1038
|
+
readonly documentation: "The identifier length, from `2` through `255`. Defaults to 21.";
|
|
1039
|
+
}];
|
|
1040
|
+
};
|
|
1041
|
+
readonly bindings: readonly [];
|
|
1042
|
+
}, {
|
|
1043
|
+
readonly name: "now";
|
|
1044
|
+
readonly bindings: readonly [import("@prisma/orm-framework/components/components").GeneratorFunctionBinding];
|
|
1045
|
+
}, ...import("@prisma/orm-framework/components/components").GeneratorFunctionContribution[]];
|
|
1046
|
+
readonly controlMutationDefaults: {
|
|
1047
|
+
readonly defaultFunctionRegistry: Map<any, any>;
|
|
1048
|
+
readonly generatorDescriptors: readonly import("@prisma/orm-framework/components/control").MutationDefaultGeneratorDescriptor[];
|
|
1049
|
+
};
|
|
1050
|
+
readonly kind: "target";
|
|
1051
|
+
readonly familyId: "sql";
|
|
1052
|
+
readonly targetId: "mysql";
|
|
1053
|
+
readonly id: "mysql";
|
|
1054
|
+
readonly version: "0.0.1";
|
|
1055
|
+
readonly capabilities: {};
|
|
1056
|
+
readonly dataTypes: readonly import("@prisma/orm-framework/components/codec").DataType[];
|
|
1057
|
+
readonly sessionSettings: {
|
|
1058
|
+
readonly time_zone: "+00:00";
|
|
1059
|
+
};
|
|
1060
|
+
readonly __codecTypes?: CodecTypes;
|
|
1061
|
+
};
|
|
1062
|
+
declare const mysqlTargetDescriptorMeta: typeof mysqlTargetDescriptorMetaBase & {
|
|
1063
|
+
readonly __codecTypes?: CodecTypes;
|
|
1064
|
+
readonly __dataTypeArguments?: {
|
|
1065
|
+
readonly 'mysql/int': {
|
|
1066
|
+
readonly argument: number;
|
|
1067
|
+
readonly parameter: number;
|
|
1068
|
+
};
|
|
1069
|
+
};
|
|
1070
|
+
};
|
|
1071
|
+
//#endregion
|
|
1072
|
+
export { mysqlTargetDescriptorMeta as t };
|
|
1073
|
+
//# sourceMappingURL=pack-YVG-iBMQ.d.mts.map
|