UNPKG

@tanstack/optimistic

Version:

Core optimistic updates library

23 lines (22 loc) 1.28 kB
import { ConditionOperand } from './schema.js'; /** * Extracts a value from a nested row structure * @param nestedRow The nested row structure * @param columnRef The column reference (may include table.column format) * @param mainTableAlias The main table alias to check first for columns without table reference * @param joinedTableAlias The joined table alias to check second for columns without table reference * @returns The extracted value or undefined if not found */ export declare function extractValueFromNestedRow(nestedRow: Record<string, unknown>, columnRef: string, mainTableAlias?: string, joinedTableAlias?: string): unknown; /** * Evaluates an operand against a nested row structure */ export declare function evaluateOperandOnNestedRow(nestedRow: Record<string, unknown>, operand: ConditionOperand, mainTableAlias?: string, joinedTableAlias?: string): unknown; /** * Extracts a join key value from a row based on the operand * @param row The data row (not nested) * @param operand The operand to extract the key from * @param defaultTableAlias The default table alias * @returns The extracted key value */ export declare function extractJoinKey<T extends Record<string, unknown>>(row: T, operand: ConditionOperand, defaultTableAlias?: string): unknown;