Class ColumnType<S>

java.lang.Object
com.ptsmods.mysqlw.table.ColumnType<S>

public class ColumnType<S> extends Object
  • Field Details

    • BOOLEAN

      public static final ColumnType<SimpleConfigurable> BOOLEAN
      Boolean type (tinyint)
      Basically the same as a TINYINT, 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

      public static final ColumnType<DynamicConfigurable<Integer>> TINYINT
      Tiny integer type (byte)
      SIGNED: -128 to 127
      UNSIGNED: 0 to 255
    • SMALLINT

      public static final ColumnType<DynamicConfigurable<Integer>> SMALLINT
      Small integer type (short)
      SIGNED: -32,768 to 32,767
      UNSIGNED: 0 to 65,535
    • MEDIUMINT

      public static final ColumnType<DynamicConfigurable<Integer>> 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

      public static final ColumnType<Function<Integer,String>> INT
      Integer type (int)
      SIGNED: -2,147,483,648 to 2,147,483,647
      UNSIGNED: 0 to 4,294,967,295
    • BIGINT

      public static final ColumnType<DynamicConfigurable<Integer>> 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

      public static final ColumnType<Dynamic2Configurable<Integer,Integer>> 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

      public static final ColumnType<Dynamic2Configurable<Integer,Integer>> 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

      public static final ColumnType<Dynamic2Configurable<Integer,Integer>> 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

      public static final ColumnType<Dynamic2Configurable<Integer,Integer>> REAL
      Synonym for DOUBLE unless the SQL option REAL_AS_FLOAT is set in which case it's a synonym for FLOAT.
      See Also:
    • DATE

      public static final ColumnType<SimpleConfigurable> 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

      public static final ColumnType<SimpleConfigurable> DATETIME
      Datetime type
      A combination of DATE and TIME.
    • TIMESTAMP

      public static final ColumnType<SimpleConfigurable> 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

      public static final ColumnType<SimpleConfigurable> 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

      public static final ColumnType<SimpleConfigurable> 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

      public static final ColumnType<DynamicConfigurable<Integer>> CHAR
      String with fixed length
      Length must be at most 255.
    • VARCHAR

      public static final ColumnType<DynamicConfigurable<Integer>> VARCHAR
      String with varying length
      Max length must be at most 65535 when using MySQL.
    • TINYTEXT

      public static final ColumnType<SimpleConfigurable> TINYTEXT
      Tiny text type
      Can store up to 255 characters.
      This type is not supported by SQLite
    • TEXT

      public static final ColumnType<SimpleConfigurable> TEXT
      Text type
      Can store up to 65,535 characters.
    • MEDIUMTEXT

      public static final ColumnType<SimpleConfigurable> MEDIUMTEXT
      Medium text type
      Can store up to 16,777,215 characters.
      This type is not supported by SQLite
    • LONGTEXT

      public static final ColumnType<SimpleConfigurable> LONGTEXT
      Long text type
      Can store up to 4,294,967,295 characters.
      This type is not supported by SQLite
    • BINARY

      public static final ColumnType<DynamicConfigurable<Integer>> BINARY
      Same as CHAR except Strings are stored as binary byte strings rather than character strings.
      This type is not supported by SQLite
    • VARBINARY

      public static final ColumnType<DynamicConfigurable<Integer>> VARBINARY
      Same as VARCHAR except Strings are stored as binary byte strings rather than character strings.
      This type is not supported by SQLite
    • UUID

      public static final ColumnType<SimpleConfigurable> UUID
      Char text type with fixed length of 36 characters, used to store UUIDs.
    • TINYBLOB

      public static final ColumnType<SimpleConfigurable> 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

      public static final ColumnType<SimpleConfigurable> 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

      public static final ColumnType<SimpleConfigurable> 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

      public static final ColumnType<SimpleConfigurable> 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

      public static final ColumnType<DynamicNConfigurable<String>> 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

      public static final ColumnType<DynamicNConfigurable<String>> 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

      public static final ColumnType<SimpleConfigurable> GEOMETRY
      Geometry type
      Can store a geometry of any type.
      This type is not supported by SQLite
    • POINT

      public static final ColumnType<SimpleConfigurable> 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

      public static final ColumnType<SimpleConfigurable> LINESTRING
      Linestring type
      A curve with linear interpolation between points.
      This type is not supported by SQLite
    • POLYGON

      public static final ColumnType<SimpleConfigurable> 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

      public static final ColumnType<SimpleConfigurable> MULTIPOINT
      Multipoint type
      A collection of points
      This type is not supported by SQLite
      See Also:
    • MULTILINESTRING

      public static final ColumnType<SimpleConfigurable> MULTILINESTRING
      Multilinestring type
      A collection of linestrings
      See Also:
    • MULTIPOLYGON

      public static final ColumnType<SimpleConfigurable> MULTIPOLYGON
      Multipolygon type
      A collection of polygons
      This type is not supported by SQLite
      See Also:
    • GEOMETRYCOLLECTION

      public static final ColumnType<SimpleConfigurable> GEOMETRYCOLLECTION
      Geometrycollection type
      A collection of geometry objects of any type
      This type is not supported by SQLite
      See Also:
    • JSON

      public static final ColumnType<SimpleConfigurable> 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

      public static final Map<String,ColumnType<?>> types
  • Method Details