1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.skife.jdbi.v2;
18
19 import java.sql.Connection;
20 import java.sql.SQLException;
21 import java.sql.Statement;
22 import java.util.Collections;
23
24 import org.skife.jdbi.v2.tweak.SQLLog;
25 import org.skife.jdbi.v2.tweak.StatementBuilder;
26 import org.skife.jdbi.v2.tweak.StatementCustomizer;
27 import org.skife.jdbi.v2.tweak.StatementLocator;
28 import org.skife.jdbi.v2.tweak.StatementRewriter;
29
30
31
32
33 public class Update extends SQLStatement<Update>
34 {
35 Update(Connection connection,
36 StatementLocator locator,
37 StatementRewriter statementRewriter,
38 StatementBuilder cache,
39 String sql,
40 StatementContext ctx,
41 SQLLog log,
42 TimingCollector timingCollector)
43 {
44 super(new Binding(), locator, statementRewriter, connection, cache, sql, ctx, log, timingCollector, Collections.<StatementCustomizer>emptyList());
45 }
46
47
48
49
50
51 public int execute()
52 {
53 return this.internalExecute(QueryPreperator.NO_OP, new QueryResultMunger<Integer>()
54 {
55 public Integer munge(Statement results) throws SQLException
56 {
57 return results.getUpdateCount();
58 }
59 }, QueryPostMungeCleanup.CLOSE_RESOURCES_QUIETLY);
60 }
61 }