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

org.jooq.util.firebird.FirebirdDataType Maven / Gradle / Ivy

There is a newer version: 3.19.11
Show newest version
/**
 * Copyright (c) 2009-2016, Data Geekery GmbH (http://www.datageekery.com)
 * All rights reserved.
 *
 * 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.firebird;

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.DayToSecond;
import org.jooq.types.UByte;
import org.jooq.types.UInteger;
import org.jooq.types.ULong;
import org.jooq.types.UShort;
import org.jooq.types.YearToMonth;

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

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

    public static final DataType       SMALLINT              = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.SMALLINT, "smallint");
    public static final DataType     INTEGER               = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.INTEGER, "integer");
    public static final DataType     INT                   = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.INTEGER, "int");
    public static final DataType        BIGINT                = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.BIGINT, "bigint");
    public static final DataType        INT64                 = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.BIGINT, "int64");
    public static final DataType      DOUBLEPRECISION       = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.DOUBLE, "double precision");
    public static final DataType      DOUBLE                = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.DOUBLE, "double");
    public static final DataType      D_FLOAT               = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.DOUBLE, "d_float");
    public static final DataType       FLOAT                 = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.REAL, "float");
    public static final DataType     BOOLEAN               = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.BOOLEAN, "boolean");
    public static final DataType  DECIMAL               = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.DECIMAL, "decimal");
    public static final DataType  NUMERIC               = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.NUMERIC, "numeric");
    public static final DataType      VARCHAR               = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.VARCHAR, "varchar", "varchar(4000)");
    public static final DataType      CHARACTERVARYING      = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.VARCHAR, "character varying", "varchar(4000)");
    public static final DataType      CHAR                  = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.CHAR, "char");
    public static final DataType      CHARACTER             = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.CHAR, "character");
    public static final DataType      CLOB                  = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.CLOB, "blob sub_type text");
    public static final DataType        DATE                  = new DefaultDataType(SQLDialect.FIREBIRD, SQLDataType.DATE, "date");
    public static final DataType