/*
 * This file is generated by jOOQ.
 */
package ervu_secret.ervu_secret.db_beans.pg_catalog.tables;


import ervu_secret.ervu_secret.db_beans.pg_catalog.Keys;
import ervu_secret.ervu_secret.db_beans.pg_catalog.PgCatalog;
import ervu_secret.ervu_secret.db_beans.pg_catalog.tables.records.PgAttributeRecord;

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

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.Name;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.SQL;
import org.jooq.Schema;
import org.jooq.Select;
import org.jooq.Stringly;
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;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>pg_catalog.pg_attribute</code>
     */
    public static final PgAttribute PG_ATTRIBUTE = new PgAttribute();

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

    /**
     * The column <code>pg_catalog.pg_attribute.attrelid</code>.
     */
    public final TableField<PgAttributeRecord, Long> ATTRELID = createField(DSL.name("attrelid"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attname</code>.
     */
    public final TableField<PgAttributeRecord, String> ATTNAME = createField(DSL.name("attname"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.atttypid</code>.
     */
    public final TableField<PgAttributeRecord, Long> ATTTYPID = createField(DSL.name("atttypid"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attstattarget</code>.
     */
    public final TableField<PgAttributeRecord, Integer> ATTSTATTARGET = createField(DSL.name("attstattarget"), SQLDataType.INTEGER.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attlen</code>.
     */
    public final TableField<PgAttributeRecord, Short> ATTLEN = createField(DSL.name("attlen"), SQLDataType.SMALLINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attnum</code>.
     */
    public final TableField<PgAttributeRecord, Short> ATTNUM = createField(DSL.name("attnum"), SQLDataType.SMALLINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attndims</code>.
     */
    public final TableField<PgAttributeRecord, Integer> ATTNDIMS = createField(DSL.name("attndims"), SQLDataType.INTEGER.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attcacheoff</code>.
     */
    public final TableField<PgAttributeRecord, Integer> ATTCACHEOFF = createField(DSL.name("attcacheoff"), SQLDataType.INTEGER.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.atttypmod</code>.
     */
    public final TableField<PgAttributeRecord, Integer> ATTTYPMOD = createField(DSL.name("atttypmod"), SQLDataType.INTEGER.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attbyval</code>.
     */
    public final TableField<PgAttributeRecord, Boolean> ATTBYVAL = createField(DSL.name("attbyval"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attalign</code>.
     */
    public final TableField<PgAttributeRecord, String> ATTALIGN = createField(DSL.name("attalign"), SQLDataType.CHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attstorage</code>.
     */
    public final TableField<PgAttributeRecord, String> ATTSTORAGE = createField(DSL.name("attstorage"), SQLDataType.CHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attcompression</code>.
     */
    public final TableField<PgAttributeRecord, String> ATTCOMPRESSION = createField(DSL.name("attcompression"), SQLDataType.CHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attnotnull</code>.
     */
    public final TableField<PgAttributeRecord, Boolean> ATTNOTNULL = createField(DSL.name("attnotnull"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.atthasdef</code>.
     */
    public final TableField<PgAttributeRecord, Boolean> ATTHASDEF = createField(DSL.name("atthasdef"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.atthasmissing</code>.
     */
    public final TableField<PgAttributeRecord, Boolean> ATTHASMISSING = createField(DSL.name("atthasmissing"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attidentity</code>.
     */
    public final TableField<PgAttributeRecord, String> ATTIDENTITY = createField(DSL.name("attidentity"), SQLDataType.CHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attgenerated</code>.
     */
    public final TableField<PgAttributeRecord, String> ATTGENERATED = createField(DSL.name("attgenerated"), SQLDataType.CHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attisdropped</code>.
     */
    public final TableField<PgAttributeRecord, Boolean> ATTISDROPPED = createField(DSL.name("attisdropped"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attislocal</code>.
     */
    public final TableField<PgAttributeRecord, Boolean> ATTISLOCAL = createField(DSL.name("attislocal"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attinhcount</code>.
     */
    public final TableField<PgAttributeRecord, Integer> ATTINHCOUNT = createField(DSL.name("attinhcount"), SQLDataType.INTEGER.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attcollation</code>.
     */
    public final TableField<PgAttributeRecord, Long> ATTCOLLATION = createField(DSL.name("attcollation"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attacl</code>.
     */
    public final TableField<PgAttributeRecord, String[]> ATTACL = createField(DSL.name("attacl"), SQLDataType.VARCHAR.array(), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attoptions</code>.
     */
    public final TableField<PgAttributeRecord, String[]> ATTOPTIONS = createField(DSL.name("attoptions"), SQLDataType.CLOB.array(), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attfdwoptions</code>.
     */
    public final TableField<PgAttributeRecord, String[]> ATTFDWOPTIONS = createField(DSL.name("attfdwoptions"), SQLDataType.CLOB.array(), this, "");

    /**
     * The column <code>pg_catalog.pg_attribute.attmissingval</code>.
     */
    public final TableField<PgAttributeRecord, Object[]> ATTMISSINGVAL = createField(DSL.name("attmissingval"), SQLDataType.OTHER.array(), this, "");

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

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

    /**
     * Create an aliased <code>pg_catalog.pg_attribute</code> table reference
     */
    public PgAttribute(String alias) {
        this(DSL.name(alias), PG_ATTRIBUTE);
    }

    /**
     * Create an aliased <code>pg_catalog.pg_attribute</code> table reference
     */
    public PgAttribute(Name alias) {
        this(alias, PG_ATTRIBUTE);
    }

    /**
     * Create a <code>pg_catalog.pg_attribute</code> table reference
     */
    public PgAttribute() {
        this(DSL.name("pg_attribute"), null);
    }

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

    @Override
    public UniqueKey<PgAttributeRecord> getPrimaryKey() {
        return Keys.PG_ATTRIBUTE_RELID_ATTNUM_INDEX;
    }

    @Override
    public List<UniqueKey<PgAttributeRecord>> getUniqueKeys() {
        return Arrays.asList(Keys.PG_ATTRIBUTE_RELID_ATTNAM_INDEX);
    }

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

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

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

    /**
     * Rename this table
     */
    @Override
    public PgAttribute rename(String name) {
        return new PgAttribute(DSL.name(name), null);
    }

    /**
     * Rename this table
     */
    @Override
    public PgAttribute rename(Name name) {
        return new PgAttribute(name, null);
    }

    /**
     * Rename this table
     */
    @Override
    public PgAttribute rename(Table<?> name) {
        return new PgAttribute(name.getQualifiedName(), null);
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public PgAttribute where(Condition condition) {
        return new PgAttribute(getQualifiedName(), aliased() ? this : null, null, condition);
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public PgAttribute where(Collection<? extends Condition> conditions) {
        return where(DSL.and(conditions));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public PgAttribute where(Condition... conditions) {
        return where(DSL.and(conditions));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public PgAttribute where(Field<Boolean> condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public PgAttribute where(SQL condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public PgAttribute where(@Stringly.SQL String condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public PgAttribute where(@Stringly.SQL String condition, Object... binds) {
        return where(DSL.condition(condition, binds));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public PgAttribute where(@Stringly.SQL String condition, QueryPart... parts) {
        return where(DSL.condition(condition, parts));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public PgAttribute whereExists(Select<?> select) {
        return where(DSL.exists(select));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public PgAttribute whereNotExists(Select<?> select) {
        return where(DSL.notExists(select));
    }
}
