MCPcopy
hub / github.com/drizzle-team/drizzle-orm / proxyHandler

Function proxyHandler

integration-tests/tests/pg/pg-proxy.test.ts:105–118  ·  view source on GitHub ↗
(sql: string, params: any[], method: any)

Source from the content-addressed store, hash-verified

103 });
104 serverSimulator = new ServerSimulator(client);
105 const proxyHandler = async (sql: string, params: any[], method: any) => {
106 try {
107 const response = await serverSimulator.query(sql, params, method);
108
109 if (response.error !== undefined) {
110 throw response.error;
111 }
112
113 return { rows: response.data };
114 } catch (e: any) {
115 console.error('Error from pg proxy server:', e.message);
116 throw e;
117 }
118 };
119 db = proxyDrizzle(proxyHandler, {
120 logger: ENABLE_LOGGING,
121 });

Callers

nothing calls this directly

Calls 1

queryMethod · 0.45

Tested by

no test coverage detected