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

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.
@@ -17,6 +17,10 @@ interface Adapter {
17
17
  * Executes a structured query against the database.
18
18
  */
19
19
  query(details: AdapterQueryDetails, options: QueryOptions): Promise<Either<Error, AdapterQueryResult>>;
20
+ /**
21
+ * Inserts a single row into the database.
22
+ */
23
+ insert(details: AdapterInsertDetails, options: QueryOptions): Promise<Either<Error, AdapterInsertResult>>;
20
24
  }
21
25
  interface BaseOptions {
22
26
  abortSignal: AbortSignal;
@@ -109,5 +113,27 @@ interface AdapterQueryResult {
109
113
  */
110
114
  rows: Record<ColumnName, unknown>[];
111
115
  }
116
+ interface AdapterInsertDetails {
117
+ /**
118
+ * The database schema where the table is located.
119
+ */
120
+ schema: string;
121
+ /**
122
+ * The name of the table to insert into.
123
+ */
124
+ table: string;
125
+ /**
126
+ * The values to insert into the table.
127
+ * - The keys should match the column names in the table.
128
+ * - The values should be the values to insert into the table.
129
+ */
130
+ row: Record<string, unknown>;
131
+ }
132
+ interface AdapterInsertResult {
133
+ /**
134
+ * The freshly inserted row data.
135
+ */
136
+ row: Record<string, unknown>;
137
+ }
112
138
 
113
- export type { Adapter as A, BaseOptions as B, Column as C, DataType as D, IntrospectOptions as I, QueryOptions as Q, Schema as S, Table as T, Introspection as a, DataTypeGroup as b, AdapterQueryDetails as c, SortOrderItem as d, SortDirection as e, AdapterQueryResult as f };
139
+ export type { Adapter as A, BaseOptions as B, Column as C, DataType as D, IntrospectOptions as I, QueryOptions as Q, Schema as S, Table as T, Introspection as a, DataTypeGroup as b, AdapterQueryDetails as c, SortOrderItem as d, SortDirection as e, AdapterQueryResult as f, AdapterInsertDetails as g, AdapterInsertResult as h };
@@ -17,6 +17,10 @@ interface Adapter {
17
17
  * Executes a structured query against the database.
18
18
  */
19
19
  query(details: AdapterQueryDetails, options: QueryOptions): Promise<Either<Error, AdapterQueryResult>>;
20
+ /**
21
+ * Inserts a single row into the database.
22
+ */
23
+ insert(details: AdapterInsertDetails, options: QueryOptions): Promise<Either<Error, AdapterInsertResult>>;
20
24
  }
21
25
  interface BaseOptions {
22
26
  abortSignal: AbortSignal;
@@ -109,5 +113,27 @@ interface AdapterQueryResult {
109
113
  */
110
114
  rows: Record<ColumnName, unknown>[];
111
115
  }
116
+ interface AdapterInsertDetails {
117
+ /**
118
+ * The database schema where the table is located.
119
+ */
120
+ schema: string;
121
+ /**
122
+ * The name of the table to insert into.
123
+ */
124
+ table: string;
125
+ /**
126
+ * The values to insert into the table.
127
+ * - The keys should match the column names in the table.
128
+ * - The values should be the values to insert into the table.
129
+ */
130
+ row: Record<string, unknown>;
131
+ }
132
+ interface AdapterInsertResult {
133
+ /**
134
+ * The freshly inserted row data.
135
+ */
136
+ row: Record<string, unknown>;
137
+ }
112
138
 
113
- export type { Adapter as A, BaseOptions as B, Column as C, DataType as D, IntrospectOptions as I, QueryOptions as Q, Schema as S, Table as T, Introspection as a, DataTypeGroup as b, AdapterQueryDetails as c, SortOrderItem as d, SortDirection as e, AdapterQueryResult as f };
139
+ export type { Adapter as A, BaseOptions as B, Column as C, DataType as D, IntrospectOptions as I, QueryOptions as Q, Schema as S, Table as T, Introspection as a, DataTypeGroup as b, AdapterQueryDetails as c, SortOrderItem as d, SortDirection as e, AdapterQueryResult as f, AdapterInsertDetails as g, AdapterInsertResult as h };