Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

ConditionalSelect.md

96 lines1.6 KB

1---
2id: ConditionalSelect
3title: ConditionalSelect
4---
5​
6Defined in: [packages/db/src/query/ir.ts:212](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L212)
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:214](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L214)
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:84](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L84)
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:215](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L215)
71​
72***
73​
74### defaultValue?
75​
76```ts
77optional defaultValue: SelectValueExpression;
78```
79​
80Defined in: [packages/db/src/query/ir.ts:216](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L216)
81​
82***
83​
84### type
85​
86```ts
87type: "conditionalSelect";
88```
89​
90Defined in: [packages/db/src/query/ir.ts:213](https://github.com/TanStack/db/blob/main/packages/db/src/query/ir.ts#L213)
91​
92#### Overrides
93​
94```ts
95BaseExpression.type
96```