@ypanagidis/joqi 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +444 -0
- package/dist/effect.d.ts +2 -0
- package/dist/effect.js +3 -0
- package/dist/index-w8tJonRi.d.ts +1213 -0
- package/dist/index-w8tJonRi.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/src-DGGMT7nT.js +1298 -0
- package/dist/src-DGGMT7nT.js.map +1 -0
- package/package.json +35 -0
package/README.md
ADDED
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
# Joqi
|
|
2
|
+
|
|
3
|
+
Joqi is a registry-backed JSON query compiler for TypeScript apps.
|
|
4
|
+
|
|
5
|
+
At its core, Joqi should expose two standard contracts:
|
|
6
|
+
|
|
7
|
+
```txt
|
|
8
|
+
1. Query Schema
|
|
9
|
+
2. Registry Schema
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Given an untrusted JSON query and a trusted registry, Joqi validates what is allowed, lowers the query into a normalized IR, and hands that IR to an adapter such as Drizzle or Prisma.
|
|
13
|
+
|
|
14
|
+
```txt
|
|
15
|
+
unknown JSON
|
|
16
|
+
-> QuerySpecSchema
|
|
17
|
+
-> ResolvedRegistry validation
|
|
18
|
+
-> QueryIR
|
|
19
|
+
-> adapter compiler
|
|
20
|
+
-> adapter execution
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The package is currently private under the `@ypanagidis` npm scope.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pnpm add @ypanagidis/joqi@alpha
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
Most applications should use `createQueryRuntime`. The runtime resolves the
|
|
34
|
+
registry, validates and binds query params, lowers to IR, compiles SQL, executes
|
|
35
|
+
through an adapter, and validates result rows.
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { createQueryRuntime } from "@ypanagidis/joqi";
|
|
39
|
+
import { drizzleExecutor } from "@ypanagidis/joqi-drizzle";
|
|
40
|
+
|
|
41
|
+
const spec = {
|
|
42
|
+
version: "v1",
|
|
43
|
+
source: "placement",
|
|
44
|
+
select: ["name", "budget"],
|
|
45
|
+
where: { field: "budget", op: "gte", value: { $param: "minBudget" } },
|
|
46
|
+
orderBy: [{ field: "budget", direction: "desc" }],
|
|
47
|
+
limit: { $param: "limit" },
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const runtime = createQueryRuntime({
|
|
51
|
+
db,
|
|
52
|
+
physicalRegistry: physical,
|
|
53
|
+
defaults,
|
|
54
|
+
policy,
|
|
55
|
+
dialect: "mysql",
|
|
56
|
+
executor: drizzleExecutor(),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const result = await runtime.run({
|
|
60
|
+
spec,
|
|
61
|
+
params: {
|
|
62
|
+
minBudget: 10000,
|
|
63
|
+
limit: 50,
|
|
64
|
+
},
|
|
65
|
+
explain: true,
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
console.log(result.rows);
|
|
69
|
+
console.log(result.explain.sqlPlan);
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
When `explain: true` is passed, `result.explain` is typed as present and includes
|
|
73
|
+
the resolved registry, `QueryIR`, and `SQLPlan`. Omit `explain` for just rows.
|
|
74
|
+
|
|
75
|
+
## Runtime Errors
|
|
76
|
+
|
|
77
|
+
`runtime.run(...)` does not wrap every failure in one catch-all error. It keeps
|
|
78
|
+
stage errors visible so callers can handle the right boundary:
|
|
79
|
+
|
|
80
|
+
- Registry parsing/resolution failures throw `RegistryParseError` or `RegistryResolutionError`.
|
|
81
|
+
- Query parsing/validation failures throw `QueryParseError` or `QueryValidationError`.
|
|
82
|
+
- Missing `$param` values and invalid param types are `QueryValidationError` issues.
|
|
83
|
+
- Adapter execution failures are thrown by the configured executor. For Drizzle, `drizzleExecutor()` uses `DrizzleExecutionError` from `@ypanagidis/joqi-drizzle`.
|
|
84
|
+
- Result row validation failures come from the result schema parser.
|
|
85
|
+
|
|
86
|
+
Validation happens before execution. If params are missing or invalid, the
|
|
87
|
+
executor is not called.
|
|
88
|
+
|
|
89
|
+
## Advanced APIs
|
|
90
|
+
|
|
91
|
+
The runtime is a small wrapper over lower-level APIs. Use these directly when you
|
|
92
|
+
need to inspect or customize individual compiler stages.
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import {
|
|
96
|
+
compileQuerySpecToSQL,
|
|
97
|
+
lowerQuerySpecToIR,
|
|
98
|
+
parseQuerySpec,
|
|
99
|
+
resolveRegistry,
|
|
100
|
+
validateQuerySpec,
|
|
101
|
+
} from "@ypanagidis/joqi";
|
|
102
|
+
|
|
103
|
+
const query = parseQuerySpec(spec);
|
|
104
|
+
const registry = resolveRegistry({ physical, defaults, policy });
|
|
105
|
+
const validatedQuery = validateQuerySpec({ query, registry, params });
|
|
106
|
+
const ir = lowerQuerySpecToIR({ query: validatedQuery, registry, params });
|
|
107
|
+
const sqlPlan = compileQuerySpecToSQL({ query: validatedQuery, registry, dialect: "postgres" });
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
All schemas are also exported directly for advanced validation flows:
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
import { QuerySpecSchema, ResolvedRegistrySchema } from "@ypanagidis/joqi";
|
|
114
|
+
|
|
115
|
+
const result = QuerySpecSchema.safeParse(input);
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Effect API
|
|
119
|
+
|
|
120
|
+
The core pipeline is Effect-first. Sync and promise helpers are convenience facades.
|
|
121
|
+
The Effect APIs are exposed from the Effect subpath:
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
import { Effect } from "effect";
|
|
125
|
+
import {
|
|
126
|
+
compileQuerySpecToSQLEffect,
|
|
127
|
+
lowerQuerySpecToIREffect,
|
|
128
|
+
resolveRegistryEffect,
|
|
129
|
+
validateQuerySpecEffect,
|
|
130
|
+
} from "@ypanagidis/joqi/effect";
|
|
131
|
+
|
|
132
|
+
const program = Effect.gen(function* () {
|
|
133
|
+
const registry = yield* resolveRegistryEffect({ physical, defaults, policy });
|
|
134
|
+
const validatedQuery = yield* validateQuerySpecEffect({ query, registry, params });
|
|
135
|
+
const ir = yield* lowerQuerySpecToIREffect({ query: validatedQuery, registry, params });
|
|
136
|
+
const sqlPlan = yield* compileQuerySpecToSQLEffect({
|
|
137
|
+
query: validatedQuery,
|
|
138
|
+
registry,
|
|
139
|
+
dialect: "postgres",
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
return { registry, validatedQuery, ir, sqlPlan };
|
|
143
|
+
});
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Resolver failures are Effect-native tagged errors:
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
program.pipe(
|
|
150
|
+
Effect.catchTags({
|
|
151
|
+
RegistryParseError: (error) => Effect.succeed(error.error),
|
|
152
|
+
RegistryResolutionError: (error) => Effect.succeed(error.issues),
|
|
153
|
+
}),
|
|
154
|
+
);
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## QueryIR And SQLPlan
|
|
158
|
+
|
|
159
|
+
Query lowering validates the query, resolves public paths to physical field refs,
|
|
160
|
+
and emits deduplicated joins. The current IR is adapter-neutral:
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
type QueryIR = {
|
|
165
|
+
kind: "select";
|
|
166
|
+
source: QueryIRSourceRef;
|
|
167
|
+
select: QueryIRFieldRef[];
|
|
168
|
+
joins: QueryIRJoin[];
|
|
169
|
+
where?: QueryIRFilter;
|
|
170
|
+
groupBy: QueryIRFieldRef[];
|
|
171
|
+
orderBy: QueryIROrderBy[];
|
|
172
|
+
limit?: number;
|
|
173
|
+
offset?: number;
|
|
174
|
+
};
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
The SQL compiler returns raw SQL plus bound params. It defaults to MySQL and can
|
|
178
|
+
also emit PostgreSQL or SQLite SQL:
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
type SQLDialect = "mysql" | "postgres" | "sqlite";
|
|
182
|
+
|
|
183
|
+
type SQLPlan = {
|
|
184
|
+
dialect: SQLDialect;
|
|
185
|
+
sql: string;
|
|
186
|
+
params: readonly JsonValue[];
|
|
187
|
+
};
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Core Contracts
|
|
191
|
+
|
|
192
|
+
### Query Schema
|
|
193
|
+
|
|
194
|
+
The query schema is the public JSON shape accepted by Joqi.
|
|
195
|
+
|
|
196
|
+
It should describe query intent, not raw SQL:
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"version": "v1",
|
|
201
|
+
"source": "placement",
|
|
202
|
+
"select": ["name", "status", "budget", "campaign.name"],
|
|
203
|
+
"where": {
|
|
204
|
+
"and": [
|
|
205
|
+
{ "field": "status", "op": "eq", "value": { "$param": "status" } },
|
|
206
|
+
{ "field": "budget", "op": "gte", "value": { "$param": "minBudget" } }
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"orderBy": [{ "field": "budget", "direction": "desc" }],
|
|
210
|
+
"limit": { "$param": "limit" }
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
The query schema should not expose raw table names, raw column names, raw SQL fragments, or arbitrary function names.
|
|
215
|
+
|
|
216
|
+
`$param` references are bound from `params` during validation, before SQL compilation. Missing params fail validation; filter params are checked against the resolved field type; params used for `limit` or `offset` must be non-negative integers.
|
|
217
|
+
|
|
218
|
+
### Saved Query Templates
|
|
219
|
+
|
|
220
|
+
Because params are supplied separately, a query can be saved as reusable JSON and
|
|
221
|
+
run with different request values:
|
|
222
|
+
|
|
223
|
+
```ts
|
|
224
|
+
const activePlacementReport = await loadQueryTemplate("active-placement-report");
|
|
225
|
+
|
|
226
|
+
const result = await runtime.run({
|
|
227
|
+
spec: activePlacementReport,
|
|
228
|
+
params: {
|
|
229
|
+
status: "active",
|
|
230
|
+
minBudget: 10000,
|
|
231
|
+
campaignName: "spring",
|
|
232
|
+
limit: 25,
|
|
233
|
+
},
|
|
234
|
+
explain: true,
|
|
235
|
+
});
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
The template stays stable:
|
|
239
|
+
|
|
240
|
+
```json
|
|
241
|
+
{
|
|
242
|
+
"version": "v1",
|
|
243
|
+
"source": "placement",
|
|
244
|
+
"select": ["name", "status", "budget", "campaign.name"],
|
|
245
|
+
"where": {
|
|
246
|
+
"and": [
|
|
247
|
+
{ "field": "status", "op": "eq", "value": { "$param": "status" } },
|
|
248
|
+
{ "field": "budget", "op": "gte", "value": { "$param": "minBudget" } },
|
|
249
|
+
{ "field": "campaign.name", "op": "contains", "value": { "$param": "campaignName" } }
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
"limit": { "$param": "limit" }
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Field Paths And Derived Joins
|
|
257
|
+
|
|
258
|
+
Joqi intentionally uses public dotted field paths for relation fields:
|
|
259
|
+
|
|
260
|
+
```txt
|
|
261
|
+
name
|
|
262
|
+
budget
|
|
263
|
+
campaign.name
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
This keeps UI builders simple: a field picker can emit the selected public path directly into `select`, `where`, `groupBy`, or `orderBy`.
|
|
267
|
+
|
|
268
|
+
Dotted paths do not create arbitrary joins. During validation, every path segment must exist in the resolved registry and must have the required capability:
|
|
269
|
+
|
|
270
|
+
```txt
|
|
271
|
+
campaign.name
|
|
272
|
+
-> placement has an exposed campaign relation
|
|
273
|
+
-> campaign traversal is selectable/filterable for this query position
|
|
274
|
+
-> campaign is within maxDepth
|
|
275
|
+
-> campaign has an exposed name field
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
After validation, Joqi derives a deduplicated join plan from those field paths. The join plan is visible in `QueryIR.joins` and is what the SQL compiler uses.
|
|
279
|
+
|
|
280
|
+
So relation traversal is implicit in the public query for UI ergonomics, but explicit in the compiled plan for inspection and execution.
|
|
281
|
+
|
|
282
|
+
### Registry Schema
|
|
283
|
+
|
|
284
|
+
The registry defines the allowed query universe.
|
|
285
|
+
|
|
286
|
+
Joqi uses three registry layers:
|
|
287
|
+
|
|
288
|
+
```txt
|
|
289
|
+
PhysicalRegistry
|
|
290
|
+
generated from ORM/schema metadata
|
|
291
|
+
|
|
292
|
+
RegistryPolicy
|
|
293
|
+
user-authored allowlist and customization layer
|
|
294
|
+
|
|
295
|
+
ResolvedRegistry
|
|
296
|
+
per-request effective registry used by validation and compilation
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
The physical registry says what exists.
|
|
300
|
+
|
|
301
|
+
The registry policy says what is exposed.
|
|
302
|
+
|
|
303
|
+
The resolved registry is generated from both, plus engine defaults.
|
|
304
|
+
|
|
305
|
+
```ts
|
|
306
|
+
const resolved = resolveRegistry({
|
|
307
|
+
physical,
|
|
308
|
+
defaults,
|
|
309
|
+
policies,
|
|
310
|
+
});
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Resolution should be cheap and deterministic. It can happen on every query call so field visibility, limits, relation depth, and capabilities can vary by tenant, role, feature flag, or UI-managed configuration.
|
|
314
|
+
|
|
315
|
+
## Registry Shape
|
|
316
|
+
|
|
317
|
+
The physical registry is adapter-generated and close to the ORM/database model:
|
|
318
|
+
|
|
319
|
+
```ts
|
|
320
|
+
type PhysicalRegistry = {
|
|
321
|
+
sources: Record<string, PhysicalSource>;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
type PhysicalSource = {
|
|
325
|
+
kind: "table" | "view" | "model";
|
|
326
|
+
name: string;
|
|
327
|
+
schema?: string;
|
|
328
|
+
primaryKey?: string[];
|
|
329
|
+
fields: Record<string, PhysicalField>;
|
|
330
|
+
relations?: Record<string, PhysicalRelation>;
|
|
331
|
+
};
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
The policy is user-authored data. It can come from code, a database, generated configuration, or a future UI.
|
|
335
|
+
|
|
336
|
+
```ts
|
|
337
|
+
const policy = {
|
|
338
|
+
sources: {
|
|
339
|
+
placements: {
|
|
340
|
+
expose: true,
|
|
341
|
+
exposeAs: "placement",
|
|
342
|
+
fields: {
|
|
343
|
+
name: {
|
|
344
|
+
expose: true,
|
|
345
|
+
filterable: true,
|
|
346
|
+
sortable: true,
|
|
347
|
+
},
|
|
348
|
+
budgetCents: {
|
|
349
|
+
expose: true,
|
|
350
|
+
exposeAs: "budget",
|
|
351
|
+
type: "number",
|
|
352
|
+
filterable: true,
|
|
353
|
+
sortable: true,
|
|
354
|
+
aggregations: ["sum", "avg"],
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
};
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
The resolved registry is what Joqi actually compiles against. Queries only reference public names from the resolved registry.
|
|
363
|
+
|
|
364
|
+
```txt
|
|
365
|
+
placement.budget -> placements.budgetCents
|
|
366
|
+
placement.campaign.name -> join placements.campaignId = campaigns.id, then campaigns.name
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
Resolved relations preserve the physical join keys needed by later IR lowering:
|
|
370
|
+
|
|
371
|
+
```ts
|
|
372
|
+
type ResolvedRelation = {
|
|
373
|
+
physicalSource: string;
|
|
374
|
+
physicalRelation: string;
|
|
375
|
+
target: string;
|
|
376
|
+
kind: "one" | "many";
|
|
377
|
+
localFields: string[];
|
|
378
|
+
foreignFields: string[];
|
|
379
|
+
};
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
## Adapters
|
|
383
|
+
|
|
384
|
+
Adapters have two jobs:
|
|
385
|
+
|
|
386
|
+
```txt
|
|
387
|
+
ORM/schema -> PhysicalRegistry
|
|
388
|
+
SQLPlan -> adapter execution
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
For Drizzle:
|
|
392
|
+
|
|
393
|
+
```txt
|
|
394
|
+
Drizzle schema -> PhysicalRegistry
|
|
395
|
+
SQLPlan -> db.execute(...)
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
The Drizzle adapter lives in `@ypanagidis/joqi-drizzle`, not core Joqi. It can create a `PhysicalRegistry` from Drizzle rc3 relation metadata and execute `SQLPlan` through `db.execute(...)`. Core stays ORM-agnostic and produces `SQLPlan`; adapter packages execute or translate that plan.
|
|
399
|
+
|
|
400
|
+
For Prisma:
|
|
401
|
+
|
|
402
|
+
```txt
|
|
403
|
+
Prisma schema -> PhysicalRegistry
|
|
404
|
+
QueryIR -> Prisma raw SQL initially
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Prisma object-query compilation can be added later for the subset Prisma can represent cleanly. The core should not be shaped around Prisma's `findMany` API.
|
|
408
|
+
|
|
409
|
+
## Current Alpha
|
|
410
|
+
|
|
411
|
+
The current alpha exposes the public Zod schema layer for `QuerySpec`, `PhysicalRegistry`, `RegistryPolicy`, `RegistryDefaults`, and `ResolvedRegistry`, plus the runtime pipeline around these contracts:
|
|
412
|
+
|
|
413
|
+
```txt
|
|
414
|
+
QuerySpecSchema.parse
|
|
415
|
+
-> resolveRegistry
|
|
416
|
+
-> validateQuerySpec
|
|
417
|
+
-> lowerQuerySpecToIR
|
|
418
|
+
-> compileQuerySpecToSQL
|
|
419
|
+
-> adapter.execute
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
Drivers remain useful as an optional layer for business-specific specs:
|
|
423
|
+
|
|
424
|
+
```txt
|
|
425
|
+
business JSON
|
|
426
|
+
-> driver
|
|
427
|
+
-> QuerySpec
|
|
428
|
+
-> Joqi core
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
## Design Constraints
|
|
432
|
+
|
|
433
|
+
Joqi should not become:
|
|
434
|
+
|
|
435
|
+
```txt
|
|
436
|
+
- a BI platform
|
|
437
|
+
- a no-code backend
|
|
438
|
+
- an ORM
|
|
439
|
+
- a GraphQL server
|
|
440
|
+
- a public SQL-in-JSON language
|
|
441
|
+
- an authorization framework
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
The registry controls query shape and field exposure. Per-user row-level authorization and mandatory tenant constraints should be supplied by the host application.
|
package/dist/effect.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $ as ResolveRegistryInput, $t as JsonValue, A as QueryIRFieldRef, At as RelationDefaultsSchema, B as QueryValidationIssue, Bt as ResolvedSource, C as compileQuerySpecToSQLEffect, Ct as Policy, D as LowerQuerySpecError, Dt as RegistryPolicy, E as SQLPlan, Et as RegistryDefaultsSchema, F as lowerQuerySpecToIR, Ft as ResolvedFieldSchema, G as validateQuerySpec, Gt as parsePhysicalRegistry, H as ValidateQuerySpecError, Ht as SourceDefaultsSchema, I as lowerQuerySpecToIREffect, It as ResolvedRegistry, J as RegistryParseError, Jt as parseResolvedRegistry, K as validateQuerySpecEffect, Kt as parseRegistryDefaults, L as lowerQuerySpecToIRPromise, Lt as ResolvedRegistrySchema, M as QueryIRJoin, Mt as RelationPolicy, N as QueryIROrderBy, Nt as RelationPolicySchema, O as LowerQuerySpecInput, Ot as RegistryPolicySchema, P as QueryIRSourceRef, Pt as ResolvedField, Q as ResolveRegistryError, Qt as safeParseResolvedRegistry, R as QueryParseError, Rt as ResolvedRelation, S as compileQuerySpecToSQL, St as PhysicalSourceSchema, T as SQLDialect, Tt as RegistryDefaults, U as ValidateQuerySpecInput, Ut as SourcePolicy, V as QueryValidationIssueSchema, Vt as ResolvedSourceSchema, W as ValidatedQuerySpec, Wt as SourcePolicySchema, X as RegistryResolutionIssue, Xt as safeParseRegistryDefaults, Y as RegistryResolutionError, Yt as safeParsePhysicalRegistry, Z as RegistryResolutionIssueSchema, Zt as safeParseRegistryPolicy, _ as buildQueryIRRowSchema, _n as QueryVersionSchema, _t as PhysicalRelation, a as QueryRuntimeExplain, an as QueryLimitValue, at as AggregationSchema, b as CompileQuerySpecToSQLError, bt as PhysicalSourceKindSchema, c as QueryRuntimeRunError, cn as QueryParamRef, ct as FieldPolicy, d as QueryRuntimeRunInputWithExplain, dn as QueryParamsSchema, dt as FieldTypeSchema, en as JsonValueSchema, et as resolveRegistry, f as QueryRuntimeRunInputWithoutExplain, fn as QuerySortDirection, ft as PhysicalField, g as buildQueryIRResultSchema, gn as QueryValue, gt as PhysicalRegistrySchema, h as QueryResultRows, hn as QuerySpecSchema, ht as PhysicalRegistryLike, i as QueryRuntimeExecutor, in as QueryFilterSchema, it as Aggregation, j as QueryIRFilter, jt as RelationKindSchema, k as QueryIR, kt as RegistryVersionSchema, l as QueryRuntimeRunInput, ln as QueryParamRefSchema, lt as FieldPolicySchema, m as QueryResultRow, mn as QuerySpec, mt as PhysicalRegistry, n as CreateQueryRuntimeInput, nn as QueryFilterOperator, nt as resolveRegistryPromise, o as QueryRuntimeResult, on as QueryOrderBy, ot as ExposureModeSchema, p as createQueryRuntime, pn as QuerySortDirectionSchema, pt as PhysicalFieldSchema, q as validateQuerySpecPromise, qt as parseRegistryPolicy, r as QueryRuntime, rn as QueryFilterOperatorSchema, rt as AdapterMetaSchema, s as QueryRuntimeResultWithExplain, sn as QueryOrderBySchema, st as FieldDefaultsSchema, t as queryKitVersion, tn as QueryFilter, tt as resolveRegistryEffect, u as QueryRuntimeRunInputBase, un as QueryParams, ut as FieldType, v as parseQueryIRResultRows, vn as parseQuerySpec, vt as PhysicalRelationSchema, w as compileQuerySpecToSQLPromise, wt as PolicySource, x as CompileQuerySpecToSQLInput, xt as PhysicalSourceLike, y as safeParseQueryIRResultRows, yn as safeParseQuerySpec, yt as PhysicalSource, z as QueryValidationError, zt as ResolvedRelationSchema } from "./index-w8tJonRi.js";
|
|
2
|
+
export { AdapterMetaSchema, Aggregation, AggregationSchema, CompileQuerySpecToSQLError, CompileQuerySpecToSQLInput, CreateQueryRuntimeInput, ExposureModeSchema, FieldDefaultsSchema, FieldPolicy, FieldPolicySchema, FieldType, FieldTypeSchema, JsonValue, JsonValueSchema, LowerQuerySpecError, LowerQuerySpecInput, PhysicalField, PhysicalFieldSchema, PhysicalRegistry, PhysicalRegistryLike, PhysicalRegistrySchema, PhysicalRelation, PhysicalRelationSchema, PhysicalSource, PhysicalSourceKindSchema, PhysicalSourceLike, PhysicalSourceSchema, Policy, PolicySource, QueryFilter, QueryFilterOperator, QueryFilterOperatorSchema, QueryFilterSchema, QueryIR, QueryIRFieldRef, QueryIRFilter, QueryIRJoin, QueryIROrderBy, QueryIRSourceRef, QueryLimitValue, QueryOrderBy, QueryOrderBySchema, QueryParamRef, QueryParamRefSchema, QueryParams, QueryParamsSchema, QueryParseError, QueryResultRow, QueryResultRows, QueryRuntime, QueryRuntimeExecutor, QueryRuntimeExplain, QueryRuntimeResult, QueryRuntimeResultWithExplain, QueryRuntimeRunError, QueryRuntimeRunInput, QueryRuntimeRunInputBase, QueryRuntimeRunInputWithExplain, QueryRuntimeRunInputWithoutExplain, QuerySortDirection, QuerySortDirectionSchema, QuerySpec, QuerySpecSchema, QueryValidationError, QueryValidationIssue, QueryValidationIssueSchema, QueryValue, QueryVersionSchema, RegistryDefaults, RegistryDefaultsSchema, RegistryParseError, RegistryPolicy, RegistryPolicySchema, RegistryResolutionError, RegistryResolutionIssue, RegistryResolutionIssueSchema, RegistryVersionSchema, RelationDefaultsSchema, RelationKindSchema, RelationPolicy, RelationPolicySchema, ResolveRegistryError, ResolveRegistryInput, ResolvedField, ResolvedFieldSchema, ResolvedRegistry, ResolvedRegistrySchema, ResolvedRelation, ResolvedRelationSchema, ResolvedSource, ResolvedSourceSchema, SQLDialect, SQLPlan, SourceDefaultsSchema, SourcePolicy, SourcePolicySchema, ValidateQuerySpecError, ValidateQuerySpecInput, ValidatedQuerySpec, buildQueryIRResultSchema, buildQueryIRRowSchema, compileQuerySpecToSQL, compileQuerySpecToSQLEffect, compileQuerySpecToSQLPromise, createQueryRuntime, lowerQuerySpecToIR, lowerQuerySpecToIREffect, lowerQuerySpecToIRPromise, parsePhysicalRegistry, parseQueryIRResultRows, parseQuerySpec, parseRegistryDefaults, parseRegistryPolicy, parseResolvedRegistry, queryKitVersion, resolveRegistry, resolveRegistryEffect, resolveRegistryPromise, safeParsePhysicalRegistry, safeParseQueryIRResultRows, safeParseQuerySpec, safeParseRegistryDefaults, safeParseRegistryPolicy, safeParseResolvedRegistry, validateQuerySpec, validateQuerySpecEffect, validateQuerySpecPromise };
|
package/dist/effect.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { $ as safeParseRegistryDefaults, A as FieldTypeSchema, B as RelationKindSchema, C as resolveRegistryEffect, D as ExposureModeSchema, E as AggregationSchema, F as PhysicalSourceSchema, G as ResolvedSourceSchema, H as ResolvedFieldSchema, I as RegistryDefaultsSchema, J as parsePhysicalRegistry, K as SourceDefaultsSchema, L as RegistryPolicySchema, M as PhysicalRegistrySchema, N as PhysicalRelationSchema, O as FieldDefaultsSchema, P as PhysicalSourceKindSchema, Q as safeParsePhysicalRegistry, R as RegistryVersionSchema, S as resolveRegistry, T as AdapterMetaSchema, U as ResolvedRegistrySchema, V as RelationPolicySchema, W as ResolvedRelationSchema, X as parseRegistryPolicy, Y as parseRegistryDefaults, Z as parseResolvedRegistry, _ as validateQuerySpecEffect, a as parseQueryIRResultRows, at as QueryOrderBySchema, b as RegistryResolutionError, c as compileQuerySpecToSQLEffect, ct as QuerySortDirectionSchema, d as lowerQuerySpecToIREffect, dt as parseQuerySpec, et as safeParseRegistryPolicy, f as lowerQuerySpecToIRPromise, ft as safeParseQuerySpec, g as validateQuerySpec, h as QueryValidationIssueSchema, i as buildQueryIRRowSchema, it as QueryFilterSchema, j as PhysicalFieldSchema, k as FieldPolicySchema, l as compileQuerySpecToSQLPromise, lt as QuerySpecSchema, m as QueryValidationError, n as createQueryRuntime, nt as JsonValueSchema, o as safeParseQueryIRResultRows, ot as QueryParamRefSchema, p as QueryParseError, q as SourcePolicySchema, r as buildQueryIRResultSchema, rt as QueryFilterOperatorSchema, s as compileQuerySpecToSQL, st as QueryParamsSchema, t as queryKitVersion, tt as safeParseResolvedRegistry, u as lowerQuerySpecToIR, ut as QueryVersionSchema, v as validateQuerySpecPromise, w as resolveRegistryPromise, x as RegistryResolutionIssueSchema, y as RegistryParseError, z as RelationDefaultsSchema } from "./src-DGGMT7nT.js";
|
|
2
|
+
|
|
3
|
+
export { AdapterMetaSchema, AggregationSchema, ExposureModeSchema, FieldDefaultsSchema, FieldPolicySchema, FieldTypeSchema, JsonValueSchema, PhysicalFieldSchema, PhysicalRegistrySchema, PhysicalRelationSchema, PhysicalSourceKindSchema, PhysicalSourceSchema, QueryFilterOperatorSchema, QueryFilterSchema, QueryOrderBySchema, QueryParamRefSchema, QueryParamsSchema, QueryParseError, QuerySortDirectionSchema, QuerySpecSchema, QueryValidationError, QueryValidationIssueSchema, QueryVersionSchema, RegistryDefaultsSchema, RegistryParseError, RegistryPolicySchema, RegistryResolutionError, RegistryResolutionIssueSchema, RegistryVersionSchema, RelationDefaultsSchema, RelationKindSchema, RelationPolicySchema, ResolvedFieldSchema, ResolvedRegistrySchema, ResolvedRelationSchema, ResolvedSourceSchema, SourceDefaultsSchema, SourcePolicySchema, buildQueryIRResultSchema, buildQueryIRRowSchema, compileQuerySpecToSQL, compileQuerySpecToSQLEffect, compileQuerySpecToSQLPromise, createQueryRuntime, lowerQuerySpecToIR, lowerQuerySpecToIREffect, lowerQuerySpecToIRPromise, parsePhysicalRegistry, parseQueryIRResultRows, parseQuerySpec, parseRegistryDefaults, parseRegistryPolicy, parseResolvedRegistry, queryKitVersion, resolveRegistry, resolveRegistryEffect, resolveRegistryPromise, safeParsePhysicalRegistry, safeParseQueryIRResultRows, safeParseQuerySpec, safeParseRegistryDefaults, safeParseRegistryPolicy, safeParseResolvedRegistry, validateQuerySpec, validateQuerySpecEffect, validateQuerySpecPromise };
|