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

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JSON;
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 JsonArrayElementsText extends TableImpl<JsonArrayElementsTextRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>pg_catalog.json_array_elements_text</code>
     */
    public static final JsonArrayElementsText JSON_ARRAY_ELEMENTS_TEXT = new JsonArrayElementsText();

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

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

    private JsonArrayElementsText(Name alias, Table<JsonArrayElementsTextRecord> aliased) {
        this(alias, aliased, new Field[] {
            DSL.val(null, SQLDataType.JSON)
        });
    }

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

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

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

    /**
     * Create an aliased <code>pg_catalog.json_array_elements_text</code> table
     * reference
     */
    public JsonArrayElementsText(Name alias) {
        this(alias, JSON_ARRAY_ELEMENTS_TEXT);
    }

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

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

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

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

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

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

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

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

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

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

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

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