/*
 * This file is generated by jOOQ.
 */
package generated.mutiny.reactive.mysql.tables.daos;


import generated.mutiny.reactive.mysql.tables.Stringkey;
import generated.mutiny.reactive.mysql.tables.records.StringkeyRecord;

import io.github.jklingsporn.vertx.jooq.shared.reactive.AbstractReactiveVertxDAO;

import java.util.Collection;

import org.jooq.Configuration;


import java.util.List;
import io.smallrye.mutiny.Uni;
import io.github.jklingsporn.vertx.jooq.mutiny.reactive.ReactiveMutinyQueryExecutor;
/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class StringkeyDao extends AbstractReactiveVertxDAO<StringkeyRecord, generated.mutiny.reactive.mysql.tables.pojos.Stringkey, String, Uni<List<generated.mutiny.reactive.mysql.tables.pojos.Stringkey>>, Uni<generated.mutiny.reactive.mysql.tables.pojos.Stringkey>, Uni<Integer>, Uni<String>> implements io.github.jklingsporn.vertx.jooq.mutiny.VertxDAO<StringkeyRecord,generated.mutiny.reactive.mysql.tables.pojos.Stringkey,String> {

        /**
     * @param configuration The Configuration used for rendering and query
     * execution.
     * @param vertx the vertx instance
     */
        public StringkeyDao(Configuration configuration, io.vertx.mutiny.sqlclient.SqlClient delegate) {
                super(Stringkey.STRINGKEY, generated.mutiny.reactive.mysql.tables.pojos.Stringkey.class, new ReactiveMutinyQueryExecutor<StringkeyRecord,generated.mutiny.reactive.mysql.tables.pojos.Stringkey,String>(configuration,delegate,generated.mutiny.reactive.mysql.tables.mappers.RowMappers.getStringkeyMapper()));
        }

        @Override
        protected String getId(generated.mutiny.reactive.mysql.tables.pojos.Stringkey object) {
                return object.getKey();
        }

        /**
     * Find records that have <code>value IN (values)</code> asynchronously
     */
        public Uni<List<generated.mutiny.reactive.mysql.tables.pojos.Stringkey>> findManyByValue(Collection<Integer> values) {
                return findManyByCondition(Stringkey.STRINGKEY.VALUE.in(values));
        }

        /**
     * Find records that have <code>value IN (values)</code> asynchronously
     * limited by the given limit
     */
        public Uni<List<generated.mutiny.reactive.mysql.tables.pojos.Stringkey>> findManyByValue(Collection<Integer> values, int limit) {
                return findManyByCondition(Stringkey.STRINGKEY.VALUE.in(values),limit);
        }

        @Override
        public ReactiveMutinyQueryExecutor<StringkeyRecord,generated.mutiny.reactive.mysql.tables.pojos.Stringkey,String> queryExecutor(){
                return (ReactiveMutinyQueryExecutor<StringkeyRecord,generated.mutiny.reactive.mysql.tables.pojos.Stringkey,String>) super.queryExecutor();
        }

        @Override
        protected java.util.function.Function<io.vertx.sqlclient.RowSet<io.vertx.sqlclient.Row>,Long> extractMysqlLastInsertProperty(){
                return rs -> rs.property(io.vertx.mysqlclient.MySQLClient.LAST_INSERTED_ID);
        }
}
