69 Star 143 Fork 52

rex / rexdb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0


<dependency>
  <groupId>org.rex-soft</groupId>
  <artifactId>rexdb</artifactId>
  <version>1.0.4</version>
</dependency>

使用Maven添加依赖后,不要忘记将rexdb配置文件rexdb.xml拷贝到classpath路径中


全部文档(限于篇幅,下面的正文仅包含简介和快速入门)


概述

Rexdb是一款使用Java语言编写的,开放源代码的持久层框架。提供了查询、更新、批处理、调用、(JTA)事务、数据源管理等功能,可以取代Mybatis、Hibernate作为系统的核心ORM框架。

Rexdb提供了工具类风格的接口,不需要编写映射配置,使用简便;同时,它还具备同类框架中最高效的执行效率。

性能

功能

  • 数据库操作:查询、更新、批处理、调用、(JTA)事物等;
  • ORM映射:支持数组、Map和任意Java对象;
  • 数据源:内置连接池,支持第三方数据源和JNDI;
  • 方言:自动分页,支持Oracle、DB2、SQL Server、Mysql、达梦等数据库;
  • 高级功能:监听、国际化、异常管理等;

特点

  • 高性能;
  • 工具类风格的接口设计,使用简便;
  • 免配置(数据源和全局配置除外);

技术支持

Rexdb的更新十分缓慢,但发布的每一个版本均已在多个生产环境中稳定运行,包括企业、政务、金融系统等,因此稳定性有所保障。 但由于Rexdb是免费的开源软件,因此除文档、源代码和示例外,无法提供日常的技术支持。

用户协议

Rexdb基于Apache 2.0协议,可以免费用于个人或商业用途。

协议详情请见:Apache Lisence, Version 2.0

快速入门

本文档用于快速了解Rexdb的使用方法,适合大部分的Java编程人员阅读。

开发/运行运行环境

Rexdb需要如下运行环境:

  • JDK 5.0及以上版本(当使用Maven自动加载依赖时时,可能需要JDK1.8及以上版本)

在开始前,请检查环境变量中的如下jar包:

  • JDBC驱动
  • rexdb-1.0.0.jar(或其它版本)
  • javassist-3.20.0-GA.jar(可选,推荐使用)
  • logger4j/logger4j2/slf4j(可选其一,也可以都不使用)
  • dbcp/C3P0/BoneCP等(可选其一,也可以都不使用)

全局配置 rexdb.xml

Rexdb依赖全局配置文件rexdb.xml,用于配置数据源、日志、异常信息语言等。该文件默认存放于classpath环境变量中(例如,在Java EE应用中,应将其放置于WEB-INF/classes目录中)。

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE configuration PUBLIC "-//rex-soft.org//REXDB DTD 1.0//EN" "http://www.rex-soft.org/dtd/rexdb-1-config.dtd">
<configuration>
	<!-- 默认数据源,Oracle数据库,使用框架内置的连接池 -->
	<dataSource>
		<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
		<property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:rexdb" />
		<property name="username" value="rexdb" />
		<property name="password" value="12345678" />
	</dataSource>
	<!-- id为“student”的数据源,Mysql数据库,使用了Apache DBCP连接池 -->
	<dataSource id="student" class="org.apache.commons.dbcp.BasicDataSource">
		<property name="driverClassName" value="com.mysql.jdbc.Driver" />
        <property name="jdbcUrl" value="jdbc:mysql://127.0.0.1:3306/rexdb?characterEncoding=utf8" />
		<property name="username" value="root" />
		<property name="password" value="12345678" />
	</dataSource>
	<!-- id为“school”的数据源,使用Tomcat JNDI -->
	<dataSource id="school" jndi="java:comp/env/rexdbJNDI"></dataSource>
</configuration>

如果希望从其它位置加载该配置文件,或是启用更多的功能,例如设置异常信息语言(中/英)、设置跟踪SQL的监听、设置超时时间等,请查询Rexdb用户手册

查询单条记录 DB.get()

