Revert "Revert "Move bucket generation to a table trigger""
This reverts commit c188cbea7e
.
This commit is contained in:
parent
2f66bfa78c
commit
e6e94eafa2
@ -79,19 +79,7 @@ public class StatsRepository extends RepositoryBase
|
|||||||
{
|
{
|
||||||
try (Connection c = getConnection())
|
try (Connection c = getConnection())
|
||||||
{
|
{
|
||||||
executeInsert(c, "INSERT INTO stats (name) VALUES (?);", rs ->
|
executeInsert(c, "INSERT INTO stats (name) VALUES (?);", rs -> onComplete.run(), () -> {}, new ColumnVarChar("name", 100, name));
|
||||||
{
|
|
||||||
if (rs.next())
|
|
||||||
{
|
|
||||||
final int id = rs.getInt(1);
|
|
||||||
try (CallableStatement cs = c.prepareCall("{call accountStatsCreateBucketData(?)}"))
|
|
||||||
{
|
|
||||||
cs.setInt("stat", id);
|
|
||||||
cs.execute();
|
|
||||||
onComplete.run();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, () -> {}, new ColumnVarChar("name", 100, name));
|
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user