Skip to content

Commit

Permalink
Merge pull request mybatis#246 from wangdx/master
Browse files Browse the repository at this point in the history
Some zh-docs improving and one javadoc polishing.
  • Loading branch information
emacarron committed Jul 26, 2014
2 parents ac1f964 + 2970e70 commit 422f68c
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 187 deletions.
16 changes: 8 additions & 8 deletions src/main/java/org/apache/ibatis/jdbc/SqlRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public void setUseGeneratedKeySupport(boolean useGeneratedKeySupport) {
*
* @param sql The SQL
* @param args The arguments to be set on the statement.
* @return The number of rows impacted or BATCHED_RESULTS if the statements are being batched.
* @throws SQLException If more than one row is returned
* @return The row expected.
* @throws SQLException If less or more than one row is returned
*/
public Map<String, Object> selectOne(String sql, Object... args) throws SQLException {
List<Map<String, Object>> results = selectAll(sql, args);
Expand All @@ -73,8 +73,8 @@ public Map<String, Object> selectOne(String sql, Object... args) throws SQLExcep
*
* @param sql The SQL
* @param args The arguments to be set on the statement.
* @return The number of rows impacted or BATCHED_RESULTS if the statements are being batched.
* @throws SQLException If statement prepration or execution fails
* @return The list of rows expected.
* @throws SQLException If statement preparation or execution fails
*/
public List<Map<String, Object>> selectAll(String sql, Object... args) throws SQLException {
PreparedStatement ps = connection.prepareStatement(sql);
Expand All @@ -97,7 +97,7 @@ public List<Map<String, Object>> selectAll(String sql, Object... args) throws SQ
* @param sql The SQL
* @param args The arguments to be set on the statement.
* @return The number of rows impacted or BATCHED_RESULTS if the statements are being batched.
* @throws SQLException If statement prepration or execution fails
* @throws SQLException If statement preparation or execution fails
*/
public int insert(String sql, Object... args) throws SQLException {
PreparedStatement ps;
Expand Down Expand Up @@ -143,7 +143,7 @@ public int insert(String sql, Object... args) throws SQLException {
* @param sql The SQL
* @param args The arguments to be set on the statement.
* @return The number of rows impacted or BATCHED_RESULTS if the statements are being batched.
* @throws SQLException If statement prepration or execution fails
* @throws SQLException If statement preparation or execution fails
*/
public int update(String sql, Object... args) throws SQLException {
PreparedStatement ps = connection.prepareStatement(sql);
Expand All @@ -165,7 +165,7 @@ public int update(String sql, Object... args) throws SQLException {
* @param sql The SQL
* @param args The arguments to be set on the statement.
* @return The number of rows impacted or BATCHED_RESULTS if the statements are being batched.
* @throws SQLException If statement prepration or execution fails
* @throws SQLException If statement preparation or execution fails
*/
public int delete(String sql, Object... args) throws SQLException {
return update(sql, args);
Expand All @@ -176,7 +176,7 @@ public int delete(String sql, Object... args) throws SQLException {
* Good for DDL
*
* @param sql The SQL
* @throws SQLException If statement prepration or execution fails
* @throws SQLException If statement preparation or execution fails
*/
public void run(String sql) throws SQLException {
Statement stmt = connection.createStatement();
Expand Down
Loading

0 comments on commit 422f68c

Please sign in to comment.