Open History to see the last commit
1---
2id: ConditionalSelect
3title: ConditionalSelect
4---
5
6Defined in: [packages/db/src/query/ir.ts:221](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L221)
7
8## Extends
9
10- `BaseExpression`
11
12## Constructors
13
14### Constructor
15
16```ts
17new ConditionalSelect(branches, defaultValue?): ConditionalSelect;
18```
19
20Defined in: [packages/db/src/query/ir.ts:223](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L223)
21
22#### Parameters
23
24##### branches
25
26[`ConditionalSelectBranch`](../type-aliases/ConditionalSelectBranch.md)[]
27
28##### defaultValue?
29
30[`SelectValueExpression`](../type-aliases/SelectValueExpression.md)
31
32#### Returns
33
34`ConditionalSelect`
35
36#### Overrides
37
38```ts
39BaseExpression.constructor
40```
41
42## Properties
43
44### \_\_returnType
45
46```ts
47readonly __returnType: any;
48```
49
50Defined in: [packages/db/src/query/ir.ts:78](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L78)
51
52**`Internal`**
53
54- Type brand for TypeScript inference
55
56#### Inherited from
57
58```ts
59BaseExpression.__returnType
60```
61
62***
63
64### branches
65
66```ts
67branches: ConditionalSelectBranch[];
68```
69
70Defined in: [packages/db/src/query/ir.ts:224](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L224)
71
72***
73
74### defaultValue?
75
76```ts
77optional defaultValue: SelectValueExpression;
78```
79
80Defined in: [packages/db/src/query/ir.ts:225](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L225)
81
82***
83
84### type
85
86```ts
87type: "conditionalSelect";
88```
89
90Defined in: [packages/db/src/query/ir.ts:222](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L222)
91
92#### Overrides
93
94```ts
95BaseExpression.type
96```