import * as v from "../../shared/src/valita.js";
import { rowSchema } from "./data.js";
export const rowCountsByQuerySchema = v.record(v.number());
export const rowCountsBySourceSchema = v.record(rowCountsByQuerySchema);
export const rowsByQuerySchema = v.record(v.array(rowSchema));
export const rowsBySourceSchema = v.record(rowsByQuerySchema);
export const analyzeQueryResultSchema = v.object({
    warnings: v.array(v.string()),
    syncedRows: v.record(v.array(rowSchema)).optional(),
    syncedRowCount: v.number(),
    start: v.number(),
    /** @deprecated Use start + elapsed instead */
    end: v.number(),
    elapsed: v.number().optional(),
    afterPermissions: v.string().optional(),
    /** @deprecated Use readRowCountsByQuery */
    vendedRowCounts: rowCountsBySourceSchema.optional(),
    /** @deprecated Use readRows */
    vendedRows: rowsBySourceSchema.optional(),
    plans: v.record(v.array(v.string())).optional(),
    readRows: rowsBySourceSchema.optional(),
    readRowCountsByQuery: rowCountsBySourceSchema.optional(),
    readRowCount: v.number().optional(),
});
//# sourceMappingURL=analyze-query-result.js.map