create inmem database (#3690)

This commit is contained in:
Dmitry Bushev 2022-09-07 12:59:18 +03:00 committed by GitHub
parent 0f168abbfa
commit 05a6415ec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 9 deletions

View File

@ -9,7 +9,6 @@ import org.enso.distribution.{DistributionManager, Environment, LanguageHome}
import org.enso.editions.EditionResolver
import org.enso.editions.updater.EditionManager
import org.enso.jsonrpc.JsonRpcServer
import org.enso.languageserver.boot.DeploymentType.{Azure, Desktop}
import org.enso.languageserver.capability.CapabilityRouter
import org.enso.languageserver.data._
import org.enso.languageserver.effect
@ -109,13 +108,7 @@ class MainModule(serverConfig: LanguageServerConfig, logLevel: LogLevel) {
Sha3_224VersionCalculator
log.trace("Created Version Calculator [{}].", versionCalculator)
val sqlDatabase =
DeploymentType.fromEnvironment() match {
case Desktop =>
SqlDatabase(languageServerConfig.directories.suggestionsDatabaseFile)
case Azure =>
SqlDatabase.inmem("memdb")
}
val sqlDatabase = SqlDatabase.inmem("memdb")
val suggestionsRepo = new SqlSuggestionsRepo(sqlDatabase)(system.dispatcher)
val versionsRepo = new SqlVersionsRepo(sqlDatabase)(system.dispatcher)

View File

@ -263,5 +263,5 @@ object SuggestionsVersion extends TableQuery(new SuggestionsVersionTable(_))
object SchemaVersion extends TableQuery(new SchemaVersionTable(_)) {
/** The current schema version. */
val CurrentVersion: Long = 6
val CurrentVersion: Long = 7
}