org.rex.DB.get()方法用于查询单条记录,并返回指定的java对象实例(无记录时返回null),格式如下:

T DB.get([String dataSourceId,] String sql, [Object[] | org.rex.db.Ps | Map | Object parameter,] Class clazz)

  • dataSourceId:可选,配置文件中的数据源id,不设置时使用默认数据源;
  • sql:必填,待执行的SQL语句;
  • parameter:可选,执行SQL时的预编译参数。根据该参数的类型不同,SQL中使用?或者#{}标记预编译参数;
  • class:必填,需要转换的结果集类型。

例1:执行SQL,并获取结果

Student stu = DB.get("select * from t_student where class='3年1班' and num=1", Student.class);

例2:执行带有预编译参数的SQL,当parameter参数为Object数组org.rex.db.Ps时,SQL中使用?标记预编译参数,例如:

Student stu = DB.get("select * from t_student where class=? and num=?", new Object[]{"3年1班", 1}, Student.class);
Student stu = DB.get("select * from t_student where class=? and num=?", new Ps("3年1班", 1), Student.class);

例3:执行带有预编译参数的SQL,当parameter参数为java.util.MapJava对象时,SQL中使用#{}标记预编译参数,例如:

//map为java.util.Map类型的实例,包含名为“clazz”和“num”的键;obj为普通的java对象,包含名为“clazz”和“num”的成员变量
Student stu = DB.get("select * from t_student where class=#{clazz} and num=#{num}", map, Student.class);
Student stu = DB.get("select * from t_student where class=#{clazz} and num=#{num}", obj, Student.class);

例4:在指定数据源中执行SQL

//配置文件rexdb.xml中有id为student的数据源
Student stu = DB.get("student", "select * from t_student where class='3年1班' and num=1", Student.class);

查询单条Map记录 DB.getMap()

org.rex.DB.get()方法用于查询单条记录,并返回一个org.rex.RMap实例(无记录时返回null),org.rex.RMap是java.util.HashMap的子类,提供了数据类型转换等功能(详见本文附录)。格式如下:

RMap DB.getMap([String dataSourceId,] String sql, [Object[] | Ps | Map | Object parameter])

  • dataSourceId:可选,配置文件中的数据源id,不设置时使用默认数据源;
  • sql:必填,待执行的SQL语句;
  • parameter:可选,执行SQL时的预编译参数。根据该参数的类型不同,SQL中使用?或者#{}标记预编译参数。

例1:执行SQL,并获取结果

RMap stu = DB.getMap("select * from t_student where class='3年1班' and num=1");

例2:执行带有预编译参数的SQL,当parameter参数为Object数组org.rex.db.Ps时,SQL中使用?标记预编译参数

RMap stu = DB.getMap("select * from t_student where class=? and num=?", new Object[]{"3年1班", 1});
RMap stu = DB.getMap("select * from t_student where class=? and num=?", new Ps("3年1班", 1));

例3:执行带有预编译参数的SQL,当parameter参数为java.util.MapJava对象时,SQL中使用#{}标记预编译参数

//map为java.util.Map类型的实例,包含名为“class”和“num”的键;obj为普通的java对象,包含名为“clazz”和“num”的成员变量
RMap stu = DB.getMap("select * from t_student where class=#{clazz} and num=#{num}", map);
RMap stu = DB.getMap("select * from t_student where class=#{clazz} and num=#{num}", obj);

例4:在指定数据源中执行SQL

//配置文件rexdb.xml中有id为student的数据源
RMap stu = DB.getMap("student", "select * from t_student where class='3年1班' and num=1");

查询多条记录 DB.getList()

org.rex.DB.getList()方法用于查询多条记录,并返回一个java.util.List实例(无记录时返回空的List实例)。格式如下:

List DB.getList([String dataSourceId,] String sql, [Object[] | Ps | Map | Object parameter,] Class clazz [, int offset, int rows])

  • dataSourceId:可选,配置文件中的数据源id,不设置时使用默认数据源;
  • sql:必填,待执行的SQL语句;
  • parameter:可选,执行SQL时的预编译参数。根据该参数的类型不同,SQL中使用?或者#{}标记预编译参数。
  • class:必填,需要转换的结果集类型;
  • offset:可选,分页查询的起始行号;
  • rows:可选,分页查询待获取的结果集条目。

