@prisma/studio-core 0.0.0-dev.202504231926 → 0.0.0-dev.202504231949

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.
@@ -1,5 +1,6 @@
1
- import { A as Adapter, T as Table, a as AdapterInsertDetails, b as AdapterQueryDetails, c as AdapterUpdateDetails } from '../../adapter-BOYOEPRL.cjs';
2
- import { E as Executor, B as BuilderRequirements, Q as Query } from '../../index-CLd0EllQ.cjs';
1
+ import { A as Adapter, g as AdapterInsertDetails, c as AdapterQueryDetails } from '../../adapter-CC0i4hSp.cjs';
2
+ import { E as Executor, B as BuilderRequirements, Q as Query, a as QueryResult } from '../../executor-DbZM00RR.cjs';
3
+ import '../../type-utils-u92OZz8n.cjs';
3
4
  import 'kysely';
4
5
 
5
6
  interface PostgresAdapterRequirements {
@@ -7,15 +8,6 @@ interface PostgresAdapterRequirements {
7
8
  noParameters?: boolean;
8
9
  }
9
10
  declare function createPostgresAdapter(requirements: PostgresAdapterRequirements): Adapter;
10
- /**
11
- * For testing purposes.
12
- */
13
- declare function mockIntrospect(): {
14
- schemas: { [K in "public"]: {
15
- tables: { [T in "users"]: Table; };
16
- }; };
17
- timezone: "UTC";
18
- };
19
11
 
20
12
  /**
21
13
  * `ctid` is a system column that represents the physical location of a row in a table.
@@ -47,30 +39,7 @@ declare function getSelectQuery(details: AdapterQueryDetails, requirements?: Omi
47
39
  /**
48
40
  * For testing purposes.
49
41
  */
50
- declare function mockSelectQuery(): [{
51
- readonly created_at: Date;
52
- readonly ctid: "(0,1)";
53
- readonly deleted_at: null;
54
- readonly id: 1;
55
- readonly name: "John Doe";
56
- readonly oid: "2";
57
- readonly role: "admin";
58
- }, {
59
- readonly created_at: Date;
60
- readonly ctid: "(0,2)";
61
- readonly deleted_at: null;
62
- readonly id: 2;
63
- readonly name: "Jane Doe";
64
- readonly oid: "2";
65
- readonly role: "poweruser";
66
- }];
67
- /**
68
- * Returns a query that updates a given row in a table with given changes.
69
- */
70
- declare function getUpdateQuery(details: AdapterUpdateDetails, requirements?: Omit<BuilderRequirements, "Adapter" | "QueryCompiler">): Query<{
71
- [x: string]: unknown;
72
- ctid: `(${number},${number})`;
73
- }>;
42
+ declare function mockSelectQuery(): QueryResult<typeof getSelectQuery>;
74
43
 
75
44
  /**
76
45
  * Returns a query that returns metadata for all user-defined tables and views in the database.
@@ -87,42 +56,13 @@ declare function getTablesQuery(requirements?: Omit<BuilderRequirements, "Adapte
87
56
  /**
88
57
  * For testing purposes.
89
58
  */
90
- declare function mockTablesQuery(): [{
91
- readonly schema: "public";
92
- readonly name: "users";
93
- readonly columns: [{
94
- readonly name: "id";
95
- readonly datatype: "bigint";
96
- readonly pk: true;
97
- }, {
98
- readonly name: "name";
99
- readonly datatype: "varchar";
100
- readonly pk: false;
101
- }, {
102
- readonly name: "role";
103
- readonly datatype: "varchar";
104
- readonly pk: false;
105
- }, {
106
- readonly name: "created_at";
107
- readonly datatype: "timestamptz";
108
- readonly pk: false;
109
- }, {
110
- readonly name: "deleted_at";
111
- readonly datatype: "timestamptz";
112
- readonly pk: false;
113
- }];
114
- }];
59
+ declare function mockTablesQuery(): QueryResult<typeof getTablesQuery>;
115
60
  /**
116
61
  * Returns a query that returns the current timezone setting of the PostgreSQL database.
117
62
  */
118
63
  declare function getTimezoneQuery(): Query<{
119
64
  timezone: string;
120
65
  }>;
121
- /**
122
- * For testing purposes.
123
- */
124
- declare function mockTimezoneQuery(): [{
125
- readonly timezone: "UTC";
126
- }];
66
+ declare function mockTimezoneQuery(): QueryResult<typeof getTimezoneQuery>;
127
67
 
128
- export { type CTIDasText, type PostgresAdapterRequirements, createPostgresAdapter, getInsertQuery, getSelectQuery, getTablesQuery, getTimezoneQuery, getUpdateQuery, mockIntrospect, mockSelectQuery, mockTablesQuery, mockTimezoneQuery };
68
+ export { type CTIDasText, type PostgresAdapterRequirements, createPostgresAdapter, getInsertQuery, getSelectQuery, getTablesQuery, getTimezoneQuery, mockSelectQuery, mockTablesQuery, mockTimezoneQuery };
@@ -1,5 +1,6 @@
1
- import { A as Adapter, T as Table, a as AdapterInsertDetails, b as AdapterQueryDetails, c as AdapterUpdateDetails } from '../../adapter-BOYOEPRL.js';
2
- import { E as Executor, B as BuilderRequirements, Q as Query } from '../../index-D6voXKsD.js';
1
+ import { A as Adapter, g as AdapterInsertDetails, c as AdapterQueryDetails } from '../../adapter-nXopQslT.js';
2
+ import { E as Executor, B as BuilderRequirements, Q as Query, a as QueryResult } from '../../executor-DI7JTcqO.js';
3
+ import '../../type-utils-u92OZz8n.js';
3
4
  import 'kysely';
4
5
 
5
6
  interface PostgresAdapterRequirements {
@@ -7,15 +8,6 @@ interface PostgresAdapterRequirements {
7
8
  noParameters?: boolean;
8
9
  }
9
10
  declare function createPostgresAdapter(requirements: PostgresAdapterRequirements): Adapter;
10
- /**
11
- * For testing purposes.
12
- */
13
- declare function mockIntrospect(): {
14
- schemas: { [K in "public"]: {
15
- tables: { [T in "users"]: Table; };
16
- }; };
17
- timezone: "UTC";
18
- };
19
11
 
20
12
  /**
21
13
  * `ctid` is a system column that represents the physical location of a row in a table.
@@ -47,30 +39,7 @@ declare function getSelectQuery(details: AdapterQueryDetails, requirements?: Omi
47
39
  /**
48
40
  * For testing purposes.
49
41
  */
50
- declare function mockSelectQuery(): [{
51
- readonly created_at: Date;
52
- readonly ctid: "(0,1)";
53
- readonly deleted_at: null;
54
- readonly id: 1;
55
- readonly name: "John Doe";
56
- readonly oid: "2";
57
- readonly role: "admin";
58
- }, {
59
- readonly created_at: Date;
60
- readonly ctid: "(0,2)";
61
- readonly deleted_at: null;
62
- readonly id: 2;
63
- readonly name: "Jane Doe";
64
- readonly oid: "2";
65
- readonly role: "poweruser";
66
- }];
67
- /**
68
- * Returns a query that updates a given row in a table with given changes.
69
- */
70
- declare function getUpdateQuery(details: AdapterUpdateDetails, requirements?: Omit<BuilderRequirements, "Adapter" | "QueryCompiler">): Query<{
71
- [x: string]: unknown;
72
- ctid: `(${number},${number})`;
73
- }>;
42
+ declare function mockSelectQuery(): QueryResult<typeof getSelectQuery>;
74
43
 
75
44
  /**
76
45
  * Returns a query that returns metadata for all user-defined tables and views in the database.
@@ -87,42 +56,13 @@ declare function getTablesQuery(requirements?: Omit<BuilderRequirements, "Adapte
87
56
  /**
88
57
  * For testing purposes.
89
58
  */
90
- declare function mockTablesQuery(): [{
91
- readonly schema: "public";
92
- readonly name: "users";
93
- readonly columns: [{
94
- readonly name: "id";
95
- readonly datatype: "bigint";
96
- readonly pk: true;
97
- }, {
98
- readonly name: "name";
99
- readonly datatype: "varchar";
100
- readonly pk: false;
101
- }, {
102
- readonly name: "role";
103
- readonly datatype: "varchar";
104
- readonly pk: false;
105
- }, {
106
- readonly name: "created_at";
107
- readonly datatype: "timestamptz";
108
- readonly pk: false;
109
- }, {
110
- readonly name: "deleted_at";
111
- readonly datatype: "timestamptz";
112
- readonly pk: false;
113
- }];
114
- }];
59
+ declare function mockTablesQuery(): QueryResult<typeof getTablesQuery>;
115
60
  /**
116
61
  * Returns a query that returns the current timezone setting of the PostgreSQL database.
117
62
  */
118
63
  declare function getTimezoneQuery(): Query<{
119
64
  timezone: string;
120
65
  }>;
121
- /**
122
- * For testing purposes.
123
- */
124
- declare function mockTimezoneQuery(): [{
125
- readonly timezone: "UTC";
126
- }];
66
+ declare function mockTimezoneQuery(): QueryResult<typeof getTimezoneQuery>;
127
67
 
128
- export { type CTIDasText, type PostgresAdapterRequirements, createPostgresAdapter, getInsertQuery, getSelectQuery, getTablesQuery, getTimezoneQuery, getUpdateQuery, mockIntrospect, mockSelectQuery, mockTablesQuery, mockTimezoneQuery };
68
+ export { type CTIDasText, type PostgresAdapterRequirements, createPostgresAdapter, getInsertQuery, getSelectQuery, getTablesQuery, getTimezoneQuery, mockSelectQuery, mockTablesQuery, mockTimezoneQuery };
@@ -1 +1 @@
1
- import{a,b,c,d,e,f,g,h,i,j}from"../../chunk-O3FFLQK6.js";import"../../chunk-FM7CI5YG.js";import"../../chunk-2FW6TKD6.js";export{i as createPostgresAdapter,a as getInsertQuery,b as getSelectQuery,e as getTablesQuery,g as getTimezoneQuery,d as getUpdateQuery,j as mockIntrospect,c as mockSelectQuery,f as mockTablesQuery,h as mockTimezoneQuery};
1
+ import{a,b,c,d,e,f,g,h}from"../../chunk-M25YHYR5.js";import"../../chunk-2FW6TKD6.js";export{h as createPostgresAdapter,a as getInsertQuery,b as getSelectQuery,d as getTablesQuery,f as getTimezoneQuery,c as mockSelectQuery,e as mockTablesQuery,g as mockTimezoneQuery};
@@ -1,5 +1,5 @@
1
- import { T as Table, E as Either } from './adapter-BOYOEPRL.js';
2
- import { WhereInterface, DialectAdapter, QueryCompiler } from 'kysely';
1
+ import { DialectAdapter, QueryCompiler } from 'kysely';
2
+ import { E as Either } from './type-utils-u92OZz8n.js';
3
3
 
4
4
  interface BuilderRequirements {
5
5
  Adapter: {
@@ -17,12 +17,6 @@ interface Query<T = unknown> {
17
17
  sql: string;
18
18
  }
19
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 applyInferredFilter(row: Record<string, unknown>, columns: Table["columns"]): <QB extends WhereInterface<any, any>>(qb: QB) => QB;
26
20
 
27
21
  interface Executor {
28
22
  execute<Q extends Query>(query: Q, options?: ExecuteOptions): Promise<Either<Error, QueryResult<Q>>>;
@@ -31,4 +25,4 @@ interface ExecuteOptions {
31
25
  abortSignal?: AbortSignal;
32
26
  }
33
27
 
34
- export { type BuilderRequirements as B, type Executor as E, type Query as Q, type ExecuteOptions as a, type QueryResult as b, applyInferredFilter as c };
28
+ export type { BuilderRequirements as B, Executor as E, Query as Q, QueryResult as a, ExecuteOptions as b };
@@ -1,5 +1,5 @@
1
- import { T as Table, E as Either } from './adapter-BOYOEPRL.cjs';
2
- import { WhereInterface, DialectAdapter, QueryCompiler } from 'kysely';
1
+ import { DialectAdapter, QueryCompiler } from 'kysely';
2
+ import { E as Either } from './type-utils-u92OZz8n.cjs';
3
3
 
4
4
  interface BuilderRequirements {
5
5
  Adapter: {
@@ -17,12 +17,6 @@ interface Query<T = unknown> {
17
17
  sql: string;
18
18
  }
19
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 applyInferredFilter(row: Record<string, unknown>, columns: Table["columns"]): <QB extends WhereInterface<any, any>>(qb: QB) => QB;
26
20
 
27
21
  interface Executor {
28
22
  execute<Q extends Query>(query: Q, options?: ExecuteOptions): Promise<Either<Error, QueryResult<Q>>>;
@@ -31,4 +25,4 @@ interface ExecuteOptions {
31
25
  abortSignal?: AbortSignal;
32
26
  }
33
27
 
34
- export { type BuilderRequirements as B, type Executor as E, type Query as Q, type ExecuteOptions as a, type QueryResult as b, applyInferredFilter as c };
28
+ export type { BuilderRequirements as B, Executor as E, Query as Q, QueryResult as a, ExecuteOptions as b };