@prisma/studio-core 0.0.0 → 0.1.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/CPIOZS5X-NALOZFPD.js +1 -0
- package/dist/OKF6E45R-6KC3BLVB.js +1 -0
- package/dist/adapter-Co8KY8Hi.d.cts +166 -0
- package/dist/adapter-Co8KY8Hi.d.ts +166 -0
- package/dist/chunk-2FW6TKD6.js +1 -0
- package/dist/chunk-5MNS4IJC.js +1332 -0
- package/dist/chunk-N2MLAUEV.js +1 -0
- package/dist/chunk-RGBMDID6.js +1 -0
- package/dist/chunk-ZCFLMQMM.js +1 -0
- package/dist/data/accelerate/index.cjs +1 -0
- package/dist/data/accelerate/index.d.cts +47 -0
- package/dist/data/accelerate/index.d.ts +47 -0
- package/dist/data/accelerate/index.js +1 -0
- package/dist/data/bff/index.cjs +1 -0
- package/dist/data/bff/index.d.cts +55 -0
- package/dist/data/bff/index.d.ts +55 -0
- package/dist/data/bff/index.js +1 -0
- package/dist/data/index.cjs +1 -1
- package/dist/data/index.d.cts +3 -2
- package/dist/data/index.d.ts +3 -2
- package/dist/data/index.js +1 -0
- package/dist/data/pglite/index.cjs +1 -0
- package/dist/data/pglite/index.d.cts +9 -0
- package/dist/data/pglite/index.d.ts +9 -0
- package/dist/data/pglite/index.js +1 -0
- package/dist/data/postgres-core/index.cjs +1 -0
- package/dist/data/postgres-core/index.d.cts +129 -0
- package/dist/data/postgres-core/index.d.ts +129 -0
- package/dist/data/postgres-core/index.js +1 -0
- package/dist/index-CnVNNyod.d.cts +35 -0
- package/dist/index-M4EjPWNJ.d.ts +35 -0
- package/dist/ui/index.cjs +1515 -1
- package/dist/ui/index.css +1854 -0
- package/dist/ui/index.d.cts +10 -2
- package/dist/ui/index.d.ts +10 -2
- package/dist/ui/index.js +186 -1
- package/package.json +121 -21
- package/data/index.ts +0 -1
- package/tsconfig.json +0 -6
- package/tsup.config.ts +0 -11
- package/ui/index.tsx +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { T as Table, E as Either } from './adapter-Co8KY8Hi.cjs';
|
|
2
|
+
import { WhereInterface, DialectAdapter, QueryCompiler } from 'kysely';
|
|
3
|
+
|
|
4
|
+
interface BuilderRequirements {
|
|
5
|
+
Adapter: {
|
|
6
|
+
new (): DialectAdapter;
|
|
7
|
+
};
|
|
8
|
+
noParameters?: boolean;
|
|
9
|
+
QueryCompiler: {
|
|
10
|
+
new (): QueryCompiler;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare const queryType: unique symbol;
|
|
14
|
+
interface Query<T = unknown> {
|
|
15
|
+
[queryType]?: T;
|
|
16
|
+
parameters: readonly unknown[];
|
|
17
|
+
sql: string;
|
|
18
|
+
}
|
|
19
|
+
type QueryResult<T> = T extends Query<infer R> ? R[] : T extends (...args: any[]) => Query<infer R> ? R[] : never;
|
|
20
|
+
/**
|
|
21
|
+
* Applies a filter to the given row based on the primary key columns of the table.
|
|
22
|
+
*
|
|
23
|
+
* @example db.selectFrom("users").$call(applyInferredFilter(row, columns)).selectAll()
|
|
24
|
+
*/
|
|
25
|
+
declare function applyInferredRowFilter(row: Record<string, unknown>, columns: Table["columns"]): <QB extends WhereInterface<any, any>>(qb: QB) => QB;
|
|
26
|
+
declare function inferRowFilter(row: Record<string, unknown>, columns: Table["columns"]): [ColumnName: string, Value: unknown][];
|
|
27
|
+
|
|
28
|
+
interface Executor {
|
|
29
|
+
execute<Q extends Query>(query: Q, options?: ExecuteOptions): Promise<Either<Error, QueryResult<Q>>>;
|
|
30
|
+
}
|
|
31
|
+
interface ExecuteOptions {
|
|
32
|
+
abortSignal?: AbortSignal;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { type BuilderRequirements as B, type Executor as E, type Query as Q, type ExecuteOptions as a, type QueryResult as b, applyInferredRowFilter as c, inferRowFilter as i };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { T as Table, E as Either } from './adapter-Co8KY8Hi.js';
|
|
2
|
+
import { WhereInterface, DialectAdapter, QueryCompiler } from 'kysely';
|
|
3
|
+
|
|
4
|
+
interface BuilderRequirements {
|
|
5
|
+
Adapter: {
|
|
6
|
+
new (): DialectAdapter;
|
|
7
|
+
};
|
|
8
|
+
noParameters?: boolean;
|
|
9
|
+
QueryCompiler: {
|
|
10
|
+
new (): QueryCompiler;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare const queryType: unique symbol;
|
|
14
|
+
interface Query<T = unknown> {
|
|
15
|
+
[queryType]?: T;
|
|
16
|
+
parameters: readonly unknown[];
|
|
17
|
+
sql: string;
|
|
18
|
+
}
|
|
19
|
+
type QueryResult<T> = T extends Query<infer R> ? R[] : T extends (...args: any[]) => Query<infer R> ? R[] : never;
|
|
20
|
+
/**
|
|
21
|
+
* Applies a filter to the given row based on the primary key columns of the table.
|
|
22
|
+
*
|
|
23
|
+
* @example db.selectFrom("users").$call(applyInferredFilter(row, columns)).selectAll()
|
|
24
|
+
*/
|
|
25
|
+
declare function applyInferredRowFilter(row: Record<string, unknown>, columns: Table["columns"]): <QB extends WhereInterface<any, any>>(qb: QB) => QB;
|
|
26
|
+
declare function inferRowFilter(row: Record<string, unknown>, columns: Table["columns"]): [ColumnName: string, Value: unknown][];
|
|
27
|
+
|
|
28
|
+
interface Executor {
|
|
29
|
+
execute<Q extends Query>(query: Q, options?: ExecuteOptions): Promise<Either<Error, QueryResult<Q>>>;
|
|
30
|
+
}
|
|
31
|
+
interface ExecuteOptions {
|
|
32
|
+
abortSignal?: AbortSignal;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { type BuilderRequirements as B, type Executor as E, type Query as Q, type ExecuteOptions as a, type QueryResult as b, applyInferredRowFilter as c, inferRowFilter as i };
|