InferenceResult

sealed class InferenceResult

Result of static type inference on a query. Can be one of:

Types

Link copied to clipboard
data class Failure(staticType: StaticType, partiqlAst: PartiqlAst.Statement, problems: List<Problem>) : StaticTypeInferencer.InferenceResult

Unsuccessful static type inference result due to at least one Problem encountered with ProblemSeverity.ERROR

Link copied to clipboard
data class Success(staticType: StaticType, problems: List<Problem>) : StaticTypeInferencer.InferenceResult

Successful static type inference result (i.e. no problems encountered with ProblemSeverity.ERROR).

Properties

Link copied to clipboard
abstract val problems: List<Problem>

List of all the Problems encountered during static type inference.

Inheritors

Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
fun StaticTypeInferencer.InferenceResult.staticTypeOrError(): StaticType

From this, returns the StaticType if and only if there are no Problems encountered with ProblemSeverity.ERROR. Otherwise, throws the first Problem with ProblemSeverity.ERROR as a SemanticException.