MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / executeSqlHttp

Function executeSqlHttp

console/src/test/sql/materializeSqlClient.ts:43–56  ·  view source on GitHub ↗
(
  query: Q,
  options: Omit<ExecuteSqlRequest<Q>, "queries" | "queryKey"> = {},
)

Source from the content-addressed store, hash-verified

41 * Executes a compiled kysely query over http
42 */
43export async function executeSqlHttp<Q extends CompiledQuery>(
44 query: Q,
45 options: Omit<ExecuteSqlRequest<Q>, "queries" | "queryKey"> = {},
46) {
47 const {
48 internalHttp: { host, port },
49 } = inject("materializeEndpoints");
50 return executeSqlV2({
51 queries: query,
52 queryKey: [], // dummy query key, since we aren't using RQ
53 httpAddress: `${host}:${port}`,
54 ...options,
55 });
56}

Calls 1

executeSqlV2Function · 0.90

Tested by 2

createSourceFunction · 0.72
runQueryFunction · 0.72