/*
 * This file is generated by jOOQ.
 */
package org.jooq.meta.mysql.information_schema.tables;


import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.mysql.information_schema.InformationSchema;
import org.jooq.types.UInteger;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>information_schema.STATISTICS</code>
     */
    public static final Statistics STATISTICS = new Statistics();

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

    /**
     * The column <code>information_schema.STATISTICS.TABLE_CATALOG</code>.
     */
    public final TableField<Record, String> TABLE_CATALOG = createField(DSL.name("TABLE_CATALOG"), SQLDataType.VARCHAR(64).nullable(false), this, "");

    /**
     * The column <code>information_schema.STATISTICS.TABLE_SCHEMA</code>.
     */
    public final TableField<Record, String> TABLE_SCHEMA = createField(DSL.name("TABLE_SCHEMA"), SQLDataType.VARCHAR(64).nullable(false), this, "");

    /**
     * The column <code>information_schema.STATISTICS.TABLE_NAME</code>.
     */
    public final TableField<Record, String> TABLE_NAME = createField(DSL.name("TABLE_NAME"), SQLDataType.VARCHAR(64).nullable(false), this, "");

    /**
     * The column <code>information_schema.STATISTICS.NON_UNIQUE</code>.
     */
    public final TableField<Record, Integer> NON_UNIQUE = createField(DSL.name("NON_UNIQUE"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.inline("0", SQLDataType.INTEGER)), this, "");

    /**
     * The column <code>information_schema.STATISTICS.INDEX_SCHEMA</code>.
     */
    public final TableField<Record, String> INDEX_SCHEMA = createField(DSL.name("INDEX_SCHEMA"), SQLDataType.VARCHAR(64).nullable(false), this, "");

    /**
     * The column <code>information_schema.STATISTICS.INDEX_NAME</code>.
     */
    public final TableField<Record, String> INDEX_NAME = createField(DSL.name("INDEX_NAME"), SQLDataType.VARCHAR(64), this, "");

    /**
     * The column <code>information_schema.STATISTICS.SEQ_IN_INDEX</code>.
     */
    public final TableField<Record, UInteger> SEQ_IN_INDEX = createField(DSL.name("SEQ_IN_INDEX"), SQLDataType.INTEGERUNSIGNED.nullable(false), this, "");

    /**
     * The column <code>information_schema.STATISTICS.COLUMN_NAME</code>.
     */
    public final TableField<Record, String> COLUMN_NAME = createField(DSL.name("COLUMN_NAME"), SQLDataType.VARCHAR(64), this, "");

    /**
     * The column <code>information_schema.STATISTICS.COLLATION</code>.
     */
    public final TableField<Record, String> COLLATION = createField(DSL.name("COLLATION"), SQLDataType.VARCHAR(1), this, "");

    /**
     * The column <code>information_schema.STATISTICS.CARDINALITY</code>.
     */
    public final TableField<Record, Long> CARDINALITY = createField(DSL.name("CARDINALITY"), SQLDataType.BIGINT, this, "");

    /**
     * The column <code>information_schema.STATISTICS.SUB_PART</code>.
     */
    public final TableField<Record, Long> SUB_PART = createField(DSL.name("SUB_PART"), SQLDataType.BIGINT, this, "");

    /**
     * The column <code>information_schema.STATISTICS.PACKED</code>.
     */
    public final TableField<Record, byte[]> PACKED = createField(DSL.name("PACKED"), SQLDataType.BINARY, this, "");

    /**
     * The column <code>information_schema.STATISTICS.NULLABLE</code>.
     */
    public final TableField<Record, String> NULLABLE = createField(DSL.name("NULLABLE"), SQLDataType.VARCHAR(3).nullable(false).defaultValue(DSL.inline("", SQLDataType.VARCHAR)), this, "");

    /**
     * The column <code>information_schema.STATISTICS.INDEX_TYPE</code>.
     */
    public final TableField<Record, String> INDEX_TYPE = createField(DSL.name("INDEX_TYPE"), SQLDataType.VARCHAR(11).nullable(false).defaultValue(DSL.inline("", SQLDataType.VARCHAR)), this, "");

    /**
     * The column <code>information_schema.STATISTICS.COMMENT</code>.
     */
    public final TableField<Record, String> COMMENT = createField(DSL.name("COMMENT"), SQLDataType.VARCHAR(8).nullable(false).defaultValue(DSL.inline("", SQLDataType.VARCHAR)), this, "");

    /**
     * The column <code>information_schema.STATISTICS.INDEX_COMMENT</code>.
     */
    public final TableField<Record, String> INDEX_COMMENT = createField(DSL.name("INDEX_COMMENT"), SQLDataType.VARCHAR(2048).nullable(false), this, "");

    /**
     * The column <code>information_schema.STATISTICS.IS_VISIBLE</code>.
     */
    public final TableField<Record, String> IS_VISIBLE = createField(DSL.name("IS_VISIBLE"), SQLDataType.VARCHAR(3).nullable(false).defaultValue(DSL.inline("", SQLDataType.VARCHAR)), this, "");

    /**
     * The column <code>information_schema.STATISTICS.EXPRESSION</code>.
     */
    public final TableField<Record, String> EXPRESSION = createField(DSL.name("EXPRESSION"), SQLDataType.CLOB, this, "");

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

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

    /**
     * Create an aliased <code>information_schema.STATISTICS</code> table
     * reference
     */
    public Statistics(String alias) {
        this(DSL.name(alias), STATISTICS);
    }

    /**
     * Create an aliased <code>information_schema.STATISTICS</code> table
     * reference
     */
    public Statistics(Name alias) {
        this(alias, STATISTICS);
    }

    /**
     * Create a <code>information_schema.STATISTICS</code> table reference
     */
    public Statistics() {
        this(DSL.name("STATISTICS"), null);
    }

    @Override
    public Schema getSchema() {
        return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
    }

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

    @Override
    public Statistics as(Name alias) {
        return new Statistics(alias, this);
    }

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