Skip to content

Commit

Permalink
Removes unused Catalogs.empty() public API
Browse files Browse the repository at this point in the history
  • Loading branch information
johnedquinn committed Dec 6, 2024
1 parent c91977f commit 0573517
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions partiql-spi/api/partiql-spi.api
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public final class org/partiql/spi/catalog/Catalog$DefaultImpls {
public abstract interface class org/partiql/spi/catalog/Catalogs {
public static final field Companion Lorg/partiql/spi/catalog/Catalogs$Companion;
public static fun builder ()Lorg/partiql/spi/catalog/Catalogs$Builder;
public static fun empty ()Lorg/partiql/spi/catalog/Catalogs;
public abstract fun getCatalog (Ljava/lang/String;Z)Lorg/partiql/spi/catalog/Catalog;
public static fun of (Ljava/util/Collection;)Lorg/partiql/spi/catalog/Catalogs;
public static fun of ([Lorg/partiql/spi/catalog/Catalog;)Lorg/partiql/spi/catalog/Catalogs;
Expand All @@ -113,7 +112,6 @@ public final class org/partiql/spi/catalog/Catalogs$Builder {

public final class org/partiql/spi/catalog/Catalogs$Companion {
public final fun builder ()Lorg/partiql/spi/catalog/Catalogs$Builder;
public final fun empty ()Lorg/partiql/spi/catalog/Catalogs;
public final fun of (Ljava/util/Collection;)Lorg/partiql/spi/catalog/Catalogs;
public final fun of ([Lorg/partiql/spi/catalog/Catalog;)Lorg/partiql/spi/catalog/Catalogs;
}
Expand Down
14 changes: 0 additions & 14 deletions partiql-spi/src/main/kotlin/org/partiql/spi/catalog/Catalogs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,6 @@ public interface Catalogs {
return builder().apply { catalogs.forEach { add(it) } }.build()
}

/**
* A catalog provider that always returns an empty catalog.
*/
@JvmStatic
public fun empty(): Catalogs = object : Catalogs {
private val EMPTY = object : Catalog {
override fun getName(): String = "empty"
override fun getTable(session: Session, name: Name): Table? = null
override fun getTable(session: Session, identifier: Identifier): Table? = null
}

override fun getCatalog(name: String, ignoreCase: Boolean): Catalog = EMPTY
}

@JvmStatic
public fun builder(): Builder = Builder()
}
Expand Down

0 comments on commit 0573517

Please sign in to comment.