(
query: Q,
options: Omit<ExecuteSqlRequest<Q>, "queries" | "queryKey"> = {},
)
| 41 | * Executes a compiled kysely query over http |
| 42 | */ |
| 43 | export 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 | } |