// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Expression } from "./Expression";

/**
 * Represent a CASE expression (both simple and searched forms).
 *
 * When `operand` is `Some`, this is a simple CASE (`CASE x WHEN 1 THEN ...`).
 * When `operand` is `None`, this is a searched CASE (`CASE WHEN x > 0 THEN ...`).
 * Each entry in `whens` is a `(condition, result)` pair.
 */
export type Case = { 
/**
 * The operand for simple CASE, or `None` for searched CASE.
 */
operand: Expression | null, 
/**
 * Pairs of (WHEN condition, THEN result).
 */
whens: Array<[Expression, Expression]>, 
/**
 * Optional ELSE result.
 */
else_: Expression | null, };
