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

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JSONB;
import org.jooq.Name;
import org.jooq.Schema;
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 JsonbEachText extends TableImpl<JsonbEachTextRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>pg_catalog.jsonb_each_text</code>
     */
    public static final JsonbEachText JSONB_EACH_TEXT = new JsonbEachText();

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

    /**
     * The column <code>pg_catalog.jsonb_each_text.key</code>.
     */
    public final TableField<JsonbEachTextRecord, String> KEY = createField(DSL.name("key"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>pg_catalog.jsonb_each_text.value</code>.
     */
    public final TableField<JsonbEachTextRecord, String> VALUE = createField(DSL.name("value"), SQLDataType.CLOB, this, "");

    private JsonbEachText(Name alias, Table<JsonbEachTextRecord> aliased) {
        this(alias, aliased, new Field[] {
            DSL.val(null, SQLDataType.JSONB)
        });
    }

    private JsonbEachText(Name alias, Table<JsonbEachTextRecord> aliased, Field<?>[] parameters) {
        this(alias, aliased, parameters, null);
    }

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

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

    /**
     * Create an aliased <code>pg_catalog.jsonb_each_text</code> table reference
     */
    public JsonbEachText(Name alias) {
        this(alias, JSONB_EACH_TEXT);
    }

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

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

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

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

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

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

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

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

    /**
     * Call this table-valued function
     */
    public JsonbEachText call(
          JSONB fromJson
    ) {
        JsonbEachText result = new JsonbEachText(DSL.name("jsonb_each_text"), null, new Field[] {
            DSL.val(fromJson, SQLDataType.JSONB)
        });

        return aliased() ? result.as(getUnqualifiedName()) : result;
    }

    /**
     * Call this table-valued function
     */
    public JsonbEachText call(
          Field<JSONB> fromJson
    ) {
        JsonbEachText result = new JsonbEachText(DSL.name("jsonb_each_text"), null, new Field[] {
            fromJson
        });

        return aliased() ? result.as(getUnqualifiedName()) : result;
    }
}
