SqlDelightEnvironment

class SqlDelightEnvironment(properties: SqlDelightDatabaseProperties, compilationUnit: SqlDelightCompilationUnit, verifyMigrations: Boolean, var dialect: SqlDelightDialect, moduleName: String, sourceFolders: List<File> = compilationUnit.sourceFolders .filter { it.folder.exists() && !it.dependency } .map { it.folder }, dependencyFolders: List<File> = compilationUnit.sourceFolders .filter { it.folder.exists() && it.dependency } .map { it.folder }) : SqlCoreEnvironment, SqlDelightProjectService

Mocks an intellij environment for compiling sqldelight files without an instance of intellij running.

Constructors

Link copied to clipboard
constructor(properties: SqlDelightDatabaseProperties, compilationUnit: SqlDelightCompilationUnit, verifyMigrations: Boolean, dialect: SqlDelightDialect, moduleName: String, sourceFolders: List<File> = compilationUnit.sourceFolders .filter { it.folder.exists() && !it.dependency } .map { it.folder }, dependencyFolders: List<File> = compilationUnit.sourceFolders .filter { it.folder.exists() && it.dependency } .map { it.folder })

Types

Link copied to clipboard
sealed class CompilationStatus

Properties

Link copied to clipboard
open override var dialect: SqlDelightDialect
Link copied to clipboard
open override var generateAsync: Boolean
Link copied to clipboard
val module: MockModule
Link copied to clipboard
val project: @NotNull MockProject
Link copied to clipboard

Functions

Link copied to clipboard
fun annotate(extraAnnotators: Collection<SqlCompilerAnnotator>, annotationHolder: SqlAnnotationHolder)
Link copied to clipboard
open override fun clearIndex(): Nothing
Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun fileIndex(module: Module): SqlDelightFileIndex
Link copied to clipboard
Link copied to clipboard
@JvmName(name = "forSqlFileBases")
fun forSourceFiles(action: (SqlFileBase) -> Unit)
open override fun <T : PsiFile> forSourceFiles(klass: KClass<T>, action: (T) -> Unit)
inline fun <T : PsiFile> forSourceFiles(noinline action: (T) -> Unit)
Link copied to clipboard

Run the SQLDelight compiler and return the error or success status.

Link copied to clipboard
open override fun module(vFile: VirtualFile): MockModule
Link copied to clipboard
open override fun resetIndex(): Nothing
Link copied to clipboard
open fun setDialect(dialect: SqlDelightDialect, shouldInvalidate: Boolean)