例1:执行SQL,并获取结果

List<Student> list = DB.getList("select * from t_student where class='3年1班'", Student.class);

例2:执行带有预编译参数的SQL,当parameter参数为Object数组org.rex.db.Ps时,SQL中使用?标记预编译参数

List<Student> list = DB.getList("select * from t_student where class=?", new Object[]{"3年1班"}, Student.class);
List<Student> list = DB.getList("select * from t_student where class=?", new Ps("3年1班"), Student.class);

例3:执行带有预编译参数的SQL,当parameter参数为java.util.MapJava对象时,SQL中使用#{}标记预编译参数

//map为java.util.Map类型的实例,包含名为“class”的键;obj为普通的java对象,包含名为“clazz”的成员变量
List<Student> list = DB.getList("select * from t_student where class=#{clazz}", map, Student.class);
List<Student> list = DB.getList("select * from t_student where class=#{clazz}", obj, Student.class);

例4:执行分页查询,查询第100~110条记录

List<Student> list = DB.getList("select * from t_student where class='3年1班'", Student.class, 100, 10);

例5:在指定数据源中执行SQL

//配置文件rexdb.xml中有id为student的数据源
List<Student> list = DB.getList("student", "select * from t_student where class='3年1班'", Student.class);

查询多条Map记录 DB.getMapList()

org.rex.DB.getMapList()方法用于查询多条记录,并返回一个java.util.List实例(无记录时返回空的List实例)。格式如下:

List DB.getMapList([String dataSourceId,] String sql, [Object[] | Ps | Map | Object parameter] [, int offset, int rows])

  • dataSourceId:可选,配置文件中的数据源id,不设置时使用默认数据源;
  • sql:必填,待执行的SQL语句;
  • parameter:可选,执行SQL时的预编译参数。根据该参数的类型不同,SQL中使用?或者#{}标记预编译参数。
  • offset:可选,分页查询的起始行号;
  • rows:可选,分页查询待获取的结果集条目。

例1:执行SQL,并获取结果

List<RMap> list = DB.getMapList("select * from t_student where class='3年1班'");

例2:执行带有预编译参数的SQL,当parameter参数为Object数组org.rex.db.Ps时,SQL中使用?标记预编译参数

List<RMap> list = DB.getMapList("select * from t_student where class=?", new Object[]{"3年1班"});
List<RMap> list = DB.getMapList("select * from t_student where class=?", new Ps("3年1班"));

例3:执行带有预编译参数的SQL,当parameter参数为java.util.MapJava对象时,SQL中使用#{}标记预编译参数

//map为java.util.Map类型的实例,包含名为“class”的键;obj为普通的java对象,包含名为“clazz”的成员变量
List<RMap> list = DB.getMapList("select * from t_student where class=#{clazz}", map);
List<RMap> list = DB.getMapList("select * from t_student where class=#{clazz}", obj);

例4:执行分页查询,查询第100~110条记录

List<RMap> list = DB.getMapList("select * from t_student where class='3年1班'", 100, 10);

例5:在指定数据源中执行SQL

//配置文件rexdb.xml中有id为student的数据源
List<RMap> list = DB.getMapList("student", "select * from t_student where class='3年1班'");

插入/更新/删除 DB.update()

org.rex.DB.update()方法用于执行插入/更新/删除操作,该接口将返回受影响的记录条数。格式如下:

int DB.update([String dataSourceId,] String sql [, Object[] | Ps | Map | Object parameter])

例1:执行SQL

DB.update("delete from t_student where num = 1");

例2:执行带有预编译参数的SQL,当parameter参数为Object数组org.rex.db.Ps时,SQL中使用?标记预编译参数

