Enum Class QueryColumnType

java.lang.Object
java.lang.Enum<QueryColumnType>
ortus.boxlang.runtime.types.QueryColumnType
All Implemented Interfaces:
Serializable, Comparable<QueryColumnType>, Constable

public enum QueryColumnType extends Enum<QueryColumnType>
Represents a column type in a Query object.
  • Enum Constant Details

  • Field Details

    • sqlType

      public final int sqlType
      The SQL type associated with this QueryColumnType.
  • Method Details

    • values

      public static QueryColumnType[] 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

      public static QueryColumnType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromString

      public static QueryColumnType fromString(String type)
      Create a new QueryColumnType from a string value.
    • toString

      public String toString()
      Retrieve this QueryColumnType as a string value.
      Overrides:
      toString in class Enum<QueryColumnType>
    • fromSQLType

      public static QueryColumnType fromSQLType(int type)
      Acquire a QueryColumnType from a SQL type. Useful for assembling Query objects from JDBC result sets.
      Parameters:
      type - The SQL type to convert.
      Returns:
      The QueryColumnType corresponding to the SQL type.
    • toSQLType

      public static Object toSQLType(QueryColumnType type, Object value, IBoxContext context)
      Convert a value to the appropriate SQL type.

      Parameters:
      type - The query column type to convert to.
      value - The value to convert.
      context - The context in which the conversion is taking place. Useful for localization.
    • isStringType

      public static boolean isStringType(QueryColumnType type)
      Does this represent a type that can be treated as a string?
      Parameters:
      type - The type to check.
      Returns:
      true if the type can be treated as a string.