@prisma/studio-core 0.0.0-dev.202504231833 → 0.0.0-dev.202504231840

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,4 +1,4 @@
1
- import { A as Adapter, c as AdapterQueryDetails } from '../../adapter-BznP3lED.cjs';
1
+ import { A as Adapter, g as AdapterInsertDetails, c as AdapterQueryDetails } from '../../adapter-CC0i4hSp.cjs';
2
2
  import { E as Executor, B as BuilderRequirements, Q as Query, a as QueryResult } from '../../executor-DbZM00RR.cjs';
3
3
  import '../../type-utils-u92OZz8n.cjs';
4
4
  import 'kysely';
@@ -17,13 +17,24 @@ declare function createPostgresAdapter(requirements: PostgresAdapterRequirements
17
17
  * Example: '(0,23)' represents the 24th row in the first block of the table.
18
18
  */
19
19
  type CTIDasText = `(${number},${number})`;
20
+ /**
21
+ * Inserts a row into a table and returns the inserted row along with its `ctid`.
22
+ * The `ctid` is returned as a string in the format `(blockNumber, tupleIndex)`.
23
+ * This is useful for identifying the row in the table, even if it has no primary key or unique constraints.
24
+ * The `ctid` is a system column that represents the physical location of a row in a table.
25
+ */
26
+ declare function getInsertQuery(details: AdapterInsertDetails, requirements?: Omit<BuilderRequirements, "Adapter" | "QueryCompiler">): Query<{
27
+ [x: string]: unknown;
28
+ } & {
29
+ ctid: `(${number},${number})`;
30
+ }>;
20
31
  /**
21
32
  * Returns a query that selects all columns from a table, along with the `ctid` column, and unbound row count as `oid` (reserved column name that cannot conflict with user columns).
22
33
  */
23
34
  declare function getSelectQuery(details: AdapterQueryDetails, requirements?: Omit<BuilderRequirements, "Adapter" | "QueryCompiler">): Query<{
24
35
  [x: string]: unknown;
25
- oid: `${number}`;
26
36
  ctid: `(${number},${number})`;
37
+ oid: `${number}`;
27
38
  }>;
28
39
  /**
29
40
  * For testing purposes.
@@ -54,4 +65,4 @@ declare function getTimezoneQuery(): Query<{
54
65
  }>;
55
66
  declare function mockTimezoneQuery(): QueryResult<typeof getTimezoneQuery>;
56
67
 
57
- export { type CTIDasText, type PostgresAdapterRequirements, createPostgresAdapter, getSelectQuery, getTablesQuery, getTimezoneQuery, mockSelectQuery, mockTablesQuery, mockTimezoneQuery };
68
+ export { type CTIDasText, type PostgresAdapterRequirements, createPostgresAdapter, getInsertQuery, getSelectQuery, getTablesQuery, getTimezoneQuery, mockSelectQuery, mockTablesQuery, mockTimezoneQuery };
@@ -1,4 +1,4 @@
1
- import { A as Adapter, c as AdapterQueryDetails } from '../../adapter-On90Gtqe.js';
1
+ import { A as Adapter, g as AdapterInsertDetails, c as AdapterQueryDetails } from '../../adapter-nXopQslT.js';
2
2
  import { E as Executor, B as BuilderRequirements, Q as Query, a as QueryResult } from '../../executor-DI7JTcqO.js';
3
3
  import '../../type-utils-u92OZz8n.js';
4
4
  import 'kysely';
@@ -17,13 +17,24 @@ declare function createPostgresAdapter(requirements: PostgresAdapterRequirements
17
17
  * Example: '(0,23)' represents the 24th row in the first block of the table.
18
18
  */
19
19
  type CTIDasText = `(${number},${number})`;
20
+ /**
21
+ * Inserts a row into a table and returns the inserted row along with its `ctid`.
22
+ * The `ctid` is returned as a string in the format `(blockNumber, tupleIndex)`.
23
+ * This is useful for identifying the row in the table, even if it has no primary key or unique constraints.
24
+ * The `ctid` is a system column that represents the physical location of a row in a table.
25
+ */
26
+ declare function getInsertQuery(details: AdapterInsertDetails, requirements?: Omit<BuilderRequirements, "Adapter" | "QueryCompiler">): Query<{
27
+ [x: string]: unknown;
28
+ } & {
29
+ ctid: `(${number},${number})`;
30
+ }>;
20
31
  /**
21
32
  * Returns a query that selects all columns from a table, along with the `ctid` column, and unbound row count as `oid` (reserved column name that cannot conflict with user columns).
22
33
  */
23
34
  declare function getSelectQuery(details: AdapterQueryDetails, requirements?: Omit<BuilderRequirements, "Adapter" | "QueryCompiler">): Query<{
24
35
  [x: string]: unknown;
25
- oid: `${number}`;
26
36
  ctid: `(${number},${number})`;
37
+ oid: `${number}`;
27
38
  }>;
28
39
  /**
29
40
  * For testing purposes.
@@ -54,4 +65,4 @@ declare function getTimezoneQuery(): Query<{
54
65
  }>;
55
66
  declare function mockTimezoneQuery(): QueryResult<typeof getTimezoneQuery>;
56
67
 
57
- export { type CTIDasText, type PostgresAdapterRequirements, createPostgresAdapter, getSelectQuery, getTablesQuery, getTimezoneQuery, 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}from"../../chunk-WXLUXBTU.js";import"../../chunk-2FW6TKD6.js";export{g as createPostgresAdapter,a as getSelectQuery,c as getTablesQuery,e as getTimezoneQuery,b as mockSelectQuery,d as mockTablesQuery,f 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
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { A as Adapter } from '../adapter-BznP3lED.cjs';
2
+ import { A as Adapter } from '../adapter-CC0i4hSp.cjs';
3
3
  import '../type-utils-u92OZz8n.cjs';
4
4
 
5
5
  interface StudioProps {
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { A as Adapter } from '../adapter-On90Gtqe.js';
2
+ import { A as Adapter } from '../adapter-nXopQslT.js';
3
3
  import '../type-utils-u92OZz8n.js';
4
4
 
5
5
  interface StudioProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/studio-core",
3
- "version": "0.0.0-dev.202504231833",
3
+ "version": "0.0.0-dev.202504231840",
4
4
  "description": "Modular Prisma Studio components",
5
5
  "type": "module",
6
6
  "sideEffects": false,