/*
 * 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.PgCatalog;
import ervu_secret.ervu_secret.db_beans.pg_catalog.tables.records.PgSettingsRecord;

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.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>pg_catalog.pg_settings</code>
     */
    public static final PgSettings PG_SETTINGS = new PgSettings();

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

    /**
     * The column <code>pg_catalog.pg_settings.name</code>.
     */
    public final TableField<PgSettingsRecord, String> NAME = createField(DSL.name("name"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.setting</code>.
     */
    public final TableField<PgSettingsRecord, String> SETTING = createField(DSL.name("setting"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.unit</code>.
     */
    public final TableField<PgSettingsRecord, String> UNIT = createField(DSL.name("unit"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.category</code>.
     */
    public final TableField<PgSettingsRecord, String> CATEGORY = createField(DSL.name("category"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.short_desc</code>.
     */
    public final TableField<PgSettingsRecord, String> SHORT_DESC = createField(DSL.name("short_desc"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.extra_desc</code>.
     */
    public final TableField<PgSettingsRecord, String> EXTRA_DESC = createField(DSL.name("extra_desc"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.context</code>.
     */
    public final TableField<PgSettingsRecord, String> CONTEXT = createField(DSL.name("context"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.vartype</code>.
     */
    public final TableField<PgSettingsRecord, String> VARTYPE = createField(DSL.name("vartype"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.source</code>.
     */
    public final TableField<PgSettingsRecord, String> SOURCE = createField(DSL.name("source"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.min_val</code>.
     */
    public final TableField<PgSettingsRecord, String> MIN_VAL = createField(DSL.name("min_val"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.max_val</code>.
     */
    public final TableField<PgSettingsRecord, String> MAX_VAL = createField(DSL.name("max_val"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.enumvals</code>.
     */
    public final TableField<PgSettingsRecord, String[]> ENUMVALS = createField(DSL.name("enumvals"), SQLDataType.CLOB.array(), this, "");

    /**
     * The column <code>pg_catalog.pg_settings.boot_val</code>.
     */
    public final TableField<PgSettingsRecord, String> BOOT_VAL = createField(DSL.name("boot_val"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.reset_val</code>.
     */
    public final TableField<PgSettingsRecord, String> RESET_VAL = createField(DSL.name("reset_val"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.sourcefile</code>.
     */
    public final TableField<PgSettingsRecord, String> SOURCEFILE = createField(DSL.name("sourcefile"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.sourceline</code>.
     */
    public final TableField<PgSettingsRecord, Integer> SOURCELINE = createField(DSL.name("sourceline"), SQLDataType.INTEGER, this, "");

    /**
     * The column <code>pg_catalog.pg_settings.pending_restart</code>.
     */
    public final TableField<PgSettingsRecord, Boolean> PENDING_RESTART = createField(DSL.name("pending_restart"), SQLDataType.BOOLEAN, this, "");

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

    private PgSettings(Name alias, Table<PgSettingsRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
        create view "pg_settings" as  SELECT a.name,
         a.setting,
         a.unit,
         a.category,
         a.short_desc,
         a.extra_desc,
         a.context,
         a.vartype,
         a.source,
         a.min_val,
         a.max_val,
         a.enumvals,
         a.boot_val,
         a.reset_val,
         a.sourcefile,
         a.sourceline,
         a.pending_restart
        FROM pg_show_all_settings() a(name, setting, unit, category, short_desc, extra_desc, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, sourcefile, sourceline, pending_restart);
        """), where);
    }

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

    /**
     * Create an aliased <code>pg_catalog.pg_settings</code> table reference
     */
    public PgSettings(Name alias) {
        this(alias, PG_SETTINGS);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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