Created
March 23, 2020 16:03
-
-
Save vietj/8770ff31a2850fc01aec5d4545e7a6ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@VertxGen | |
public interface SqlTemplate<R> { | |
static SqlTemplate<RowSet<Row>> forQuery(SqlClient client, String template) { | |
Collector<Row, ?, SqlResult<Row>> collector = null; | |
Function<SqlResult<Row>, RowSet<Row>> bilto = null; | |
return new SqlTemplateImpl<SqlResult<Row>, RowSet<Row>>(client, collector, bilto, template); | |
} | |
static SqlTemplate<SqlResult<Void>> forUpdate(SqlClient client, String template) { | |
return null; | |
} | |
@GenIgnore | |
<U> SqlTemplate<SqlResult<U>> collecting(Collector<Row, ?, U> collector); | |
<U> SqlTemplate<RowSet<U>> mapping(Class<U> type); | |
<U> SqlTemplate<RowSet<U>> mapping(Function<Row, U> mapper); | |
// Single | |
void execute(Tuple tuple, Handler<AsyncResult<R>> handler); | |
// Batch | |
void execute(List<Tuple> tuple, Handler<AsyncResult<R>> handler); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment