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

import java.util.Collection;

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 PgAggregate extends TableImpl<PgAggregateRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>pg_catalog.pg_aggregate</code>
     */
    public static final PgAggregate PG_AGGREGATE = new PgAggregate();

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

    /**
     * The column <code>pg_catalog.pg_aggregate.aggfnoid</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGFNOID = createField(DSL.name("aggfnoid"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggkind</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGKIND = createField(DSL.name("aggkind"), SQLDataType.CHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggnumdirectargs</code>.
     */
    public final TableField<PgAggregateRecord, Short> AGGNUMDIRECTARGS = createField(DSL.name("aggnumdirectargs"), SQLDataType.SMALLINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggtransfn</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGTRANSFN = createField(DSL.name("aggtransfn"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggfinalfn</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGFINALFN = createField(DSL.name("aggfinalfn"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggcombinefn</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGCOMBINEFN = createField(DSL.name("aggcombinefn"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggserialfn</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGSERIALFN = createField(DSL.name("aggserialfn"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggdeserialfn</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGDESERIALFN = createField(DSL.name("aggdeserialfn"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggmtransfn</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGMTRANSFN = createField(DSL.name("aggmtransfn"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggminvtransfn</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGMINVTRANSFN = createField(DSL.name("aggminvtransfn"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggmfinalfn</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGMFINALFN = createField(DSL.name("aggmfinalfn"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggfinalextra</code>.
     */
    public final TableField<PgAggregateRecord, Boolean> AGGFINALEXTRA = createField(DSL.name("aggfinalextra"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggmfinalextra</code>.
     */
    public final TableField<PgAggregateRecord, Boolean> AGGMFINALEXTRA = createField(DSL.name("aggmfinalextra"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggfinalmodify</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGFINALMODIFY = createField(DSL.name("aggfinalmodify"), SQLDataType.CHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggmfinalmodify</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGMFINALMODIFY = createField(DSL.name("aggmfinalmodify"), SQLDataType.CHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggsortop</code>.
     */
    public final TableField<PgAggregateRecord, Long> AGGSORTOP = createField(DSL.name("aggsortop"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggtranstype</code>.
     */
    public final TableField<PgAggregateRecord, Long> AGGTRANSTYPE = createField(DSL.name("aggtranstype"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggtransspace</code>.
     */
    public final TableField<PgAggregateRecord, Integer> AGGTRANSSPACE = createField(DSL.name("aggtransspace"), SQLDataType.INTEGER.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggmtranstype</code>.
     */
    public final TableField<PgAggregateRecord, Long> AGGMTRANSTYPE = createField(DSL.name("aggmtranstype"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggmtransspace</code>.
     */
    public final TableField<PgAggregateRecord, Integer> AGGMTRANSSPACE = createField(DSL.name("aggmtransspace"), SQLDataType.INTEGER.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.agginitval</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGINITVAL = createField(DSL.name("agginitval"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_aggregate.aggminitval</code>.
     */
    public final TableField<PgAggregateRecord, String> AGGMINITVAL = createField(DSL.name("aggminitval"), SQLDataType.CLOB, this, "");

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

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

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

    /**
     * Create an aliased <code>pg_catalog.pg_aggregate</code> table reference
     */
    public PgAggregate(Name alias) {
        this(alias, PG_AGGREGATE);
    }

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

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

    @Override
    public UniqueKey<PgAggregateRecord> getPrimaryKey() {
        return Keys.PG_AGGREGATE_FNOID_INDEX;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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