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

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 PgOperator extends TableImpl<PgOperatorRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>pg_catalog.pg_operator</code>
     */
    public static final PgOperator PG_OPERATOR = new PgOperator();

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

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

    /**
     * The column <code>pg_catalog.pg_operator.oprname</code>.
     */
    public final TableField<PgOperatorRecord, String> OPRNAME = createField(DSL.name("oprname"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprnamespace</code>.
     */
    public final TableField<PgOperatorRecord, Long> OPRNAMESPACE = createField(DSL.name("oprnamespace"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprowner</code>.
     */
    public final TableField<PgOperatorRecord, Long> OPROWNER = createField(DSL.name("oprowner"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprkind</code>.
     */
    public final TableField<PgOperatorRecord, String> OPRKIND = createField(DSL.name("oprkind"), SQLDataType.CHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprcanmerge</code>.
     */
    public final TableField<PgOperatorRecord, Boolean> OPRCANMERGE = createField(DSL.name("oprcanmerge"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprcanhash</code>.
     */
    public final TableField<PgOperatorRecord, Boolean> OPRCANHASH = createField(DSL.name("oprcanhash"), SQLDataType.BOOLEAN.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprleft</code>.
     */
    public final TableField<PgOperatorRecord, Long> OPRLEFT = createField(DSL.name("oprleft"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprright</code>.
     */
    public final TableField<PgOperatorRecord, Long> OPRRIGHT = createField(DSL.name("oprright"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprresult</code>.
     */
    public final TableField<PgOperatorRecord, Long> OPRRESULT = createField(DSL.name("oprresult"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprcom</code>.
     */
    public final TableField<PgOperatorRecord, Long> OPRCOM = createField(DSL.name("oprcom"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprnegate</code>.
     */
    public final TableField<PgOperatorRecord, Long> OPRNEGATE = createField(DSL.name("oprnegate"), SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprcode</code>.
     */
    public final TableField<PgOperatorRecord, String> OPRCODE = createField(DSL.name("oprcode"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprrest</code>.
     */
    public final TableField<PgOperatorRecord, String> OPRREST = createField(DSL.name("oprrest"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>pg_catalog.pg_operator.oprjoin</code>.
     */
    public final TableField<PgOperatorRecord, String> OPRJOIN = createField(DSL.name("oprjoin"), SQLDataType.VARCHAR.nullable(false), this, "");

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

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

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

    /**
     * Create an aliased <code>pg_catalog.pg_operator</code> table reference
     */
    public PgOperator(Name alias) {
        this(alias, PG_OPERATOR);
    }

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

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

    @Override
    public UniqueKey<PgOperatorRecord> getPrimaryKey() {
        return Keys.PG_OPERATOR_OID_INDEX;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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