Class SimpleCatalog.SimpleColumn
Object
gudusoft.gsqlparser.ext.calcite.catalog.impl.SimpleCatalog.SimpleColumn
- All Implemented Interfaces:
Column
- Enclosing class:
- SimpleCatalog
Simple, mutable implementation of
Column.-
Constructor Summary
ConstructorsConstructorDescriptionSimpleColumn(String name, String typeName, int ordinalPosition, boolean nullable) -
Method Summary
Modifier and TypeMethodDescriptionReturns the comment or description of the column.Returns the number of decimal digits (for numeric types).Returns the default value of the column.getName()Returns the name of the column.intReturns the ordinal position of the column in the table (1-based).getSize()Returns the column size (e.g., VARCHAR length, INTEGER precision).Returns the SQL type name of the column (e.g., "VARCHAR", "INTEGER", "DECIMAL").booleanReturns whether the column allows NULL values.setComment(String comment) Sets the comment for the column.setDecimalDigits(Integer decimalDigits) Sets the decimal digits of the column.setDefaultValue(String defaultValue) Sets the default value of the column.Sets the size of the column.
-
Constructor Details
-
SimpleColumn
-
-
Method Details
-
getName
Description copied from interface:ColumnReturns the name of the column. -
getTypeName
Description copied from interface:ColumnReturns the SQL type name of the column (e.g., "VARCHAR", "INTEGER", "DECIMAL").- Specified by:
getTypeNamein interfaceColumn- Returns:
- SQL type name
-
getOrdinalPosition
Description copied from interface:ColumnReturns the ordinal position of the column in the table (1-based).- Specified by:
getOrdinalPositionin interfaceColumn- Returns:
- Ordinal position
-
isNullable
Description copied from interface:ColumnReturns whether the column allows NULL values.- Specified by:
isNullablein interfaceColumn- Returns:
- true if nullable, false otherwise
-
getSize
Description copied from interface:ColumnReturns the column size (e.g., VARCHAR length, INTEGER precision). -
getDecimalDigits
Description copied from interface:ColumnReturns the number of decimal digits (for numeric types).- Specified by:
getDecimalDigitsin interfaceColumn- Returns:
- Decimal digits, or null if not applicable
-
getDefaultValue
Description copied from interface:ColumnReturns the default value of the column.- Specified by:
getDefaultValuein interfaceColumn- Returns:
- Default value, or null if none
-
getComment
Description copied from interface:ColumnReturns the comment or description of the column.- Specified by:
getCommentin interfaceColumn- Returns:
- Column comment, or null if none
-
setSize
Sets the size of the column.- Parameters:
size- Column size- Returns:
- This column (for chaining)
-
setDecimalDigits
Sets the decimal digits of the column.- Parameters:
decimalDigits- Decimal digits- Returns:
- This column (for chaining)
-
setDefaultValue
Sets the default value of the column.- Parameters:
defaultValue- Default value- Returns:
- This column (for chaining)
-
setComment
Sets the comment for the column.- Parameters:
comment- Column comment- Returns:
- This column (for chaining)
-