Enum Class ColumnType
- All Implemented Interfaces:
Serializable, Comparable<ColumnType>, Constable
Supported column types for plugin database tables.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription64-bit integer (BIGINT in PostgreSQL).Binary data (BYTEA in PostgreSQL).Boolean (BOOLEAN in PostgreSQL).Date only (DATE in PostgreSQL).Decimal number (NUMERIC in PostgreSQL).Double precision floating point (DOUBLE PRECISION in PostgreSQL).Single precision floating point (REAL in PostgreSQL).32-bit integer (INTEGER in PostgreSQL).JSON data (JSONB in PostgreSQL).16-bit integer (SMALLINT in PostgreSQL).Variable-length string (VARCHAR in PostgreSQL).Unlimited text (TEXT in PostgreSQL).Time only (TIME in PostgreSQL).Timestamp with timezone (TIMESTAMPTZ in PostgreSQL).UUID (UUID in PostgreSQL). -
Method Summary
Modifier and TypeMethodDescriptionReturns the SQL type name used in PostgreSQL for this column type.getSqlType(Integer size) Get the SQL type with size if applicable.static ColumnTypeReturns the enum constant of this class with the specified name.static ColumnType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BIGINT
64-bit integer (BIGINT in PostgreSQL). Use for IDs, large numbers, Discord snowflakes. -
INTEGER
32-bit integer (INTEGER in PostgreSQL). Use for counts, small numbers. -
SMALLINT
16-bit integer (SMALLINT in PostgreSQL). Use for very small numbers, enums. -
BOOLEAN
Boolean (BOOLEAN in PostgreSQL). Use for true/false flags. -
STRING
Variable-length string (VARCHAR in PostgreSQL). Requires size parameter. Use for short strings. -
TEXT
Unlimited text (TEXT in PostgreSQL). Use for long content, descriptions. -
TIMESTAMP
Timestamp with timezone (TIMESTAMPTZ in PostgreSQL). Use for dates and times. -
DATE
Date only (DATE in PostgreSQL). -
TIME
Time only (TIME in PostgreSQL). -
DECIMAL
Decimal number (NUMERIC in PostgreSQL). Use for precise decimal values (money, etc.). -
DOUBLE
Double precision floating point (DOUBLE PRECISION in PostgreSQL). Use for scientific calculations. -
FLOAT
Single precision floating point (REAL in PostgreSQL). -
JSON
JSON data (JSONB in PostgreSQL). Use for structured data, configurations. -
BINARY
Binary data (BYTEA in PostgreSQL). Use for small binary blobs. -
UUID
UUID (UUID in PostgreSQL). Use for unique identifiers.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getSqlType
Returns the SQL type name used in PostgreSQL for this column type.This method provides the exact PostgreSQL type that corresponds to the enum constant, such as "BIGINT", "VARCHAR", "TIMESTAMPTZ", etc.
- Returns:
- the SQL type name as a string
-
getSqlType
-