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

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 PgExtension extends TableImpl<PgExtensionRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>pg_catalog.pg_extension</code>
     */
    public static final PgExtension PG_EXTENSION = new PgExtension();

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

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

    /**
     * The column <code>pg_catalog.pg_extension.extname</code>.
     */
    public final TableField<PgExtensionRecord, String> EXTNAME = createField(DSL.name("extname"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_extension.extowner</code>.
     */
    public final TableField<PgExtensionRecord, Long> EXTOWNER = createField(DSL.name("extowner"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_extension.extnamespace</code>.
     */
    public final TableField<PgExtensionRecord, Long> EXTNAMESPACE = createField(DSL.name("extnamespace"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_extension.extrelocatable</code>.
     */
    public final TableField<PgExtensionRecord, Boolean> EXTRELOCATABLE = createField(DSL.name("extrelocatable"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_extension.extversion</code>.
     */
    public final TableField<PgExtensionRecord, String> EXTVERSION = createField(DSL.name("extversion"), SQLDataType.CLOB.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_extension.extconfig</code>.
     */
    public final TableField<PgExtensionRecord, Long[]> EXTCONFIG = createField(DSL.name("extconfig"), SQLDataType.BIGINT.array(), this, "");

    /**
     * The column <code>pg_catalog.pg_extension.extcondition</code>.
     */
    public final TableField<PgExtensionRecord, String[]> EXTCONDITION = createField(DSL.name("extcondition"), SQLDataType.CLOB.array(), this, "");

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

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

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

    /**
     * Create an aliased <code>pg_catalog.pg_extension</code> table reference
     */
    public PgExtension(Name alias) {
        this(alias, PG_EXTENSION);
    }

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

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

    @Override
    public UniqueKey<PgExtensionRecord> getPrimaryKey() {
        return Keys.PG_EXTENSION_OID_INDEX;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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