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


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

查看所有标签

猜你喜欢:

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

Programming in Haskell

Programming in Haskell

Graham Hutton / Cambridge University Press / 2007-1-18 / GBP 34.99

Haskell is one of the leading languages for teaching functional programming, enabling students to write simpler and cleaner code, and to learn how to structure and reason about programs. This introduc......一起来看看 《Programming in Haskell》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具