Class ExpandedColumn

Object
gudusoft.gsqlparser.resolver2.expansion.ExpandedColumn

public class ExpandedColumn extends Object
Represents a column expanded from a star (*) column.

When SELECT * is expanded, each column from the source tables becomes an ExpandedColumn. This class tracks: - The column name - The original star column it came from - The source (which table/namespace) - Whether to include table qualifier

Example:

 SELECT * FROM employees
 -- Expands to:
 ExpandedColumn("id", employees.id, *, true)
 ExpandedColumn("name", employees.name, *, true)
 ExpandedColumn("salary", employees.salary, *, true)
 
  • Constructor Details

    • ExpandedColumn

      public ExpandedColumn(String columnName, ColumnSource columnSource, TResultColumn originalStarColumn, boolean includeQualifier)
      Create an expanded column from an unqualified star.
      Parameters:
      columnName - the column name
      columnSource - the column source
      originalStarColumn - the original star column
      includeQualifier - whether to include table qualifier
    • ExpandedColumn

      public ExpandedColumn(String columnName, ColumnSource columnSource, TResultColumn originalStarColumn, String tableQualifier, boolean includeQualifier)
      Create an expanded column from a qualified star (e.g., t1.*).
      Parameters:
      columnName - the column name
      columnSource - the column source
      originalStarColumn - the original star column
      tableQualifier - the table qualifier (e.g., "t1")
      includeQualifier - whether to include table qualifier
  • Method Details