@prisma/studio-core 0.0.0-dev.202504291843 → 0.0.0-dev.202504291931
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/{adapter-fgW3WhES.d.cts → adapter-j-6Et1B2.d.cts} +20 -2
- package/dist/{adapter-fgW3WhES.d.ts → adapter-j-6Et1B2.d.ts} +20 -2
- package/dist/chunk-7RDDMKLR.js +1 -0
- package/dist/{chunk-RGBMDID6.js → chunk-CTDYDLYG.js} +1 -1
- package/dist/data/accelerate/index.d.cts +2 -2
- package/dist/data/accelerate/index.d.ts +2 -2
- package/dist/data/bff/index.d.cts +2 -2
- package/dist/data/bff/index.d.ts +2 -2
- package/dist/data/index.cjs +1 -1
- package/dist/data/index.d.cts +2 -2
- package/dist/data/index.d.ts +2 -2
- package/dist/data/index.js +1 -1
- package/dist/data/pglite/index.cjs +1 -1
- package/dist/data/pglite/index.d.cts +2 -2
- package/dist/data/pglite/index.d.ts +2 -2
- package/dist/data/pglite/index.js +1 -1
- package/dist/data/postgres-core/index.cjs +1 -1
- package/dist/data/postgres-core/index.d.cts +8 -4
- package/dist/data/postgres-core/index.d.ts +8 -4
- package/dist/data/postgres-core/index.js +1 -1
- package/dist/{index-BersuYMP.d.cts → index-Bn0mpB7C.d.cts} +19 -6
- package/dist/{index-BzRwl_zd.d.ts → index-BxcCRvMw.d.ts} +19 -6
- package/dist/ui/index.cjs +47 -55
- package/dist/ui/index.css +0 -74
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +6 -14
- package/package.json +1 -3
- package/dist/chunk-VWL3NDHR.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as Adapter, T as Table, a as AdapterInsertDetails, b as AdapterQueryDetails, c as AdapterUpdateDetails } from '../../adapter-
|
|
2
|
-
import { E as Executor, B as BuilderRequirements, Q as Query } from '../../index-
|
|
3
|
-
import 'kysely';
|
|
1
|
+
import { A as Adapter, T as Table, a as AdapterInsertDetails, b as AdapterQueryDetails, c as AdapterUpdateDetails, d as AdapterDeleteDetails } from '../../adapter-j-6Et1B2.cjs';
|
|
2
|
+
import { E as Executor, B as BuilderRequirements, Q as Query } from '../../index-Bn0mpB7C.cjs';
|
|
3
|
+
import * as kysely from 'kysely';
|
|
4
4
|
|
|
5
5
|
interface PostgresAdapterRequirements {
|
|
6
6
|
executor: Executor;
|
|
@@ -69,6 +69,10 @@ declare function getUpdateQuery(details: AdapterUpdateDetails, requirements?: Om
|
|
|
69
69
|
ctid: `(${number},${number})`;
|
|
70
70
|
__ps_updated_at__: `${bigint}`;
|
|
71
71
|
}>;
|
|
72
|
+
/**
|
|
73
|
+
* Returns a query that deletes a given det of rows.
|
|
74
|
+
*/
|
|
75
|
+
declare function getDeleteQuery(details: AdapterDeleteDetails, requirements?: Omit<BuilderRequirements, "Adapter" | "QueryCompiler">): Query<kysely.DeleteResult>;
|
|
72
76
|
|
|
73
77
|
/**
|
|
74
78
|
* Returns a query that returns metadata for all user-defined tables and views in the database.
|
|
@@ -129,4 +133,4 @@ declare function mockTimezoneQuery(): [{
|
|
|
129
133
|
readonly timezone: "UTC";
|
|
130
134
|
}];
|
|
131
135
|
|
|
132
|
-
export { type CTIDasText, type PostgresAdapterRequirements, createPostgresAdapter, getInsertQuery, getSelectQuery, getTablesQuery, getTimezoneQuery, getUpdateQuery, mockIntrospect, mockSelectQuery, mockTablesQuery, mockTimezoneQuery };
|
|
136
|
+
export { type CTIDasText, type PostgresAdapterRequirements, createPostgresAdapter, getDeleteQuery, getInsertQuery, getSelectQuery, getTablesQuery, getTimezoneQuery, getUpdateQuery, mockIntrospect, mockSelectQuery, mockTablesQuery, mockTimezoneQuery };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as Adapter, T as Table, a as AdapterInsertDetails, b as AdapterQueryDetails, c as AdapterUpdateDetails } from '../../adapter-
|
|
2
|
-
import { E as Executor, B as BuilderRequirements, Q as Query } from '../../index-
|
|
3
|
-
import 'kysely';
|
|
1
|
+
import { A as Adapter, T as Table, a as AdapterInsertDetails, b as AdapterQueryDetails, c as AdapterUpdateDetails, d as AdapterDeleteDetails } from '../../adapter-j-6Et1B2.js';
|
|
2
|
+
import { E as Executor, B as BuilderRequirements, Q as Query } from '../../index-BxcCRvMw.js';
|
|
3
|
+
import * as kysely from 'kysely';
|
|
4
4
|
|
|
5
5
|
interface PostgresAdapterRequirements {
|
|
6
6
|
executor: Executor;
|
|
@@ -69,6 +69,10 @@ declare function getUpdateQuery(details: AdapterUpdateDetails, requirements?: Om
|
|
|
69
69
|
ctid: `(${number},${number})`;
|
|
70
70
|
__ps_updated_at__: `${bigint}`;
|
|
71
71
|
}>;
|
|
72
|
+
/**
|
|
73
|
+
* Returns a query that deletes a given det of rows.
|
|
74
|
+
*/
|
|
75
|
+
declare function getDeleteQuery(details: AdapterDeleteDetails, requirements?: Omit<BuilderRequirements, "Adapter" | "QueryCompiler">): Query<kysely.DeleteResult>;
|
|
72
76
|
|
|
73
77
|
/**
|
|
74
78
|
* Returns a query that returns metadata for all user-defined tables and views in the database.
|
|
@@ -129,4 +133,4 @@ declare function mockTimezoneQuery(): [{
|
|
|
129
133
|
readonly timezone: "UTC";
|
|
130
134
|
}];
|
|
131
135
|
|
|
132
|
-
export { type CTIDasText, type PostgresAdapterRequirements, createPostgresAdapter, getInsertQuery, getSelectQuery, getTablesQuery, getTimezoneQuery, getUpdateQuery, mockIntrospect, mockSelectQuery, mockTablesQuery, mockTimezoneQuery };
|
|
136
|
+
export { type CTIDasText, type PostgresAdapterRequirements, createPostgresAdapter, getDeleteQuery, getInsertQuery, getSelectQuery, getTablesQuery, getTimezoneQuery, getUpdateQuery, mockIntrospect, mockSelectQuery, mockTablesQuery, mockTimezoneQuery };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-7RDDMKLR.js";import"../../chunk-CTDYDLYG.js";import"../../chunk-BMVJYUJW.js";export{j as createPostgresAdapter,e as getDeleteQuery,a as getInsertQuery,b as getSelectQuery,f as getTablesQuery,h as getTimezoneQuery,d as getUpdateQuery,k as mockIntrospect,c as mockSelectQuery,g as mockTablesQuery,i as mockTimezoneQuery};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Table, E as Either } from './adapter-
|
|
1
|
+
import { T as Table, E as Either } from './adapter-j-6Et1B2.cjs';
|
|
2
2
|
import { WhereInterface, DialectAdapter, QueryCompiler } from 'kysely';
|
|
3
3
|
|
|
4
4
|
interface BuilderRequirements {
|
|
@@ -18,12 +18,25 @@ interface Query<T = unknown> {
|
|
|
18
18
|
}
|
|
19
19
|
type QueryResult<T> = T extends Query<infer R> ? R[] : T extends (...args: any[]) => Query<infer R> ? R[] : never;
|
|
20
20
|
/**
|
|
21
|
-
* Applies a filter to the given
|
|
21
|
+
* Applies a filter to the given rows based on the primary key columns of the table.
|
|
22
22
|
*
|
|
23
|
-
* @example db.selectFrom("users").$call(
|
|
23
|
+
* @example db.selectFrom("users").$call(applyInferredRowFilters(rows, columns)).selectAll()
|
|
24
24
|
*/
|
|
25
|
-
declare function
|
|
26
|
-
|
|
25
|
+
declare function applyInferredRowFilters(rows: Record<string, unknown>[], columns: Table["columns"]): <QB extends WhereInterface<any, any>>(qb: QB) => QB;
|
|
26
|
+
/**
|
|
27
|
+
* Part of a filter that predicts a match.
|
|
28
|
+
* ie. ... WHERE $ColumName = $Value ...
|
|
29
|
+
*/
|
|
30
|
+
type RowFilterPredicate = [ColumnName: string, Value: unknown];
|
|
31
|
+
/**
|
|
32
|
+
* A row filter is comprised of one or more predicates.
|
|
33
|
+
*/
|
|
34
|
+
type RowFilter = RowFilterPredicate[];
|
|
35
|
+
/**
|
|
36
|
+
* Infers the filter that is necessary to uniquely identify a given row
|
|
37
|
+
* individually.
|
|
38
|
+
*/
|
|
39
|
+
declare function inferRowFilter(row: Record<string, unknown>, columns: Table["columns"]): RowFilter;
|
|
27
40
|
|
|
28
41
|
interface Executor {
|
|
29
42
|
execute<Q extends Query>(query: Q, options?: ExecuteOptions): Promise<Either<Error, QueryResult<Q>>>;
|
|
@@ -32,4 +45,4 @@ interface ExecuteOptions {
|
|
|
32
45
|
abortSignal?: AbortSignal;
|
|
33
46
|
}
|
|
34
47
|
|
|
35
|
-
export { type BuilderRequirements as B, type Executor as E, type Query as Q, type ExecuteOptions as a, type QueryResult as b,
|
|
48
|
+
export { type BuilderRequirements as B, type Executor as E, type Query as Q, type ExecuteOptions as a, type QueryResult as b, applyInferredRowFilters as c, inferRowFilter as i };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Table, E as Either } from './adapter-
|
|
1
|
+
import { T as Table, E as Either } from './adapter-j-6Et1B2.js';
|
|
2
2
|
import { WhereInterface, DialectAdapter, QueryCompiler } from 'kysely';
|
|
3
3
|
|
|
4
4
|
interface BuilderRequirements {
|
|
@@ -18,12 +18,25 @@ interface Query<T = unknown> {
|
|
|
18
18
|
}
|
|
19
19
|
type QueryResult<T> = T extends Query<infer R> ? R[] : T extends (...args: any[]) => Query<infer R> ? R[] : never;
|
|
20
20
|
/**
|
|
21
|
-
* Applies a filter to the given
|
|
21
|
+
* Applies a filter to the given rows based on the primary key columns of the table.
|
|
22
22
|
*
|
|
23
|
-
* @example db.selectFrom("users").$call(
|
|
23
|
+
* @example db.selectFrom("users").$call(applyInferredRowFilters(rows, columns)).selectAll()
|
|
24
24
|
*/
|
|
25
|
-
declare function
|
|
26
|
-
|
|
25
|
+
declare function applyInferredRowFilters(rows: Record<string, unknown>[], columns: Table["columns"]): <QB extends WhereInterface<any, any>>(qb: QB) => QB;
|
|
26
|
+
/**
|
|
27
|
+
* Part of a filter that predicts a match.
|
|
28
|
+
* ie. ... WHERE $ColumName = $Value ...
|
|
29
|
+
*/
|
|
30
|
+
type RowFilterPredicate = [ColumnName: string, Value: unknown];
|
|
31
|
+
/**
|
|
32
|
+
* A row filter is comprised of one or more predicates.
|
|
33
|
+
*/
|
|
34
|
+
type RowFilter = RowFilterPredicate[];
|
|
35
|
+
/**
|
|
36
|
+
* Infers the filter that is necessary to uniquely identify a given row
|
|
37
|
+
* individually.
|
|
38
|
+
*/
|
|
39
|
+
declare function inferRowFilter(row: Record<string, unknown>, columns: Table["columns"]): RowFilter;
|
|
27
40
|
|
|
28
41
|
interface Executor {
|
|
29
42
|
execute<Q extends Query>(query: Q, options?: ExecuteOptions): Promise<Either<Error, QueryResult<Q>>>;
|
|
@@ -32,4 +45,4 @@ interface ExecuteOptions {
|
|
|
32
45
|
abortSignal?: AbortSignal;
|
|
33
46
|
}
|
|
34
47
|
|
|
35
|
-
export { type BuilderRequirements as B, type Executor as E, type Query as Q, type ExecuteOptions as a, type QueryResult as b,
|
|
48
|
+
export { type BuilderRequirements as B, type Executor as E, type Query as Q, type ExecuteOptions as a, type QueryResult as b, applyInferredRowFilters as c, inferRowFilter as i };
|