首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > jdbc-helper

jdbc-helper

  • 资源大小:276.41 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: jdbchelper

资 源 简 介

Inspired by Spring Jdbctemplate and Commons Dbutils projects, JdbcHelper is a very small library for helping the developers code common jdbc operations. JdbcHelper is very lightweight. It is only ~70K and it has no external dependencies. A usage example: ``` DataSource dataSource = new SimpleDataSource("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/test?autoReconnect=true", "root", null); JdbcHelper jdbc = new JdbcHelper(dataSource); jdbc.execute("INSERT INTO jdbctest (id, name) VALUES(?, ?)", 10, "test"); Test t = jdbc.queryForObject("select * from jdbctest where id = ?", new BeanCreator() { @Override public Test createBean(ResultSet rs) throws SQLException { Test t = new Test(); t.id = rs.getInt(1); t.name = rs.getString(2); return t; } }, 10); ``` Getting started with JdbcHelper

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP