MCPcopy
hub / github.com/Effect-TS/effect / run

Method run

packages/sql-clickhouse/src/ClickhouseClient.ts:164–178  ·  view source on GitHub ↗
(sql: string, params: ReadonlyArray<unknown>, format?: Clickhouse.DataFormat)

Source from the content-addressed store, hash-verified

162 }
163
164 private run(sql: string, params: ReadonlyArray<unknown>, format?: Clickhouse.DataFormat) {
165 return this.runRaw(sql, params, format).pipe(
166 Effect.flatMap((result) => {
167 if ("json" in result) {
168 return Effect.promise(() =>
169 result.json().then(
170 (result) => "data" in result ? result.data : result as any,
171 () => []
172 )
173 )
174 }
175 return Effect.succeed([])
176 })
177 )
178 }
179
180 execute(
181 sql: string,

Callers 2

executeMethod · 0.95
executeValuesMethod · 0.95

Calls 3

runRawMethod · 0.95
pipeMethod · 0.65
jsonMethod · 0.45

Tested by

no test coverage detected