import { useMutation } from "@tanstack/react-query";
import { executeQuery } from "@/lib/tauri";

export function useQueryExecution() {
  return useMutation({
    mutationFn: ({
      connectionId,
      sql,
    }: {
      connectionId: string;
      sql: string;
    }) => executeQuery(connectionId, sql),
  });
}
