Enum Class MysqlTypes
- All Implemented Interfaces:
Serializable
,Comparable<MysqlTypes>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionRepresents 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 TypeMethodDescriptionRetrieves the MySQL type name associated with this MysqlTypes object.static MysqlTypes
Returns the enum constant of this class with the specified name.static MysqlTypes[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
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
Represents a variable of type BIGINT. The BIGINT type in SQL is typically used to represent large integer values. -
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
Represents a numeric value. -
FLOAT
Represents a variable of data type float. -
REAL
Enum variable representing the type "real". -
DOUBLE
Represents a variable of type double. -
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
Represents a variable called TIME.The variable stores a time value.
- Since:
- 1.0
- See Also:
-
DATETIME
Represents a variable indicating the datetime. -
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
This enumeration represents the available values for the "year" variable. -
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
Represents the VARCHAR data type in a database. -
TEXT
Represents a variable for storing text. -
NCHAR
Represents a constant for the "nchar" variable. -
NVARCHAR
Represents a variable of NVARCHAR data type. -
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
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
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
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
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
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
-
getMysqlTypeName
Retrieves the MySQL type name associated with this MysqlTypes object.- Returns:
- the MySQL type name
-