/*
 * This file is generated by jOOQ.
 */
package org.jooq.meta.firebird.rdb.tables;


import java.util.Arrays;
import java.util.List;

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.firebird.rdb.Keys;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Rdb$fields extends TableImpl<Record> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>RDB$FIELDS</code>
     */
    public static final Rdb$fields RDB$FIELDS = new Rdb$fields();

    /**
     * The class holding records for this type
     */
    @Override
    public Class<Record> getRecordType() {
        return Record.class;
    }

    /**
     * The column <code>RDB$FIELDS.RDB$FIELD_NAME</code>.
     */
    public final TableField<Record, String> RDB$FIELD_NAME = createField(DSL.name("RDB$FIELD_NAME"), SQLDataType.CHAR(63), this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$QUERY_NAME</code>.
     */
    public final TableField<Record, String> RDB$QUERY_NAME = createField(DSL.name("RDB$QUERY_NAME"), SQLDataType.CHAR(63), this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$VALIDATION_BLR</code>.
     */
    public final TableField<Record, byte[]> RDB$VALIDATION_BLR = createField(DSL.name("RDB$VALIDATION_BLR"), SQLDataType.BLOB, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$VALIDATION_SOURCE</code>.
     */
    public final TableField<Record, String> RDB$VALIDATION_SOURCE = createField(DSL.name("RDB$VALIDATION_SOURCE"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$COMPUTED_BLR</code>.
     */
    public final TableField<Record, byte[]> RDB$COMPUTED_BLR = createField(DSL.name("RDB$COMPUTED_BLR"), SQLDataType.BLOB, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$COMPUTED_SOURCE</code>.
     */
    public final TableField<Record, String> RDB$COMPUTED_SOURCE = createField(DSL.name("RDB$COMPUTED_SOURCE"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$DEFAULT_VALUE</code>.
     */
    public final TableField<Record, byte[]> RDB$DEFAULT_VALUE = createField(DSL.name("RDB$DEFAULT_VALUE"), SQLDataType.BLOB, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$DEFAULT_SOURCE</code>.
     */
    public final TableField<Record, String> RDB$DEFAULT_SOURCE = createField(DSL.name("RDB$DEFAULT_SOURCE"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$FIELD_LENGTH</code>.
     */
    public final TableField<Record, Short> RDB$FIELD_LENGTH = createField(DSL.name("RDB$FIELD_LENGTH"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$FIELD_SCALE</code>.
     */
    public final TableField<Record, Short> RDB$FIELD_SCALE = createField(DSL.name("RDB$FIELD_SCALE"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$FIELD_TYPE</code>.
     */
    public final TableField<Record, Short> RDB$FIELD_TYPE = createField(DSL.name("RDB$FIELD_TYPE"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$FIELD_SUB_TYPE</code>.
     */
    public final TableField<Record, Short> RDB$FIELD_SUB_TYPE = createField(DSL.name("RDB$FIELD_SUB_TYPE"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$MISSING_VALUE</code>.
     */
    public final TableField<Record, byte[]> RDB$MISSING_VALUE = createField(DSL.name("RDB$MISSING_VALUE"), SQLDataType.BLOB, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$MISSING_SOURCE</code>.
     */
    public final TableField<Record, String> RDB$MISSING_SOURCE = createField(DSL.name("RDB$MISSING_SOURCE"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$DESCRIPTION</code>.
     */
    public final TableField<Record, String> RDB$DESCRIPTION = createField(DSL.name("RDB$DESCRIPTION"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$SYSTEM_FLAG</code>.
     */
    public final TableField<Record, Short> RDB$SYSTEM_FLAG = createField(DSL.name("RDB$SYSTEM_FLAG"), SQLDataType.SMALLINT.nullable(false), this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$QUERY_HEADER</code>.
     */
    public final TableField<Record, String> RDB$QUERY_HEADER = createField(DSL.name("RDB$QUERY_HEADER"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$SEGMENT_LENGTH</code>.
     */
    public final TableField<Record, Short> RDB$SEGMENT_LENGTH = createField(DSL.name("RDB$SEGMENT_LENGTH"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$EDIT_STRING</code>.
     */
    public final TableField<Record, String> RDB$EDIT_STRING = createField(DSL.name("RDB$EDIT_STRING"), SQLDataType.VARCHAR, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$EXTERNAL_LENGTH</code>.
     */
    public final TableField<Record, Short> RDB$EXTERNAL_LENGTH = createField(DSL.name("RDB$EXTERNAL_LENGTH"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$EXTERNAL_SCALE</code>.
     */
    public final TableField<Record, Short> RDB$EXTERNAL_SCALE = createField(DSL.name("RDB$EXTERNAL_SCALE"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$EXTERNAL_TYPE</code>.
     */
    public final TableField<Record, Short> RDB$EXTERNAL_TYPE = createField(DSL.name("RDB$EXTERNAL_TYPE"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$DIMENSIONS</code>.
     */
    public final TableField<Record, Short> RDB$DIMENSIONS = createField(DSL.name("RDB$DIMENSIONS"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$NULL_FLAG</code>.
     */
    public final TableField<Record, Short> RDB$NULL_FLAG = createField(DSL.name("RDB$NULL_FLAG"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$CHARACTER_LENGTH</code>.
     */
    public final TableField<Record, Short> RDB$CHARACTER_LENGTH = createField(DSL.name("RDB$CHARACTER_LENGTH"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$COLLATION_ID</code>.
     */
    public final TableField<Record, Short> RDB$COLLATION_ID = createField(DSL.name("RDB$COLLATION_ID"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$CHARACTER_SET_ID</code>.
     */
    public final TableField<Record, Short> RDB$CHARACTER_SET_ID = createField(DSL.name("RDB$CHARACTER_SET_ID"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$FIELD_PRECISION</code>.
     */
    public final TableField<Record, Short> RDB$FIELD_PRECISION = createField(DSL.name("RDB$FIELD_PRECISION"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$SECURITY_CLASS</code>.
     */
    public final TableField<Record, String> RDB$SECURITY_CLASS = createField(DSL.name("RDB$SECURITY_CLASS"), SQLDataType.CHAR(63), this, "");

    /**
     * The column <code>RDB$FIELDS.RDB$OWNER_NAME</code>.
     */
    public final TableField<Record, String> RDB$OWNER_NAME = createField(DSL.name("RDB$OWNER_NAME"), SQLDataType.CHAR(63), this, "");

    private Rdb$fields(Name alias, Table<Record> aliased) {
        this(alias, aliased, (Field<?>[]) null, null);
    }

    private Rdb$fields(Name alias, Table<Record> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>RDB$FIELDS</code> table reference
     */
    public Rdb$fields(String alias) {
        this(DSL.name(alias), RDB$FIELDS);
    }

    /**
     * Create an aliased <code>RDB$FIELDS</code> table reference
     */
    public Rdb$fields(Name alias) {
        this(alias, RDB$FIELDS);
    }

    /**
     * Create a <code>RDB$FIELDS</code> table reference
     */
    public Rdb$fields() {
        this(DSL.name("RDB$FIELDS"), null);
    }

    @Override
    public List<UniqueKey<Record>> getUniqueKeys() {
        return Arrays.asList(Keys.RDB$INDEX_2);
    }

    @Override
    public Rdb$fields as(String alias) {
        return new Rdb$fields(DSL.name(alias), this);
    }

    @Override
    public Rdb$fields as(Name alias) {
        return new Rdb$fields(alias, this);
    }

    @Override
    public Rdb$fields as(Table<?> alias) {
        return new Rdb$fields(alias.getQualifiedName(), this);
    }
}
