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

import java.sql.Timestamp;
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 PgStatSlru extends TableImpl<PgStatSlruRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>pg_catalog.pg_stat_slru</code>
     */
    public static final PgStatSlru PG_STAT_SLRU = new PgStatSlru();

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

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

    /**
     * The column <code>pg_catalog.pg_stat_slru.blks_zeroed</code>.
     */
    public final TableField<PgStatSlruRecord, Long> BLKS_ZEROED = createField(DSL.name("blks_zeroed"), SQLDataType.BIGINT, this, "");

    /**
     * The column <code>pg_catalog.pg_stat_slru.blks_hit</code>.
     */
    public final TableField<PgStatSlruRecord, Long> BLKS_HIT = createField(DSL.name("blks_hit"), SQLDataType.BIGINT, this, "");

    /**
     * The column <code>pg_catalog.pg_stat_slru.blks_read</code>.
     */
    public final TableField<PgStatSlruRecord, Long> BLKS_READ = createField(DSL.name("blks_read"), SQLDataType.BIGINT, this, "");

    /**
     * The column <code>pg_catalog.pg_stat_slru.blks_written</code>.
     */
    public final TableField<PgStatSlruRecord, Long> BLKS_WRITTEN = createField(DSL.name("blks_written"), SQLDataType.BIGINT, this, "");

    /**
     * The column <code>pg_catalog.pg_stat_slru.blks_exists</code>.
     */
    public final TableField<PgStatSlruRecord, Long> BLKS_EXISTS = createField(DSL.name("blks_exists"), SQLDataType.BIGINT, this, "");

    /**
     * The column <code>pg_catalog.pg_stat_slru.flushes</code>.
     */
    public final TableField<PgStatSlruRecord, Long> FLUSHES = createField(DSL.name("flushes"), SQLDataType.BIGINT, this, "");

    /**
     * The column <code>pg_catalog.pg_stat_slru.truncates</code>.
     */
    public final TableField<PgStatSlruRecord, Long> TRUNCATES = createField(DSL.name("truncates"), SQLDataType.BIGINT, this, "");

    /**
     * The column <code>pg_catalog.pg_stat_slru.stats_reset</code>.
     */
    public final TableField<PgStatSlruRecord, Timestamp> STATS_RESET = createField(DSL.name("stats_reset"), SQLDataType.TIMESTAMP(0), this, "");

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

    private PgStatSlru(Name alias, Table<PgStatSlruRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
        create view "pg_stat_slru" as  SELECT s.name,
         s.blks_zeroed,
         s.blks_hit,
         s.blks_read,
         s.blks_written,
         s.blks_exists,
         s.flushes,
         s.truncates,
         s.stats_reset
        FROM pg_stat_get_slru() s(name, blks_zeroed, blks_hit, blks_read, blks_written, blks_exists, flushes, truncates, stats_reset);
        """), where);
    }

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

    /**
     * Create an aliased <code>pg_catalog.pg_stat_slru</code> table reference
     */
    public PgStatSlru(Name alias) {
        this(alias, PG_STAT_SLRU);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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