Package com.ptsmods.mysqlw.table
Class ColumnType<S>
java.lang.Object
com.ptsmods.mysqlw.table.ColumnType<S>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ColumnType<DynamicConfigurable<Integer>>
Big integer type (long)
SIGNED: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
UNSIGNED: 0 to 18,446,744,073,709,551,615static final ColumnType<DynamicConfigurable<Integer>>
Same asCHAR
except Strings are stored as binary byte strings rather than character strings.static final ColumnType<SimpleConfigurable>
Binary Large OBject
Max size:65,635 bytes
Used for storing various types of files, s.a.static final ColumnType<SimpleConfigurable>
Boolean type (tinyint)
Basically the same as aTINYINT
, but with a length of 1.
Gets treated as a boolean by MySQL and the MySQL connector.static final ColumnType<DynamicConfigurable<Integer>>
String with fixed length
Length must be at most 255.static final ColumnType<SimpleConfigurable>
Date type
A date that supports a value anywhere between 1000-01-01 and 9999-12-31.
Format of its String representation is yyyy-mm-dd.static final ColumnType<SimpleConfigurable>
static final ColumnType<Dynamic2Configurable<Integer,
Integer>> Big decimal type (BigDecimal)
Fixed point
Accurate up to 30 decimal places and up to 65 digits.
By default, accurate up to 0 decimals and 10 digits.
Allowed values: -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38static final ColumnType<Dynamic2Configurable<Integer,
Integer>> Regular decimal type (double)
Accurate up to around 16 decimal places.
Allowed values: -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38static final ColumnType<DynamicNConfigurable<String>>
Enum type
Can only hold the values given when the table was created (can be altered), the index corresponding with a value or the error value (empty string or 0).
Can hold up to 65,635 different values.static final ColumnType<Dynamic2Configurable<Integer,
Integer>> Small decimal type (float)
Accurate up to around 7 decimal places.
Allowed values: -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38static final ColumnType<SimpleConfigurable>
Geometry type
Can store a geometry of any type.static final ColumnType<SimpleConfigurable>
Geometrycollection type
A collection of geometry objects of any type
This type is not supported by SQLitestatic final ColumnType<Function<Integer,
String>> Integer type (int)
SIGNED: -2,147,483,648 to 2,147,483,647
UNSIGNED: 0 to 4,294,967,295static final ColumnType<SimpleConfigurable>
JSON type
Just a string, but it's supposed to resemble JSON data, and you can do cool tricks when selecting using JSON_CONTAINS.static final ColumnType<SimpleConfigurable>
Linestring type
A curve with linear interpolation between points.static final ColumnType<SimpleConfigurable>
Long Binary Large OBject
Max size: 4,294,967,295 bytes
Used for storing various types of files, s.a.static final ColumnType<SimpleConfigurable>
Long text type
Can store up to 4,294,967,295 characters.static final ColumnType<SimpleConfigurable>
Medium Binary Large OBject
Max size: 16,777,215 bytes
Used for storing various types of files, s.a.static final ColumnType<DynamicConfigurable<Integer>>
Medium integer type (no Java equivalent, 24-bit integer)
SIGNED: -8,388,608 to 8,388,607
UNSIGNED: 0 to 16,777,215static final ColumnType<SimpleConfigurable>
Medium text type
Can store up to 16,777,215 characters.static final ColumnType<SimpleConfigurable>
Multilinestring type
A collection of linestringsstatic final ColumnType<SimpleConfigurable>
Multipoint type
A collection of points
This type is not supported by SQLitestatic final ColumnType<SimpleConfigurable>
Multipolygon type
A collection of polygons
This type is not supported by SQLitestatic final ColumnType<SimpleConfigurable>
Point type
Holds a coordinate with an X and Y value (and more dimensions of you choose to).static final ColumnType<SimpleConfigurable>
Polygon type
You know what a polygon is, right?
If not, it's basically any 2D shape with straight lines.static final ColumnType<Dynamic2Configurable<Integer,
Integer>> static final ColumnType<DynamicNConfigurable<String>>
Set type
Same as enum, but can only hold up to 64 different values, does not have an error type (so it can hold empty strings) and cannot hold indexes corresponding with a value.
So it can only hold the values given when initialised.static final ColumnType<DynamicConfigurable<Integer>>
Small integer type (short)
SIGNED: -32,768 to 32,767
UNSIGNED: 0 to 65,535static final ColumnType<SimpleConfigurable>
Text type
Can store up to 65,535 characters.static final ColumnType<SimpleConfigurable>
Time type
Holds just a time in the format hh:mm:ss.
Supported range is -838:59:59 to 838:59:59.static final ColumnType<SimpleConfigurable>
Timestamp type
Stored as an integer of seconds since epoch.
Contains a date and time.
Supported range is 1970-01-01 00:00:01 UTC to 2038-01-09 03:14:07 UTC.static final ColumnType<SimpleConfigurable>
Tiny Binary Large OBject
Max size: 255 bytes
Used for storing various types of files, s.a.static final ColumnType<DynamicConfigurable<Integer>>
Tiny integer type (byte)
SIGNED: -128 to 127
UNSIGNED: 0 to 255static final ColumnType<SimpleConfigurable>
Tiny text type
Can store up to 255 characters.static final Map<String,
ColumnType<?>> static final ColumnType<SimpleConfigurable>
Char text type with fixed length of 36 characters, used to storeUUID
s.static final ColumnType<DynamicConfigurable<Integer>>
Same asVARCHAR
except Strings are stored as binary byte strings rather than character strings.static final ColumnType<DynamicConfigurable<Integer>>
String with varying length
Max length must be at most 65535 when using MySQL.static final ColumnType<SimpleConfigurable>
Year type
A year stored with either four (default) or two digits.
YEAR(2) is deprecated and no longer supported, so this library does not support it either. -
Method Summary
-
Field Details
-
BOOLEAN
Boolean type (tinyint)
Basically the same as aTINYINT
, but with a length of 1.
Gets treated as a boolean by MySQL and the MySQL connector. (Possibly also SQLite, but this is untested) -
TINYINT
Tiny integer type (byte)
SIGNED: -128 to 127
UNSIGNED: 0 to 255 -
SMALLINT
Small integer type (short)
SIGNED: -32,768 to 32,767
UNSIGNED: 0 to 65,535 -
MEDIUMINT
Medium integer type (no Java equivalent, 24-bit integer)
SIGNED: -8,388,608 to 8,388,607
UNSIGNED: 0 to 16,777,215 -
INT
Integer type (int)
SIGNED: -2,147,483,648 to 2,147,483,647
UNSIGNED: 0 to 4,294,967,295 -
BIGINT
Big integer type (long)
SIGNED: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
UNSIGNED: 0 to 18,446,744,073,709,551,615 -
FLOAT
Small decimal type (float)
Accurate up to around 7 decimal places.
Allowed values: -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38 -
DOUBLE
Regular decimal type (double)
Accurate up to around 16 decimal places.
Allowed values: -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38 -
DECIMAL
Big decimal type (BigDecimal)
Fixed point
Accurate up to 30 decimal places and up to 65 digits.
By default, accurate up to 0 decimals and 10 digits.
Allowed values: -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38 -
REAL
-
DATE
Date type
A date that supports a value anywhere between 1000-01-01 and 9999-12-31.
Format of its String representation is yyyy-mm-dd. -
DATETIME
-
TIMESTAMP
Timestamp type
Stored as an integer of seconds since epoch.
Contains a date and time.
Supported range is 1970-01-01 00:00:01 UTC to 2038-01-09 03:14:07 UTC.
This type is not supported by SQLite -
TIME
Time type
Holds just a time in the format hh:mm:ss.
Supported range is -838:59:59 to 838:59:59.
This type is not supported by SQLite -
YEAR
Year type
A year stored with either four (default) or two digits.
YEAR(2) is deprecated and no longer supported, so this library does not support it either.
This type is not supported by SQLite -
CHAR
String with fixed length
Length must be at most 255. -
VARCHAR
String with varying length
Max length must be at most 65535 when using MySQL. -
TINYTEXT
Tiny text type
Can store up to 255 characters.
This type is not supported by SQLite -
TEXT
Text type
Can store up to 65,535 characters. -
MEDIUMTEXT
Medium text type
Can store up to 16,777,215 characters.
This type is not supported by SQLite -
LONGTEXT
Long text type
Can store up to 4,294,967,295 characters.
This type is not supported by SQLite -
BINARY
Same asCHAR
except Strings are stored as binary byte strings rather than character strings.
This type is not supported by SQLite -
VARBINARY
Same asVARCHAR
except Strings are stored as binary byte strings rather than character strings.
This type is not supported by SQLite -
UUID
Char text type with fixed length of 36 characters, used to storeUUID
s. -
TINYBLOB
Tiny Binary Large OBject
Max size: 255 bytes
Used for storing various types of files, s.a. pictures and audio or even video.
This type is not supported by SQLite -
BLOB
Binary Large OBject
Max size:65,635 bytes
Used for storing various types of files, s.a. pictures and audio or even video. -
MEDIUMBLOB
Medium Binary Large OBject
Max size: 16,777,215 bytes
Used for storing various types of files, s.a. pictures and audio or even video.
This type is not supported by SQLite -
LONGBLOB
Long Binary Large OBject
Max size: 4,294,967,295 bytes
Used for storing various types of files, s.a. pictures and audio or even video.
This type is not supported by SQLite -
ENUM
Enum type
Can only hold the values given when the table was created (can be altered), the index corresponding with a value or the error value (empty string or 0).
Can hold up to 65,635 different values.
This type is not supported by SQLite -
SET
Set type
Same as enum, but can only hold up to 64 different values, does not have an error type (so it can hold empty strings) and cannot hold indexes corresponding with a value.
So it can only hold the values given when initialised.
This type is not supported by SQLite -
GEOMETRY
Geometry type
Can store a geometry of any type.
This type is not supported by SQLite -
POINT
Point type
Holds a coordinate with an X and Y value (and more dimensions of you choose to).
This type is not supported by SQLite -
LINESTRING
Linestring type
A curve with linear interpolation between points.
This type is not supported by SQLite -
POLYGON
Polygon type
You know what a polygon is, right?
If not, it's basically any 2D shape with straight lines.
This type is not supported by SQLite -
MULTIPOINT
Multipoint type
A collection of points
This type is not supported by SQLite- See Also:
-
MULTILINESTRING
Multilinestring type
A collection of linestrings- See Also:
-
MULTIPOLYGON
Multipolygon type
A collection of polygons
This type is not supported by SQLite- See Also:
-
GEOMETRYCOLLECTION
Geometrycollection type
A collection of geometry objects of any type
This type is not supported by SQLite- See Also:
-
JSON
JSON type
Just a string, but it's supposed to resemble JSON data, and you can do cool tricks when selecting using JSON_CONTAINS.
This type is not supported by SQLite -
types
-
-
Method Details
-
getName
-
getSupplier
Deprecated. -
getTypeSpecificSupplier
-
createStructure
Deprecated.Use the shorthandstruct()
instead.- Returns:
- A new
ColumnStructure
for this type
-
struct
- Returns:
- A new
ColumnStructure
for this type
-
struct()
instead.