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