TypeResolver

interface TypeResolver

Functions

Link copied to clipboard
abstract fun argumentType(parent: PsiElement, argument: SqlExpr): IntermediateType

In the context of parent, @return the type argument (which is a child expression) should have.

Link copied to clipboard
abstract fun definitionType(typeName: SqlTypeName): IntermediateType
Link copied to clipboard
abstract fun functionType(functionExpr: SqlFunctionExpr): IntermediateType?

Resolves the type of dialect specific functions

Link copied to clipboard
abstract fun queryWithResults(sqlStmt: SqlStmt): QueryWithResults?
Link copied to clipboard
abstract fun resolvedType(expr: SqlExpr): IntermediateType
Link copied to clipboard
open fun simplifyType(intermediateType: IntermediateType): IntermediateType

Enables a dialect to simplify a pure SQLDelight Intermediate Type into something the dialect can deal with natively. (ie Integer AS Boolean in SQLite can be handled without an adapter).

Extensions

Link copied to clipboard
fun TypeResolver.encapsulatingType(exprList: List<SqlExpr>, vararg typeOrder: DialectType): IntermediateType
fun TypeResolver.encapsulatingType(exprList: List<SqlExpr>, nullableIfAny: Boolean, vararg typeOrder: DialectType): IntermediateType