( remoteTypeId: number, value: string, converter: string, )
| 315 | } |
| 316 | |
| 317 | function scalarToBoolExpr( |
| 318 | remoteTypeId: number, |
| 319 | value: string, |
| 320 | converter: string, |
| 321 | ): string | null { |
| 322 | switch (remoteTypeId) { |
| 323 | case TypeId.BOOL: |
| 324 | return value; |
| 325 | case TypeId.STRING: |
| 326 | return `${converter}.stringToBool(${value})`; |
| 327 | case TypeId.DECIMAL: |
| 328 | return `${converter}.decimalToBool(${value})`; |
| 329 | case TypeId.FLOAT16: |
| 330 | case TypeId.BFLOAT16: |
| 331 | case TypeId.FLOAT32: |
| 332 | case TypeId.FLOAT64: |
| 333 | return `${converter}.floatToBool(${value})`; |
| 334 | default: |
| 335 | return `${converter}.integerToBool(${value})`; |
| 336 | } |
| 337 | } |
| 338 | |
| 339 | function scalarToStringExpr( |
| 340 | remoteTypeId: number, |
no outgoing calls
no test coverage detected