( value: SelectValueExpression | null | undefined, )
| 184 | } |
| 185 | |
| 186 | function compileSelectValue( |
| 187 | value: SelectValueExpression | null | undefined, |
| 188 | ): (row: NamespacedRow) => any { |
| 189 | if (value == null) { |
| 190 | return () => value |
| 191 | } |
| 192 | |
| 193 | if (isConditionalSelectValue(value)) { |
| 194 | if (containsAggregate(value)) { |
| 195 | return () => null |
| 196 | } |
| 197 | |
| 198 | return compileConditionalSelect(value) |
| 199 | } |
| 200 | |
| 201 | if (value instanceof ValClass) { |
| 202 | return () => value.value |
| 203 | } |
| 204 | |
| 205 | if (value.type === `includesSubquery`) { |
| 206 | return () => null |
| 207 | } |
| 208 | |
| 209 | if (isNestedSelectObject(value)) { |
| 210 | return compileSelectObject(value) |
| 211 | } |
| 212 | |
| 213 | if ( |
| 214 | isAggregateExpression(value as BasicExpression | Aggregate) || |
| 215 | containsAggregate(value as BasicExpression | Aggregate) |
| 216 | ) { |
| 217 | return () => null |
| 218 | } |
| 219 | |
| 220 | if (!isExpressionLike(value)) { |
| 221 | return () => value |
| 222 | } |
| 223 | |
| 224 | return compileExpression(value as BasicExpression) |
| 225 | } |
| 226 | |
| 227 | function compileConditionalSelect( |
| 228 | conditional: ConditionalSelect, |
no test coverage detected
searching dependent graphs…