/*
 * This file is generated by jOOQ.
 */
package ervu_secret.ervu_secret.db_beans.information_schema.tables;


import ervu_secret.ervu_secret.db_beans.information_schema.Domains;
import ervu_secret.ervu_secret.db_beans.information_schema.InformationSchema;
import ervu_secret.ervu_secret.db_beans.information_schema.tables.records.ForeignDataWrapperOptionsRecord;

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.TableImpl;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>information_schema.foreign_data_wrapper_options</code>
     */
    public static final ForeignDataWrapperOptions FOREIGN_DATA_WRAPPER_OPTIONS = new ForeignDataWrapperOptions();

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

    /**
     * The column
     * <code>information_schema.foreign_data_wrapper_options.foreign_data_wrapper_catalog</code>.
     */
    public final TableField<ForeignDataWrapperOptionsRecord, String> FOREIGN_DATA_WRAPPER_CATALOG = createField(DSL.name("foreign_data_wrapper_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");

    /**
     * The column
     * <code>information_schema.foreign_data_wrapper_options.foreign_data_wrapper_name</code>.
     */
    public final TableField<ForeignDataWrapperOptionsRecord, String> FOREIGN_DATA_WRAPPER_NAME = createField(DSL.name("foreign_data_wrapper_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");

    /**
     * The column
     * <code>information_schema.foreign_data_wrapper_options.option_name</code>.
     */
    public final TableField<ForeignDataWrapperOptionsRecord, String> OPTION_NAME = createField(DSL.name("option_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");

    /**
     * The column
     * <code>information_schema.foreign_data_wrapper_options.option_value</code>.
     */
    public final TableField<ForeignDataWrapperOptionsRecord, String> OPTION_VALUE = createField(DSL.name("option_value"), Domains.CHARACTER_DATA.getDataType(), this, "");

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

    private ForeignDataWrapperOptions(Name alias, Table<ForeignDataWrapperOptionsRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
        create view "foreign_data_wrapper_options" as  SELECT w.foreign_data_wrapper_catalog,
         w.foreign_data_wrapper_name,
         ((pg_options_to_table(w.fdwoptions)).option_name)::information_schema.sql_identifier AS option_name,
         ((pg_options_to_table(w.fdwoptions)).option_value)::information_schema.character_data AS option_value
        FROM information_schema._pg_foreign_data_wrappers w;
        """), where);
    }

    /**
     * Create an aliased
     * <code>information_schema.foreign_data_wrapper_options</code> table
     * reference
     */
    public ForeignDataWrapperOptions(String alias) {
        this(DSL.name(alias), FOREIGN_DATA_WRAPPER_OPTIONS);
    }

    /**
     * Create an aliased
     * <code>information_schema.foreign_data_wrapper_options</code> table
     * reference
     */
    public ForeignDataWrapperOptions(Name alias) {
        this(alias, FOREIGN_DATA_WRAPPER_OPTIONS);
    }

    /**
     * Create a <code>information_schema.foreign_data_wrapper_options</code>
     * table reference
     */
    public ForeignDataWrapperOptions() {
        this(DSL.name("foreign_data_wrapper_options"), null);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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