d
Size: a a a
LV
d
d
d
d
d
SQLClientHelper.inTransactionSingle(client, sqlConnection -> {
return sqlConnection.rxExecute("INSERT INTO albums (name) VALUES ('The Israelites')")
.andThen(sqlConnection.rxExecute("INSERT INTO tracks (album, name) VALUES ('The Israelites', 'Israelites')"))
.andThen(sqlConnection.rxExecute("INSERT INTO tracks (album, name) VALUES ('The Israelites', 'Too Much Too Soon')"))
.andThen(sqlConnection.rxQuery("SELECT name FROM tracks WHERE album = 'The Israelites'").map(ResultSet::getResults))
}).map(rows -> {
// Transform DB rows into a client-friendly JSON object
}).subscribe(json -> {
// Send JSON to the client
}, t -> {
// Send error to the client
});O
A
O
SQLClientHelper.inTransactionSingle(client, sqlConnection -> {
return sqlConnection.rxExecute("INSERT INTO albums (name) VALUES ('The Israelites')")
.andThen(sqlConnection.rxExecute("INSERT INTO tracks (album, name) VALUES ('The Israelites', 'Israelites')"))
.andThen(sqlConnection.rxExecute("INSERT INTO tracks (album, name) VALUES ('The Israelites', 'Too Much Too Soon')"))
.andThen(sqlConnection.rxQuery("SELECT name FROM tracks WHERE album = 'The Israelites'").map(ResultSet::getResults))
}).map(rows -> {
// Transform DB rows into a client-friendly JSON object
}).subscribe(json -> {
// Send JSON to the client
}, t -> {
// Send error to the client
});d
SQLClientHelper.inTransactionSingle(client, tx -> Single.zip(userRepo.rxSave(user, tx), orderRepo.rxSave(order, tx), (user, order) -> )d
d