All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jooq.util.cubrid.CUBRIDDataType Maven / Gradle / Ivy

There is a newer version: 3.19.9
Show newest version
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Other licenses:
 * -----------------------------------------------------------------------------
 * Commercial licenses for this work are available. These replace the above
 * ASL 2.0 and offer limited warranties, support, maintenance, and commercial
 * database integrations.
 *
 * For more information, please visit: http://www.jooq.org/licenses
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package org.jooq.util.cubrid;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.UUID;

import org.jooq.DataType;
import org.jooq.SQLDialect;
import org.jooq.impl.DefaultDataType;
import org.jooq.impl.SQLDataType;
import org.jooq.types.UByte;
import org.jooq.types.UInteger;
import org.jooq.types.ULong;
import org.jooq.types.UShort;

/**
 * Supported data types for the {@link SQLDialect#CUBRID} dialect
 *
 * @author Lukas Eder
 */
public class CUBRIDDataType {

    // -------------------------------------------------------------------------
    // Default SQL data types and synonyms thereof
    // -------------------------------------------------------------------------

    public static final DataType    INT                      = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.INTEGER, "int");
    public static final DataType    INTEGER                  = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.INTEGER, "integer");
    public static final DataType      SHORT                    = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.SMALLINT, "short");
    public static final DataType      SMALLINT                 = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.SMALLINT, "smallint");
    public static final DataType       BIGINT                   = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.BIGINT, "bigint");
    public static final DataType DECIMAL                  = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.DECIMAL, "decimal");
    public static final DataType DEC                      = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.DECIMAL, "dec");
    public static final DataType NUMERIC                  = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.DECIMAL, "numeric");
    public static final DataType      FLOAT                    = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.REAL, "float");
    public static final DataType      REAL                     = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.REAL, "real");
    public static final DataType     DOUBLE                   = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.DOUBLE, "double");
    public static final DataType     DOUBLEPRECISION          = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.DOUBLE, "double precision");

    public static final DataType     VARCHAR                  = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.VARCHAR, "varchar");
    public static final DataType     CHARVARYING              = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.VARCHAR, "char varying");
    public static final DataType     CHARACTERVARYING         = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.VARCHAR, "character varying");
    public static final DataType     CHAR                     = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.CHAR, "char", "varchar");
    public static final DataType     CHARACTER                = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.CHAR, "character", "varchar");
    public static final DataType     STRING                   = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.VARCHAR, "string");
    public static final DataType     NCHAR                    = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.NCHAR, "nchar");
    public static final DataType     CLOB                     = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.CLOB, "clob");

    public static final DataType       DATE                     = new DefaultDataType(SQLDialect.CUBRID, SQLDataType.DATE, "date");
    public static final DataType