Enum Class MysqlTypes

java.lang.Object
java.lang.Enum<MysqlTypes>
io.github.coho04.mysql.entities.enums.MysqlTypes
All Implemented Interfaces:
Serializable, Comparable<MysqlTypes>, Constable

public enum MysqlTypes extends Enum<MysqlTypes>
The MysqlTypes enum represents the different MySQL data types.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Represents a variable of type BIGINT.
    Represents a binary value.
    Enumeration representing the variable "BIT".
    Represents a BLOB (Binary Large OBject).
    The BOOLEAN enum represents the boolean MySQL data type.
    The CHAR variable represents a character type in Java.
    This is a constant variable representing a date.
    Represents a variable indicating the datetime.
    The DECIMAL enum represents the decimal MySQL data type.
    Represents a variable of type double.
    Represents a variable of data type float.
    The INT enum represents the int MySQL data type.
    The JSON enum represents the JSON MySQL data type.
    Represents a constant for the "nchar" variable.
    Represents a numeric value.
    Represents a variable of NVARCHAR data type.
    Enum variable representing the type "real".
    The SMALLINT enum represents the smallint MySQL data type.
    Represents a variable for storing text.
    Represents a variable called TIME.
    Represents the timestamp of an event or record.
    The TINYINT enum represents the tinyint MySQL data type.
    Represents a VARBINARY type in a database.
    Represents the VARCHAR data type in a database.
    This enumeration represents the available values for the "year" variable.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the MySQL type name associated with this MysqlTypes object.
    static MysqlTypes
    Returns the enum constant of this class with the specified name.
    static MysqlTypes[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • BIT

      public static final MysqlTypes BIT
      Enumeration representing the variable "BIT". This enumeration is used to represent a bit variable. The value of this enumeration is a string "bit".
    • TINYINT

      public static final MysqlTypes TINYINT
      The TINYINT enum represents the tinyint MySQL data type.

      The TINYINT data type is used to store a small integer value ranging from -128 to 127. It occupies 1 byte of storage space.

    • SMALLINT

      public static final MysqlTypes SMALLINT
      The SMALLINT enum represents the smallint MySQL data type.

      The SMALLINT data type is used to store small integer values ranging from -32768 to 32767. It occupies 2 bytes of storage space.

    • INT

      public static final MysqlTypes INT
      The INT enum represents the int MySQL data type.

      The INT data type is used to store integer values ranging from -2147483648 to 2147483647. It occupies 4 bytes of storage space.

      The INT data type is represented as 'int' in MySQL.

      See Also:
    • BIGINT

      public static final MysqlTypes BIGINT
      Represents a variable of type BIGINT. The BIGINT type in SQL is typically used to represent large integer values.
    • DECIMAL

      public static final MysqlTypes DECIMAL
      The DECIMAL enum represents the decimal MySQL data type.

      The DECIMAL data type is used to store fixed-point decimal numbers. It provides exact precision but can store a variable number of digits before and after the decimal point.

      The DECIMAL data type is represented as 'decimal' in MySQL and its storage size depends on the specified precision and scale.

      See Also:
    • NUMERIC

      public static final MysqlTypes NUMERIC
      Represents a numeric value.
    • FLOAT

      public static final MysqlTypes FLOAT
      Represents a variable of data type float.
    • REAL

      public static final MysqlTypes REAL
      Enum variable representing the type "real".
    • DOUBLE

      public static final MysqlTypes DOUBLE
      Represents a variable of type double.
    • DATE

      public static final MysqlTypes DATE
      This is a constant variable representing a date. The variable is stored as a string with the value "date". Usage example: String myDate = DATE.getValue();
    • TIME

      public static final MysqlTypes TIME
      Represents a variable called TIME.

      The variable stores a time value.

      Since:
      1.0
      See Also:
    • DATETIME

      public static final MysqlTypes DATETIME
      Represents a variable indicating the datetime.
    • TIMESTAMP

      public static final MysqlTypes TIMESTAMP
      Represents the timestamp of an event or record.

      The timestamp is a value that represents the date and time when the event or record occurred. It can be used to track the sequence and timing of events or records.

      See Also:
    • YEAR

      public static final MysqlTypes YEAR
      This enumeration represents the available values for the "year" variable.
    • CHAR

      public static final MysqlTypes CHAR
      The CHAR variable represents a character type in Java. It is used to store single characters and occupies 2 bytes in memory. The value of a CHAR variable can be any valid Unicode character. Usage: CHAR("char") Example: char myChar = CHAR.getValue();
    • VARCHAR

      public static final MysqlTypes VARCHAR
      Represents the VARCHAR data type in a database.
    • TEXT

      public static final MysqlTypes TEXT
      Represents a variable for storing text.
    • NCHAR

      public static final MysqlTypes NCHAR
      Represents a constant for the "nchar" variable.
    • NVARCHAR

      public static final MysqlTypes NVARCHAR
      Represents a variable of NVARCHAR data type.
    • BINARY

      public static final MysqlTypes BINARY
      Represents a binary value. Usage: BINARY binary = BINARY("binary"); This class can be used to store binary values and perform operations on them.
    • VARBINARY

      public static final MysqlTypes VARBINARY
      Represents a VARBINARY type in a database.

      VARBINARY is a data type that stores binary data (byte arrays) of variable length. It is often used to store images, documents, or any other binary data.

      Since:
      1.0.0
    • BLOB

      public static final MysqlTypes BLOB
      Represents a BLOB (Binary Large OBject).

      The BLOB type is used to store large binary data, such as images or documents, in a database.

      This variable represents a BLOB value named "blob".

      Since:
      1.0
    • JSON

      public static final MysqlTypes JSON
      The JSON enum represents the JSON MySQL data type.

      The JSON data type is used to store JSON (JavaScript Object Notation) data in MySQL. It can store JSON objects or arrays and supports various JSON functions and operations.

      The JSON data type is represented as 'json' in MySQL and does not have a fixed storage size.

      See Also:
    • BOOLEAN

      public static final MysqlTypes BOOLEAN
      The BOOLEAN enum represents the boolean MySQL data type.

      The BOOLEAN data type is used to store boolean values (true or false). It is represented as 'bit(1)' in MySQL and occupies 1 byte of storage space.

  • Method Details

    • values

      public static MysqlTypes[] 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 MysqlTypes 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
    • getMysqlTypeName

      public String getMysqlTypeName()
      Retrieves the MySQL type name associated with this MysqlTypes object.
      Returns:
      the MySQL type name