As I am new to Quarkus, I am stuck at once place and it would be great, if anyone can help me out. I am creating a application with Quarkus reactive PgPool (basically of vertx), and I have to inset records in table which have columns more than 6
import io.smallrye.mutiny.Uni;
import io.vertx.mutiny.sqlclient.Tuple;
import io.vertx.mutiny.pgclient.PgPool;
public Uni<Long> addRequest(PgPool client) {
String sql = "Insert into request (column1, column2, column3, column4, column5, column6, column7, column8, column9"
+", column10, column11, column12, column13, column14, column15)"+
" values ($1, $2, $3, $4, $5, $6, $7, $8, $9"
+", $10, $11, $12, $13, $14, $15) RETURNING id";
**//Here I am adding 15 columns to Tuple but it's allowing**
Tuple t = Tuple.of(column1, column2, column3, column4, column5, column6, column7, column8, column9
, column10, column11, column12, column13, column14, column15);
return client.preparedQuery(sql).execute(t).onItem().transform(pgRowSet -> pgRowSet.iterator().next().getLong("id"));
}
Please let me know how to do it, correctly or if there is any better way to do it like directly passing POJO class instance or using NamedJdbcTemplate because some of my table contains above 50 columns and to maintain number not so good?


