Class Table

java.lang.Object
org.litebridge.db.spi.Table
All Implemented Interfaces:
SelectTarget
Direct Known Subclasses:
VirtualTable

public sealed class Table extends Object implements SelectTarget permits VirtualTable
A database table with an associated catalog, schema, name, and optional alias.

This class provides functionality for handling table-related metadata and supports aliasing for the table name.

  • Constructor Details

    • Table

      public Table(@Nullable String catalog, @Nullable String schema, String name)
      Constructs a new Table with catalog, schema, and name.
      Parameters:
      catalog - the catalog name
      schema - the schema name
      name - the table name
    • Table

      public Table(String name)
      Constructs a new Table with the specified fully qualified name.
      Parameters:
      name - the fully qualified table name, e.g. "schema.table" or "catalog.schema.table"
    • Table

      public Table(Table other)
      Constructs a new Table as a copy of another table.
      Parameters:
      other - the table to copy
  • Method Details

    • catalog

      public @Nullable String catalog()
      Returns the catalog name of the table.
      Returns:
      the catalog name, or null if not specified
    • schema

      public @Nullable String schema()
      Returns the schema name of the table.
      Returns:
      the schema name, or null if not specified
    • qualifiedName

      public String qualifiedName()
      Returns the qualified name of the table (schema.name).
      Returns:
      the qualified table name
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • name

      public String name()
      Retrieve the database table name.
      Returns:
      The name of the table.
    • isVirtual

      public boolean isVirtual()