예제 #1
0
파일: Query.java 프로젝트: kptran/sql2o
 public Query addParameter(String name, int value) {
   try {
     statement.setInt(name, value);
   } catch (SQLException ex) {
     throw new Sql2oException(ex);
   }
   return this;
 }
예제 #2
0
파일: Query.java 프로젝트: kptran/sql2o
 public Query addParameter(String name, Integer value) {
   try {
     if (value == null) {
       statement.setNull(name, Types.INTEGER);
     } else {
       statement.setInt(name, value);
     }
   } catch (SQLException ex) {
     throw new RuntimeException(ex);
   }
   return this;
 }