string sql = "insert into t_student(num, student_name, student_class,create_time) values (?, ?, ?, ?)";
DB.update(sql, new Object[]{1, "钟小强","3年1班", new Date()});
DB.update(sql, new Ps(2, "王小五", "3年1班",new Date()));

例3:执行带有预编译参数的SQL,当parameter参数为java.util.MapJava对象时,SQL中使用#{}标记预编译参数

String sql = "update t_student set student_name = #{studentName} where num = #{num}";
DB.update(sql,map);//map为java.util.Map类型的实例,包含名为“studentName”和“num”的键
DB.update(sql,new Students(1, "钟小强", null, null));//obj为普通的java对象,包含名为“studentName”和“num”的成员变量

例4:在指定数据源中执行SQL

//配置文件rexdb.xml中有id为student的数据源
List<RMap> list = DB.getMapList("student", "delete from t_student where num = 1");

批量更新 DB.batchUpdate()

DB.batchUpdate()方法用于执行批处理操作,该接口可以有效提升执行大量数据变更时的执行性能,格式如下:

int[] DB.batchUpdate([String datasource,] String[] sqls) int[] DB.batchUpdate([String datasource,] String sql, Object[][] | Ps[] | Map[] | Object[] | List parameter )

例1:执行多个SQL

String[] sqls = new String[]{"delete from t_student where num=1", "delete from t_student where num=2"};
DB.batchUpdate(sqls);

例2:执行带有预编译参数的SQL,当parameter参数元素类型为Object数组org.rex.db.Ps时,SQL中使用?标记预编译参数

string sql = "insert into t_student(num, student_name, student_class,create_time) values (?, ?, ?, ?)";
DB.batchUpdate(sql, new Object[][]{{1, "钟小强","3年1班", new Date()}, {2, "王小五","3年1班", new Date()}});
DB.batchUpdate(sql, new Ps[]{new Ps(3, "李小华", "3年1班", new Date()), new Ps(4, "赵小明", "3年1班", new Date())});	

例3:执行带有预编译参数的SQL,当parameter参数元素类型为java.util.MapJava对象时,SQL中使用#{}标记预编译参数

String sql = "update t_student set student_name = #{studentName} where num = #{num}";
DB.batchUpdate(sql, maps);//maps为java.util.Map数组实例,数组中每个元素都包含名为“studentName”和“num”的键
DB.batchUpdate(sql, objs);//objs为Student类型的java对象实例数组,Student对象包含名为“studentName”和“num”的成员变量

例4:在指定数据源中执行SQL

String[] sqls = new String[]{"delete from t_student where num=1", "delete from t_student where num=2"};
DB.batchUpdate("student", sqls);	

事务

Rexdb使用编程的方式处理事务,以下接口用于事务处理:

void DB.beginTransaction([String dataSourceId] [,DefaultDefinition definition]) //开启事物 void DB.commit([String dataSourceId]) //提交事务 void DB.rollback([String dataSourceId]) //回滚事务

JTA事物接口如下:

void DB.beginJta([DefaultDefinition definition]) //开启JTA事物 void DB.commitJta() //提交JTA事务 void DB.rollbackJta() //回滚JTA事务

例:

DB.beginTransaction();
try{
	DB.update("delete from t_student where num = 1");
	DB.update("delete from t_student where num = 2");
	UserDao.update();//Rexdb的事物是线程级别的,同一线程且同一数据源中的事物对象共享,所以可以把原子操作分散在多个DAO中
	DB.commit();
}catch(Exception e){
	DB.rollback();
}

调用 DB.call()

DB.call()方法用于执行调用操作,可用于调用存储过程和函数,支持返输入、输出参数和返回值。格式如下:

RMap DB.call([String dataSourceId,] String sql [, Object[] | Ps | Map | Object parameter])

例1:调用存储过程/函数

DB.call("test_proc()");

例2:调用有输入参数的存储过程/函数

DB.call("{call test_proc_in(?)", new Ps(200));

例3:调用有输出参数的存储过程/函数时,必须使用org.rex.db.Ps对象声明输出参数

