@query-doctor/core 0.9.0 → 0.10.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.cjs +18 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +4 -3
- package/dist/optimizer/genalgo.cjs +5 -5
- package/dist/optimizer/genalgo.cjs.map +1 -1
- package/dist/optimizer/genalgo.d.cts +5 -4
- package/dist/optimizer/genalgo.d.cts.map +1 -1
- package/dist/optimizer/genalgo.d.mts +5 -4
- package/dist/optimizer/genalgo.d.mts.map +1 -1
- package/dist/optimizer/genalgo.mjs +5 -5
- package/dist/optimizer/genalgo.mjs.map +1 -1
- package/dist/optimizer/statistics.cjs +1 -61
- package/dist/optimizer/statistics.cjs.map +1 -1
- package/dist/optimizer/statistics.d.cts +1 -20
- package/dist/optimizer/statistics.d.cts.map +1 -1
- package/dist/optimizer/statistics.d.mts +1 -20
- package/dist/optimizer/statistics.d.mts.map +1 -1
- package/dist/optimizer/statistics.mjs +1 -61
- package/dist/optimizer/statistics.mjs.map +1 -1
- package/dist/schema-dump.cjs +365 -0
- package/dist/schema-dump.cjs.map +1 -0
- package/dist/schema-dump.mjs +365 -0
- package/dist/schema-dump.mjs.map +1 -0
- package/dist/schema.cjs +172 -0
- package/dist/schema.cjs.map +1 -0
- package/dist/schema.d.cts +352 -0
- package/dist/schema.d.cts.map +1 -0
- package/dist/schema.d.mts +352 -0
- package/dist/schema.d.mts.map +1 -0
- package/dist/schema.mjs +157 -0
- package/dist/schema.mjs.map +1 -0
- package/dist/sql/database.d.cts +1 -1
- package/dist/sql/database.d.mts +1 -1
- package/dist/sql/indexes.cjs +51 -2
- package/dist/sql/indexes.cjs.map +1 -1
- package/dist/sql/indexes.d.cts +20 -4
- package/dist/sql/indexes.d.cts.map +1 -1
- package/dist/sql/indexes.d.mts +20 -4
- package/dist/sql/indexes.d.mts.map +1 -1
- package/dist/sql/indexes.mjs +51 -3
- package/dist/sql/indexes.mjs.map +1 -1
- package/dist/sql/walker.cjs +1 -1
- package/dist/sql/walker.mjs +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { PgIdentifier } from "./sql/pg-identifier.cjs";
|
|
4
|
+
import { Postgres } from "./sql/database.cjs";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
//#region src/schema.d.ts
|
|
8
|
+
declare const FullSchemaKeyColumn: z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<"indexColumn">;
|
|
10
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
11
|
+
order: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
ASC: "ASC";
|
|
13
|
+
DESC: "DESC";
|
|
14
|
+
}>>;
|
|
15
|
+
nulls: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
FIRST: "FIRST";
|
|
17
|
+
LAST: "LAST";
|
|
18
|
+
}>>;
|
|
19
|
+
opclass: z.ZodOptional<z.ZodString>;
|
|
20
|
+
collation: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
type FullSchemaKeyColumn = z.infer<typeof FullSchemaKeyColumn>;
|
|
23
|
+
declare const FullSchemaIncludedColumn: z.ZodObject<{
|
|
24
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
type FullSchemaIncludedColumn = z.infer<typeof FullSchemaIncludedColumn>;
|
|
27
|
+
declare const FullSchemaIndex: z.ZodObject<{
|
|
28
|
+
type: z.ZodLiteral<"index">;
|
|
29
|
+
oid: z.ZodNumber;
|
|
30
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
31
|
+
tableName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
32
|
+
indexName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
33
|
+
indexType: z.ZodString;
|
|
34
|
+
isUnique: z.ZodBoolean;
|
|
35
|
+
isPrimary: z.ZodBoolean;
|
|
36
|
+
isClustered: z.ZodBoolean;
|
|
37
|
+
wherePredicate: z.ZodOptional<z.ZodString>;
|
|
38
|
+
tablespace: z.ZodOptional<z.ZodString>;
|
|
39
|
+
keyColumns: z.ZodArray<z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<"indexColumn">;
|
|
41
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
42
|
+
order: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
ASC: "ASC";
|
|
44
|
+
DESC: "DESC";
|
|
45
|
+
}>>;
|
|
46
|
+
nulls: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
FIRST: "FIRST";
|
|
48
|
+
LAST: "LAST";
|
|
49
|
+
}>>;
|
|
50
|
+
opclass: z.ZodOptional<z.ZodString>;
|
|
51
|
+
collation: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
includedColumns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
55
|
+
}, z.core.$strip>>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
type FullSchemaIndex = z.infer<typeof FullSchemaIndex>;
|
|
58
|
+
declare const FullSchemaColumn: z.ZodObject<{
|
|
59
|
+
type: z.ZodLiteral<"column">;
|
|
60
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
61
|
+
order: z.ZodNumber;
|
|
62
|
+
columnType: z.ZodString;
|
|
63
|
+
isNullable: z.ZodBoolean;
|
|
64
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
65
|
+
dropped: z.ZodBoolean;
|
|
66
|
+
collation: z.ZodOptional<z.ZodString>;
|
|
67
|
+
storage: z.ZodOptional<z.ZodEnum<{
|
|
68
|
+
plain: "plain";
|
|
69
|
+
main: "main";
|
|
70
|
+
external: "external";
|
|
71
|
+
extended: "extended";
|
|
72
|
+
}>>;
|
|
73
|
+
isIdentity: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
always: "always";
|
|
75
|
+
"by default": "by default";
|
|
76
|
+
}>>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
type FullSchemaColumn = z.infer<typeof FullSchemaColumn>;
|
|
79
|
+
declare const FullSchemaTable: z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"table">;
|
|
81
|
+
oid: z.ZodNumber;
|
|
82
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
83
|
+
tableName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
84
|
+
tablespace: z.ZodOptional<z.ZodString>;
|
|
85
|
+
partitionKeyDef: z.ZodOptional<z.ZodString>;
|
|
86
|
+
columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
87
|
+
type: z.ZodLiteral<"column">;
|
|
88
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
89
|
+
order: z.ZodNumber;
|
|
90
|
+
columnType: z.ZodString;
|
|
91
|
+
isNullable: z.ZodBoolean;
|
|
92
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
93
|
+
dropped: z.ZodBoolean;
|
|
94
|
+
collation: z.ZodOptional<z.ZodString>;
|
|
95
|
+
storage: z.ZodOptional<z.ZodEnum<{
|
|
96
|
+
plain: "plain";
|
|
97
|
+
main: "main";
|
|
98
|
+
external: "external";
|
|
99
|
+
extended: "extended";
|
|
100
|
+
}>>;
|
|
101
|
+
isIdentity: z.ZodOptional<z.ZodEnum<{
|
|
102
|
+
always: "always";
|
|
103
|
+
"by default": "by default";
|
|
104
|
+
}>>;
|
|
105
|
+
}, z.core.$strip>>>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
type FullSchemaTable = z.infer<typeof FullSchemaTable>;
|
|
108
|
+
declare const FullSchemaConstraint: z.ZodObject<{
|
|
109
|
+
type: z.ZodLiteral<"constraint">;
|
|
110
|
+
oid: z.ZodNumber;
|
|
111
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
112
|
+
tableName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
113
|
+
constraintName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
114
|
+
constraintType: z.ZodUnion<[z.ZodEnum<{
|
|
115
|
+
check: "check";
|
|
116
|
+
foreign_key: "foreign_key";
|
|
117
|
+
not_null: "not_null";
|
|
118
|
+
primary_key: "primary_key";
|
|
119
|
+
unique: "unique";
|
|
120
|
+
trigger: "trigger";
|
|
121
|
+
exclusion: "exclusion";
|
|
122
|
+
}>, z.ZodString]>;
|
|
123
|
+
definition: z.ZodString;
|
|
124
|
+
isDeferrable: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
isInitiallyDeferred: z.ZodOptional<z.ZodBoolean>;
|
|
126
|
+
isValidated: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
backingIndexOid: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
type FullSchemaConstraint = z.infer<typeof FullSchemaConstraint>;
|
|
130
|
+
declare const FullSchemaFunction: z.ZodObject<{
|
|
131
|
+
type: z.ZodLiteral<"function">;
|
|
132
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
133
|
+
objectName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
134
|
+
objectType: z.ZodEnum<{
|
|
135
|
+
function: "function";
|
|
136
|
+
procedure: "procedure";
|
|
137
|
+
aggregate: "aggregate";
|
|
138
|
+
"window function": "window function";
|
|
139
|
+
}>;
|
|
140
|
+
identityArguments: z.ZodOptional<z.ZodString>;
|
|
141
|
+
definition: z.ZodString;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
type FullSchemaFunction = z.infer<typeof FullSchemaFunction>;
|
|
144
|
+
declare const FullSchemaExtension: z.ZodObject<{
|
|
145
|
+
extensionName: z.ZodString;
|
|
146
|
+
version: z.ZodString;
|
|
147
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
type FullSchemaExtension = z.infer<typeof FullSchemaExtension>;
|
|
150
|
+
declare const FullSchemaView: z.ZodObject<{
|
|
151
|
+
type: z.ZodLiteral<"view">;
|
|
152
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
153
|
+
viewName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
154
|
+
objectType: z.ZodEnum<{
|
|
155
|
+
view: "view";
|
|
156
|
+
materialized_view: "materialized_view";
|
|
157
|
+
}>;
|
|
158
|
+
definition: z.ZodString;
|
|
159
|
+
tablespace: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
type FullSchemaView = z.infer<typeof FullSchemaView>;
|
|
162
|
+
declare const FullSchemaTypeConstraint: z.ZodObject<{
|
|
163
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
164
|
+
definition: z.ZodString;
|
|
165
|
+
}, z.core.$strip>;
|
|
166
|
+
type FullSchemaTypeConstraint = z.infer<typeof FullSchemaTypeConstraint>;
|
|
167
|
+
declare const FullSchemaCompositeAttribute: z.ZodObject<{
|
|
168
|
+
type: z.ZodLiteral<"compositeAttribute">;
|
|
169
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
170
|
+
attributeType: z.ZodString;
|
|
171
|
+
collation: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>>;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
type FullSchemaCompositeAttribute = z.infer<typeof FullSchemaCompositeAttribute>;
|
|
174
|
+
declare const FullSchemaType: z.ZodObject<{
|
|
175
|
+
type: z.ZodLiteral<"type">;
|
|
176
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
177
|
+
typeName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
178
|
+
typeCategory: z.ZodEnum<{
|
|
179
|
+
enum: "enum";
|
|
180
|
+
domain: "domain";
|
|
181
|
+
composite: "composite";
|
|
182
|
+
}>;
|
|
183
|
+
enumLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
184
|
+
domainBaseType: z.ZodOptional<z.ZodString>;
|
|
185
|
+
domainIsNotNull: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
+
domainDefault: z.ZodOptional<z.ZodString>;
|
|
187
|
+
domainConstraints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
188
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
189
|
+
definition: z.ZodString;
|
|
190
|
+
}, z.core.$strip>>>;
|
|
191
|
+
compositeAttributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
192
|
+
type: z.ZodLiteral<"compositeAttribute">;
|
|
193
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
194
|
+
attributeType: z.ZodString;
|
|
195
|
+
collation: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>>;
|
|
196
|
+
}, z.core.$strip>>>;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
type FullSchemaType = z.infer<typeof FullSchemaType>;
|
|
199
|
+
declare const FullSchemaTrigger: z.ZodObject<{
|
|
200
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
201
|
+
tableName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
202
|
+
triggerName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
203
|
+
definition: z.ZodString;
|
|
204
|
+
enabledMode: z.ZodString;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
type FullSchemaTrigger = z.infer<typeof FullSchemaTrigger>;
|
|
207
|
+
declare const FullSchema: z.ZodObject<{
|
|
208
|
+
indexes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
209
|
+
type: z.ZodLiteral<"index">;
|
|
210
|
+
oid: z.ZodNumber;
|
|
211
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
212
|
+
tableName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
213
|
+
indexName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
214
|
+
indexType: z.ZodString;
|
|
215
|
+
isUnique: z.ZodBoolean;
|
|
216
|
+
isPrimary: z.ZodBoolean;
|
|
217
|
+
isClustered: z.ZodBoolean;
|
|
218
|
+
wherePredicate: z.ZodOptional<z.ZodString>;
|
|
219
|
+
tablespace: z.ZodOptional<z.ZodString>;
|
|
220
|
+
keyColumns: z.ZodArray<z.ZodObject<{
|
|
221
|
+
type: z.ZodLiteral<"indexColumn">;
|
|
222
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
223
|
+
order: z.ZodOptional<z.ZodEnum<{
|
|
224
|
+
ASC: "ASC";
|
|
225
|
+
DESC: "DESC";
|
|
226
|
+
}>>;
|
|
227
|
+
nulls: z.ZodOptional<z.ZodEnum<{
|
|
228
|
+
FIRST: "FIRST";
|
|
229
|
+
LAST: "LAST";
|
|
230
|
+
}>>;
|
|
231
|
+
opclass: z.ZodOptional<z.ZodString>;
|
|
232
|
+
collation: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, z.core.$strip>>;
|
|
234
|
+
includedColumns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
235
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
236
|
+
}, z.core.$strip>>>;
|
|
237
|
+
}, z.core.$strip>>>;
|
|
238
|
+
tables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
239
|
+
type: z.ZodLiteral<"table">;
|
|
240
|
+
oid: z.ZodNumber;
|
|
241
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
242
|
+
tableName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
243
|
+
tablespace: z.ZodOptional<z.ZodString>;
|
|
244
|
+
partitionKeyDef: z.ZodOptional<z.ZodString>;
|
|
245
|
+
columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
246
|
+
type: z.ZodLiteral<"column">;
|
|
247
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
248
|
+
order: z.ZodNumber;
|
|
249
|
+
columnType: z.ZodString;
|
|
250
|
+
isNullable: z.ZodBoolean;
|
|
251
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
252
|
+
dropped: z.ZodBoolean;
|
|
253
|
+
collation: z.ZodOptional<z.ZodString>;
|
|
254
|
+
storage: z.ZodOptional<z.ZodEnum<{
|
|
255
|
+
plain: "plain";
|
|
256
|
+
main: "main";
|
|
257
|
+
external: "external";
|
|
258
|
+
extended: "extended";
|
|
259
|
+
}>>;
|
|
260
|
+
isIdentity: z.ZodOptional<z.ZodEnum<{
|
|
261
|
+
always: "always";
|
|
262
|
+
"by default": "by default";
|
|
263
|
+
}>>;
|
|
264
|
+
}, z.core.$strip>>>;
|
|
265
|
+
}, z.core.$strip>>>;
|
|
266
|
+
constraints: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
267
|
+
type: z.ZodLiteral<"constraint">;
|
|
268
|
+
oid: z.ZodNumber;
|
|
269
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
270
|
+
tableName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
271
|
+
constraintName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
272
|
+
constraintType: z.ZodUnion<[z.ZodEnum<{
|
|
273
|
+
check: "check";
|
|
274
|
+
foreign_key: "foreign_key";
|
|
275
|
+
not_null: "not_null";
|
|
276
|
+
primary_key: "primary_key";
|
|
277
|
+
unique: "unique";
|
|
278
|
+
trigger: "trigger";
|
|
279
|
+
exclusion: "exclusion";
|
|
280
|
+
}>, z.ZodString]>;
|
|
281
|
+
definition: z.ZodString;
|
|
282
|
+
isDeferrable: z.ZodOptional<z.ZodBoolean>;
|
|
283
|
+
isInitiallyDeferred: z.ZodOptional<z.ZodBoolean>;
|
|
284
|
+
isValidated: z.ZodOptional<z.ZodBoolean>;
|
|
285
|
+
backingIndexOid: z.ZodOptional<z.ZodNumber>;
|
|
286
|
+
}, z.core.$strip>>>;
|
|
287
|
+
functions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
288
|
+
type: z.ZodLiteral<"function">;
|
|
289
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
290
|
+
objectName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
291
|
+
objectType: z.ZodEnum<{
|
|
292
|
+
function: "function";
|
|
293
|
+
procedure: "procedure";
|
|
294
|
+
aggregate: "aggregate";
|
|
295
|
+
"window function": "window function";
|
|
296
|
+
}>;
|
|
297
|
+
identityArguments: z.ZodOptional<z.ZodString>;
|
|
298
|
+
definition: z.ZodString;
|
|
299
|
+
}, z.core.$strip>>>;
|
|
300
|
+
extensions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
301
|
+
extensionName: z.ZodString;
|
|
302
|
+
version: z.ZodString;
|
|
303
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
304
|
+
}, z.core.$strip>>>;
|
|
305
|
+
views: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
306
|
+
type: z.ZodLiteral<"view">;
|
|
307
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
308
|
+
viewName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
309
|
+
objectType: z.ZodEnum<{
|
|
310
|
+
view: "view";
|
|
311
|
+
materialized_view: "materialized_view";
|
|
312
|
+
}>;
|
|
313
|
+
definition: z.ZodString;
|
|
314
|
+
tablespace: z.ZodOptional<z.ZodString>;
|
|
315
|
+
}, z.core.$strip>>>;
|
|
316
|
+
types: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
317
|
+
type: z.ZodLiteral<"type">;
|
|
318
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
319
|
+
typeName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
320
|
+
typeCategory: z.ZodEnum<{
|
|
321
|
+
enum: "enum";
|
|
322
|
+
domain: "domain";
|
|
323
|
+
composite: "composite";
|
|
324
|
+
}>;
|
|
325
|
+
enumLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
326
|
+
domainBaseType: z.ZodOptional<z.ZodString>;
|
|
327
|
+
domainIsNotNull: z.ZodOptional<z.ZodBoolean>;
|
|
328
|
+
domainDefault: z.ZodOptional<z.ZodString>;
|
|
329
|
+
domainConstraints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
330
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
331
|
+
definition: z.ZodString;
|
|
332
|
+
}, z.core.$strip>>>;
|
|
333
|
+
compositeAttributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
334
|
+
type: z.ZodLiteral<"compositeAttribute">;
|
|
335
|
+
name: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
336
|
+
attributeType: z.ZodString;
|
|
337
|
+
collation: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>>;
|
|
338
|
+
}, z.core.$strip>>>;
|
|
339
|
+
}, z.core.$strip>>>;
|
|
340
|
+
triggers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
341
|
+
schemaName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
342
|
+
tableName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
343
|
+
triggerName: z.ZodCodec<z.ZodString, z.ZodCustom<PgIdentifier, PgIdentifier>>;
|
|
344
|
+
definition: z.ZodString;
|
|
345
|
+
enabledMode: z.ZodString;
|
|
346
|
+
}, z.core.$strip>>>;
|
|
347
|
+
}, z.core.$strip>;
|
|
348
|
+
type FullSchema = z.infer<typeof FullSchema>;
|
|
349
|
+
declare function dumpSchema(db: Postgres): Promise<FullSchema>;
|
|
350
|
+
//#endregion
|
|
351
|
+
export { FullSchema, FullSchemaColumn, FullSchemaCompositeAttribute, FullSchemaConstraint, FullSchemaExtension, FullSchemaFunction, FullSchemaIncludedColumn, FullSchemaIndex, FullSchemaKeyColumn, FullSchemaTable, FullSchemaTrigger, FullSchemaType, FullSchemaTypeConstraint, FullSchemaView, dumpSchema };
|
|
352
|
+
//# sourceMappingURL=schema.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.cts","names":[],"sources":["../src/schema.ts"],"mappings":";;;;;;;cAUa,mBAAA,EAAmB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;KASpB,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,mBAAA;AAAA,cAEpC,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;KAIzB,wBAAA,GAA2B,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,cAEzC,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgBhB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,eAAA;AAAA,cAEhC,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;KAajB,gBAAA,GAAmB,CAAA,CAAE,KAAA,QAAa,gBAAA;AAAA,cAEjC,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAUhB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,eAAA;AAAA,cAEhC,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;KAwBrB,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,oBAAA;AAAA,cAErC,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;;;;;;;;;KASnB,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,kBAAA;AAAA,cAEnC,mBAAA,EAAmB,CAAA,CAAA,SAAA;;;;;KAMpB,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,mBAAA;AAAA,cAEpC,cAAA,EAAc,CAAA,CAAA,SAAA;;;;;;;;;;;KASf,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,cAAA;AAAA,cAE/B,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;KAKzB,wBAAA,GAA2B,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,cAEzC,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;KAO7B,4BAAA,GAA+B,CAAA,CAAE,KAAA,QACpC,4BAAA;AAAA,cAGI,cAAA,EAAc,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;KAaf,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,cAAA;AAAA,cAE/B,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;KAQlB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,iBAAA;AAAA,cAElC,UAAA,EAAU,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAWX,UAAA,GAAa,CAAA,CAAE,KAAA,QAAa,UAAA;AAAA,iBAElB,UAAA,CAAW,EAAA,EAAI,QAAA,GAAW,OAAA,CAAQ,UAAA"}
|