@prisma/studio-core 0.0.0-dev.202505021044 → 0.0.0-dev.202505021059
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/chunk-LYTHOJGC.js +1 -0
- package/dist/{chunk-GNXJUBVK.js → chunk-P72NBTYE.js} +1 -1
- package/dist/data/index.cjs +1 -1
- package/dist/data/index.js +1 -1
- package/dist/data/pglite/index.cjs +1 -1
- package/dist/data/pglite/index.d.cts +6 -0
- package/dist/data/pglite/index.d.ts +6 -0
- package/dist/data/pglite/index.js +1 -1
- package/dist/data/postgres-core/index.cjs +1 -1
- package/dist/data/postgres-core/index.js +1 -1
- package/dist/ui/index.cjs +37 -37
- package/dist/ui/index.css +13 -13
- package/dist/ui/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-GM27XCQ7.js +0 -1
|
@@ -11,6 +11,12 @@ interface PGLiteExecutorOptions {
|
|
|
11
11
|
* This is useful for simulating network latency or for debugging purposes.
|
|
12
12
|
*/
|
|
13
13
|
addDelay?: number | ((query: Query) => number);
|
|
14
|
+
/**
|
|
15
|
+
* Whether to log the query and its parameters.
|
|
16
|
+
*
|
|
17
|
+
* Defaults to `false`.
|
|
18
|
+
*/
|
|
19
|
+
logging?: boolean | ((query: Query) => boolean);
|
|
14
20
|
}
|
|
15
21
|
declare function createPGLiteExecutor(pglite: PGlite, options?: PGLiteExecutorOptions): Executor;
|
|
16
22
|
interface PGLiteAdapterOptions extends PGLiteExecutorOptions {
|
|
@@ -11,6 +11,12 @@ interface PGLiteExecutorOptions {
|
|
|
11
11
|
* This is useful for simulating network latency or for debugging purposes.
|
|
12
12
|
*/
|
|
13
13
|
addDelay?: number | ((query: Query) => number);
|
|
14
|
+
/**
|
|
15
|
+
* Whether to log the query and its parameters.
|
|
16
|
+
*
|
|
17
|
+
* Defaults to `false`.
|
|
18
|
+
*/
|
|
19
|
+
logging?: boolean | ((query: Query) => boolean);
|
|
14
20
|
}
|
|
15
21
|
declare function createPGLiteExecutor(pglite: PGlite, options?: PGLiteExecutorOptions): Executor;
|
|
16
22
|
interface PGLiteAdapterOptions extends PGLiteExecutorOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as d}from"../../chunk-LYTHOJGC.js";import"../../chunk-P72NBTYE.js";import"../../chunk-BMVJYUJW.js";function b(o,n){let{addDelay:i=0,logging:a=!1}=n??{};return{execute:async(t,m)=>{let{abortSignal:s}=m||{},c,y=new Promise((e,r)=>c=r);function u(){let e=new Error("This operation was aborted");e.name="AbortError",c(e)}s?.addEventListener("abort",u);let l=typeof i=="function"?i(t):i,p=()=>o.query(t.sql,t.parameters,{rowMode:"object"}),P=l>0?()=>new Promise(e=>setTimeout(e,l)).then(()=>p()):p;try{let e=typeof a=="function"?a(t):a,r;e&&console.log("PGLiteExecutor: Executing query:",r=JSON.stringify(t,null,2));let f=Date.now(),x=await Promise.race([P(),y]),g=Date.now()-f;return e&&console.log("PGLiteExecutor: Query executed in",g,"ms:",r),[null,x.rows]}catch(e){return[e]}finally{s?.removeEventListener("abort",u)}}}}function G(o,n){return d({executor:b(o,n)})}export{G as createPGLiteAdapter,b as createPGLiteExecutor};
|