Ps ps = new Ps();
ps.addOutInt("age");
RMap result = DB.call("{call test_proc_out(?)}", ps);
int age = result.getInt("age")

例4:调用同时有输入输出参数的存储过程/函数,必须使用org.rex.db.Ps对象,并按照SQL中标记的顺序声明

Ps ps = new Ps();
ps.add(200);
ps.addOutInt("major");
RMap result = DB.call("{call test_proc_in_out(?, ?)}", ps);
int major = result.getInt("major");

例5:调用即是输入参数也是输出参数的存储过程/函数,必须使用org.rex.db.Ps对象

Ps ps = new Ps();
ps.addInOut("count", 10);
RMap result = DB.call("{call test_proc_inout(?)}", ps);
int count = result.getInt("count");

例6:调用带有返回值的存储过程/函数,返回值将按照return_1、return_2的顺序命名

RMap result = DB.call("{call exdb_test_proc_return()}");
List<RMap> return1 = result.getList("return_1");

关于调用的其它用法请参见用户手册。

更多

Rexdb还有更多功能,例如:

  • 设置异常信息为中文/英文;
  • 开启/关闭日志;
  • 执行SQL前的语法检查;
  • 自动检查连接/状态中的警告;
  • 设置查询超时时间;
  • 设置事物超时时间/隔离级别/自动回滚/自动的批处理事务;
  • 启动动态字节码编译/反射缓存;
  • 自动转换日期类型的参数;

详情请参见Rexdb用户手册

附1:类 org.rex.RMap

org.rex.RMap继承了java.util.HashMap,主要用于简化取值时的Java类型转换。该类有诸如RMap.getInt(String key)RMap.getDate(String key)的方法,可以方便的获取需要的类型。当Map中存储的值类型和希望获取的类型不匹配时,也会尝试各种可能的方式进行类型转换。

例1:查询记录数

int c = DB.getMap("select count(*) as c from t_student").getInt("c");

例2:查询数据库中的当前时间(oracle)

Date now = DB.getMap("select sysdate as now from dual").getDate("now");

例3:获取某日期字段(SQL查询出的类型为String,RMap自动将其转换为Date类型)

Date date = DB.getMap("select '2016-01-01' as date from dual").getDate("date");

有关该类的更多使用方法请参见Rexdb用户手册

附2:类 org.rex.db.Ps

org.rex.db.Ps用于声明预编译参数,也可以用于获取SQL执行后的输出参数和返回值。该类提供了丰富的接口,可以快速设置执行SQL所需的参数,简化了为设置查询条件而实例化Java对象的代码。

例1:使用构造函数按顺序声明预编译参数

RMap stu = DB.get("select * from t_student where class=? and num=?", new Ps("3年1班", 1));

例2:逐个声明预编译参数

Ps ps = new Ps();
ps.add("3年1班");
ps.add(1);
RMap stu = DB.get("select * from t_student where class=? and num=?", ps);

例3:声明存储过程的输出参数

Ps ps = new Ps();
ps.addOutInt("age");
RMap result = DB.call("{call test_proc_out(?)}", ps);
int age = result.getInt("age")

有关该类的更多使用方法请参见Rexdb用户手册

附3:作者的一些建议

  • 对于需求不可预计的项目、业务复杂的项目,在开发过程中都不可避免的要进行多表关联查询,同时可能会有频繁的表结构变更。这类系统可以考虑采用Map的方式查询和传递数据,可以大幅降低需求变更时的编码量。当然,这还需要其它框架的配合,例如,模板引擎可以直接展示Map对象的数据。
  • 而对于经过精心设计,表结构不会频繁变更,各表之间的关联查询较少的项目,建议采用查询Java对象系列接口。
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

高性能的数据持久层(ORM)框架,查询性能是Hibernate的2.3倍,Mybatis的1.7倍。 展开 收起
Java
Apache-2.0
取消

发行版 (3)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/rexsoft/rexdb.git
git@gitee.com:rexsoft/rexdb.git
rexsoft
rexdb
rexdb
master

搜索帮助