JOOQ实战(一)
来源:互联网 发布:传智大数据100g百度云 编辑:程序博客网 时间:2024/06/06 06:45
package jooptest;import com.panda.core.db.Dao;import com.panda.core.db.impl.DBService;import org.jooq.DSLContext;import org.jooq.Record;import org.jooq.Result;import org.jooq.impl.DSL;import org.junit.Test;import java.sql.Connection;/** * Created by Lovell on 8/26/16. */public class JooqTest { @Test public void test1() throws Exception { Dao dao = new Dao(); dao.start(); Connection conn = DBService.getInstance().getConnection(); DSLContext dslContext = DSL.using(conn); Result<Record> fetch = dslContext.select().from("t_login").where("c_id = 1").orderBy(DSL.field("c_username").asc()).fetch(); for (Object aResult : fetch) { Record record = (Record) aResult; System.out.println(record); } }}
[2016-08-26 14:11:30,060]main INFO [com.zaxxer.hikari.HikariDataSource] - Lovell - Started. com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:70) [2016-08-26 14:11:32,711]main INFO [com.panda.core.db.impl.CacheService] - redis client start ok com.panda.core.db.impl.CacheService.start(CacheService.java:66) [2016-08-26 14:11:32,872]main INFO [com.panda.core.db.Dao] - MySQL and Redis was started. com.panda.core.db.Dao.start(Dao.java:52) [2016-08-26 14:12:06,205]main INFO [org.jooq.Constants] -@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@ @@@@@@@@@@@@@@@@@@@@ @@@@ @@ @@ @@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@@@@@@@@@@@@ @@ @@ @@@@ @@@@@@@@@@@@@@@@@@@@ @@ @@ @@@@ @@@@@@@@@@@@@@@@@@@@ @@ @ @ @@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Thank you for using jOOQ 3.8.4 org.jooq.tools.JooqLogger.info(JooqLogger.java:326) Disconnected from the target VM, address: '127.0.0.1:54445', transport: 'socket' [2016-08-26 14:18:38,631]Lovell housekeeper WARN [com.zaxxer.hikari.pool.HikariPool] - 6m33s887ms - Thread starvation or clock leap detected (housekeeper delta=Lovell). com.zaxxer.hikari.pool.HikariPool$HouseKeeper.run(HikariPool.java:614) +----+----------+----------+ |c_id|c_username|c_password| +----+----------+----------+ | 1|Lovell |123456 | +----+----------+----------+ Process finished with exit code 0
0 0
- JOOQ实战(一)
- JOOQ 实战(二)
- jOOQ学习笔记(一)
- JOOQ 学习笔记一:代码自动生成
- jooq入门
- springboot+jooq
- jooq使用自定义策略生成代码(How to use a custom strategy with the jOOQ code-generator and Maven?)
- Hibernate实战(一)
- Remoting实战(一)
- Gensim实战(一)
- Openlayers3实战(一)
- struts2 实战(一)
- Spring实战(一)
- Kubernetes实战(一)
- Qiuck_Cocos实战(一)
- maven 实战(一)
- zabbix实战(一)
- shiro实战(一)
- 【oracle学习】2.集合运算
- MySQL数值操作
- 使用Apache Spark让MySQL查询速度提升10倍以上
- Android常用组件类库
- VBA Macro 自动画图
- JOOQ实战(一)
- 记录一些容易忘记的ThinkPHP使用技巧
- #96 Partition List
- 【原创】【Openjudge】1388 : Lake Counting
- 堆表和索引组织表区别
- POJ 3660 Cow Contest
- WPF —ListView用ItemsSource绑定对象列表
- 卫星相关知识
- C语言union关键字