IteratorX 正式开源:超好用的 jdbc reader

栏目: 软件资讯 · 发布时间: 6年前

内容简介:人生苦短,我却用 Java ......就是数据库读张表,一个 sql 的事儿,能不能简单点?hibernate,mybatis 配置来配置去 ......

人生苦短,我却用 Java ......

就是数据库读张表,一个 sql 的事儿,能不能简单点?

hibernate,mybatis 配置来配置去 ......

还有 能不能不要用 bean?怎么就读张表,却还要写个 bean?更不要说项目里一坨的 bean 来 bean 去 ......

直接用 jdbc?你还是杀了我吧 ......

我就想这样:

for (final JSONObject item : jdbcReader.read("select * from tablename")) {
		System.err.println(item);
	}

还有这样:

final Collection<JSONObject> items = jdbcReader.readAll("select * from tablename where type = ?", param);

OK!

参见:

maven: https://mvnrepository.com/artifact/io.iteratorx/iteratorx


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Essential ActionScript 3.0

Essential ActionScript 3.0

Colin Moock / Adobe Dev Library / June 22, 2007 / $34.64

ActionScript 3.0 is a huge upgrade to Flash's programming language. The enhancements to ActionScript's performance, feature set, ease of use, cleanliness, and sophistication are considerable. Essentia......一起来看看 《Essential ActionScript 3.0》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具