Skip to content

Commit

Permalink
fix: remove depecated function in exposed
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Feb 8, 2025
1 parent cba8c58 commit b4555b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions server/src/main/kotlin/org/javacs/kt/index/SymbolIndex.kt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class SymbolIndex(

init {
transaction(db) {
SchemaUtils.createMissingTablesAndColumns(Symbols, Locations, Ranges, Positions)
SchemaUtils.create(Symbols, Locations, Ranges, Positions)
}
}

Expand All @@ -111,7 +111,7 @@ class SymbolIndex(
addDeclarations(allDescriptors(module, exclusions))

val finished = System.currentTimeMillis()
val count = Symbols.selectAll().first()[Symbols.fqName.count()]
val count = Symbols.select(Symbols.fqName.count()).first()[Symbols.fqName.count()]
LOG.info("Updated full symbol index in ${finished - started} ms! (${count} symbol(s))")
}
} catch (e: Exception) {
Expand All @@ -134,7 +134,7 @@ class SymbolIndex(
addDeclarations(add)

val finished = System.currentTimeMillis()
val count = Symbols.selectAll().first()[Symbols.fqName.count()]
val count = Symbols.select(Symbols.fqName.count()).first()[Symbols.fqName.count()]
LOG.info("Updated symbol index in ${finished - started} ms! (${count} symbol(s))")
}
} catch (e: Exception) {
Expand All @@ -149,7 +149,7 @@ class SymbolIndex(

if (validFqName(descriptorFqn) && (extensionReceiverFqn?.let { validFqName(it) } != false)) {
Symbols.deleteWhere {
(Symbols.fqName eq descriptorFqn.toString()) and (Symbols.extensionReceiverType eq extensionReceiverFqn?.toString())
(fqName eq descriptorFqn.toString()) and (extensionReceiverType eq extensionReceiverFqn?.toString())
}
} else {
LOG.warn("Excluding symbol {} from index since its name is too long", descriptorFqn.toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ internal class CachedClassPathResolver(

init {
transaction(db) {
SchemaUtils.createMissingTablesAndColumns(
SchemaUtils.create(
ClassPathMetadataCache, ClassPathCacheEntry, BuildScriptClassPathCacheEntry
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DatabaseService {
db = getDbFromFile(storagePath)

val currentVersion = transaction(db) {
SchemaUtils.createMissingTablesAndColumns(DatabaseMetadata)
SchemaUtils.create(DatabaseMetadata)

DatabaseMetadataEntity.all().firstOrNull()?.version ?: 0
}
Expand Down

0 comments on commit b4555b3

Please sign in to comment.