-
Notifications
You must be signed in to change notification settings - Fork 12
配置与入门
Yong Zhu edited this page Jan 19, 2018
·
5 revisions
jDialects需Java6或以上版本支持, 在项目的pom.xml文件中加入:
<dependency>
<groupId>com.github.drinkjava2</groupId>
<artifactId>jdialects</artifactId>
<version>1.0.7</version>
</dependency>
或手工从Maven中央库下载"jdialects-1.0.7.jar"(或最新版)并放入项目的库目录下。
入门示例:
import com.github.drinkjava2.jdialects.Dialect;
public class Demo{
public static void main(String[] args) {
System.out.println(Dialect.Oracle12cDialect.paginAndTrans(3, 10,
"select concat('a','b','c'), current_time() from user_tb"));
}
}
输出结果为:
select 'a'||'b'||'c', current_timestamp from user_tb offset 20 rows fetch next 10 rows only