/*
 * 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.PgLanguageRecord;

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 PgLanguage extends TableImpl<PgLanguageRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>pg_catalog.pg_language</code>
     */
    public static final PgLanguage PG_LANGUAGE = new PgLanguage();

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

    /**
     * The column <code>pg_catalog.pg_language.oid</code>.
     */
    public final TableField<PgLanguageRecord, Long> OID = createField(DSL.name("oid"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_language.lanname</code>.
     */
    public final TableField<PgLanguageRecord, String> LANNAME = createField(DSL.name("lanname"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_language.lanowner</code>.
     */
    public final TableField<PgLanguageRecord, Long> LANOWNER = createField(DSL.name("lanowner"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_language.lanispl</code>.
     */
    public final TableField<PgLanguageRecord, Boolean> LANISPL = createField(DSL.name("lanispl"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_language.lanpltrusted</code>.
     */
    public final TableField<PgLanguageRecord, Boolean> LANPLTRUSTED = createField(DSL.name("lanpltrusted"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_language.lanplcallfoid</code>.
     */
    public final TableField<PgLanguageRecord, Long> LANPLCALLFOID = createField(DSL.name("lanplcallfoid"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_language.laninline</code>.
     */
    public final TableField<PgLanguageRecord, Long> LANINLINE = createField(DSL.name("laninline"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_language.lanvalidator</code>.
     */
    public final TableField<PgLanguageRecord, Long> LANVALIDATOR = createField(DSL.name("lanvalidator"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_language.lanacl</code>.
     */
    public final TableField<PgLanguageRecord, String[]> LANACL = createField(DSL.name("lanacl"), SQLDataType.VARCHAR.array(), this, "");

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

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

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

    /**
     * Create an aliased <code>pg_catalog.pg_language</code> table reference
     */
    public PgLanguage(Name alias) {
        this(alias, PG_LANGUAGE);
    }

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

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

    @Override
    public UniqueKey<PgLanguageRecord> getPrimaryKey() {
        return Keys.PG_LANGUAGE_OID_INDEX;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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