Цей коміт міститься в:
2025-02-20 14:59:35 +08:00
джерело d7be84fac6
коміт d4a3bb8ffc
2541 змінених файлів з 336536 додано та 0 видалено
+15
Переглянути файл
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="zhiqim">
<section name="ExportJar">
<item value="logs/*" key="excludeDirs"/>
<item value="dbo,test" key="excludePackages"/>
<item value="false" key="isDivided"/>
<item value="true" key="isExportAndZipProject"/>
<item value="true" key="isExportJavaSource"/>
<item value="false" key="isIncludeJavaFile"/>
<item value="zhiqim_orm" key="jarName"/>
<item value="D:/_gitcan/ZhiqimDK/zhiqim_orm/document/metainfo" key="metaInfoPath"/>
<item value="zhiqim_orm_v1.5.0" key="projectSourceName"/>
<item value="D:/_gitee/zhiqim/V1.5.0/ZhiqimDK" key="releasePath"/>
</section>
</section>
+14
Переглянути файл
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="zhiqim">
<section name="ExportJar">
<item value="logs/*" key="excludeDirs"/>
<item value="dbo,test" key="excludePackages"/>
<item value="false" key="isDivided"/>
<item value="true" key="isExportAndZipProject"/>
<item value="true" key="isIncludeJavaFile"/>
<item value="zhiqim_orm" key="jarName"/>
<item value="D:/_gitcan/ZhiqimDK/zhiqim_orm/document/metainfo" key="metaInfoPath"/>
<item value="zhiqim_orm_v1.5.1" key="projectSourceName"/>
<item value="D:/_gitee/zhiqim/V1.5.1/ZhiqimDK" key="releasePath"/>
</section>
</section>
+16
Переглянути файл
@@ -0,0 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ZhiqimORM
Bundle-SymbolicName: zhiqim_orm
Bundle-Version: 1.5.0
Export-Package: org.zhiqim.orm,
org.zhiqim.orm.annotation,
org.zhiqim.orm.config,
org.zhiqim.orm.datasource,
org.zhiqim.orm.dbo,
org.zhiqim.orm.dbo.condition,
org.zhiqim.orm.dbo.defined,
org.zhiqim.orm.executor,
org.zhiqim.orm.policy
Require-Bundle: zhiqim
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+90
Переглянути файл
@@ -0,0 +1,90 @@
V1.0.1.R2014022701
1)版本创建、整理
2)版本内部发布测试
3)版本内部测试完成,发布
V1.0.3.R2014060101
1)20140521修改"初始化DBO和STMT失败",改成"初始化DBO和SQL失败"
2)20140521增加FREL对表是否存在进行检查,如果不存在则创建加入缓存,下次认为存在
3)20140527增加Updater时对表达式的支持如updater.addFieldExpression("buyNum", "buyNum+1");表示在原值上加1
4)20140601修改FDBOExecutor.create中对replace表的BUG。原没有作replaceMap处理
V1.0.5.R2014081201
1)fadfox.jar增加JSON功能和HTTPC功能,涉及到ORM要求调整
2)对返回的ArrayList数据,作timeToSize()处理,优化内存
3)修改ORMServer中对多例配置的错误
V1.0.6.R2015011201
1)调整StringBuffer成StringBuilder
2)修改TransactionManager.beginTransaction()方法为获取第一个ORMServer,以前有BUG,并增加通过index和name获取ORMServer
3)修改FDBOExecutor中FDBO["+dbo.getName()+"]配置中未找到["+field.getField()+"]字段,的描述,原来的表达不正确
4)fadfox.jar调整DateTimes类方法,有影响,要求版本在V1.0.6R2015011201以上
V1.0.7.R2015052501
1)拆分FDataSource中getConnection时同步锁connList为两步,防止锁太大带来死锁
2)支持连接耗尽时,配置等待时长和重试次数,系统默认是5秒和1次
3)修改等待时长打印日志的错误
4)fadfox.jar修改了queryEndsWithFile方法
V1.1.0.R2015072901
1)根据fadfox整理成统一该版本
V1.1.1.R2015091401版本:
1)使用JDK1.7编译,增加ORMServer加载.xml时文件时否存在检查
V1.1.2.R2015102601
1)要求使用V1.1.2版本的fadfox.jar
2)修改FDbo为FTable,后期进行调整
3)修改for调用方式,合并Documents到Xmlx中
V1.1.3.R2016020301
1)春节前整理版本号
2)根据FTimer改动修改的版本
V1.2.0.R2016072101
1)调整FSQL配置,删除原来的<executeQuery>和<executeUpdate>,改成<sql id="id">content</sql>,更简单且更好理解
2)调整FSQL实现,对配置中删除的param和result两个配置,改成通过实时传入验证
3)调整FDBO成FTable,类似于表,更好记和理解
4)调整FREHL成FView,类似于视图,更好记和理解
5)调整Selector和Updater中的addWhere成addMaybe,表示如果且为null就不作为条件,与addMust必须不能为空,更好理解。
6)修改原throw new IlleglParameterException为throw Asserts.exception()和Asserts.asserts()
V1.2.1.R2016100801
1)增加对SQLite的支持,删除对Access的支持
2)修改SQL文件加载方式,以前是在classpath逐个查找,可能会碰到类或jar不允许加载,修改为通过orm.sql进行配置,配置支持file,folder,classpath,package四种
3)增加policy接口,以便支持6种数据库的适配
V1.2.2.R2017010101
1)配合fadfox.jar调整HashMap<String, Object>为FHashMapSO
2)增加FTabler对非持久化表(运行时增加的表)处理
3)增加FSQLer对DDL语句的处理,如修改表名,修改列名,修改列类型,增删列
V1.3.0.R2017022701
1)增加insertOrUpdate方法,是mysql特有的根据条件指定更新一些字段,而replace是更新所有字段
2)增加list读取指定位置的数据,支持pageNo和pageSize两个参数
3)增加对selector和updater的字段值和数据库要求进行强制检查,不一致不允许操作
4)增加对自连表、多表关联的视图时的别名的支持
5)修改判断字段的值是否合法,增加允许为null时传入null值
V1.3.1.R2017052801
1)修改Asserts.asserts为Asserts.as()方法,使用三目运算断言,防止断言为真时需要初始化无意义的断言失败字符串
2)增加ORMI18n类,实现国际化字符串静态字符串展示,当前用于断言失败字符串
3)增加select @@IDENTITY的处理方法Global.get(FSQL.class).identityInt()和identityLong()获取事务线程中的自增ID
4)修改isValidSelector和isValidUpdater方法,显示错误的字段信息
5)修复SQL中转义字符组装SQL时的BUG
6)修改连接池中,获取连接时,先检查是否活动中,活动中的连接优先跳过,以前是先判断是否有效,可能导致最后一次有效时被删除。
V1.3.2.R2017080501
1)修改boolean型的判断方法,如isTest字段,设置方法为void setTest(boolean isTest),判断方法为boolean isTest()
2)增加not like的支持,并修改方法中value值为Object,方便传入整型和长整型
3)增加orm.cache缓存表类的配置和实现,注意count/sum方法还是直接查数据库,item/list/page查缓存,insert/insertBatch/replace/update/delete更新缓存
4)增加FSQL.execute方法对SQLite数据时修改truncate为delete from
V1.3.3.R2017110601
1)增加selector表达式条件
2)增加selector左右联left join,right jon支持增加条件selector.addJoin(FDbo.class, new Selector("field", value));
3)修改原HashMap<String, Object>为FHashMapSO
V1.4.0.R2018010101
1)正式启用ZhiqimORM名称,原所有Fadfox改为Zhiqim,原所有fadfox改为zhiqim,原所有FADFOX改为ZHIQIM,原com.zhiqim.fadfox改为org.zhiqim.kernel
2)修改包结构,整理F前缀,更改ZSQLer为ZDDL
3)增加MySQL启动时对wait_timeout的检查,要求大于配置的3分钟
4)增加ZDDL.toColumnType(String fieldType, String fieldLength)
5)增加对SQLite的主键修改的独立处理功能
6)修改当服务关闭时没有从Global移除ZTable等实例的BUG
7)Class.forName修改成Classes.forName,防止ClassLoader不准确
V1.4.1.R2018072501
1)优化配置中当maxIdleTime未配置时取maxKeepTime
2)修改表缓存,支持@AnAlias别名作为key,增加表缓存定时刷新缓存,格式采用scheduler的格式
3)优化表缓存,修改排序不准确的BUG
V1.5.0.R2019010101
1)修改工程名为zhiqim_orm,使用zhiqim_kernel_v1.5.0_r2019010101库
2)增加IsEmpty和IsNotEmpty条件,由于MySQL中null和空字符串''不相等
3)增加存储过程的ZSQL支持,通过CallParam和CallResult传参和读取多结果,结果支持MAP和DBO
4)修复ORMServer关闭时没有把testConnnectioner关闭的的BUG
5)修复ZTabler未实现多例模式的BUG(导致多数据库配置失败)
6)根据zhiqim_kernel修改继承自Tasker到实现TaskEvery/Timer修改为Interval,修改为Threadx的处理方式
+129
Переглянути файл
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<zhiqim-dbo>
<config version="1.2.0" dbType="mysql" folder="../test" initDataWidth="1000">
<![CDATA[
/*
* 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙,邂逅框架梦]
*
* 知启蒙数据库映射(zhiqim_orm)在LGPL3.0协议下开源:https://www.zhiqim.com/gitcan/zhiqim/zhiqim_orm.htm
*
* This file is part of [zhiqim_orm].
*
* [zhiqim_orm] is free software: you can redistribute
* it and/or modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* [zhiqim_orm] is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with [zhiqim_orm].
* If not, see <http://www.gnu.org/licenses/>.
*/
]]>
</config>
<package name="org.zhiqim.orm.test.dbo" type="true" desc="系统配置表">
<table name="T_INTEGER" desc="整型测试表" key="T_ID" type="InnoDB">
<field column="T_ID" type="long" length="" notNull="true" desc="测试编号"/>
<field column="T_BOOLEAN" type="boolean" length="" notNull="true" desc="布尔型"/>
<field column="T_BYTE" type="byte" length="" notNull="true" desc="字节型"/>
<field column="T_SHORT" type="short" length="" notNull="true" desc="短整型"/>
<field column="T_INT" type="int" length="" notNull="true" desc="整型"/>
<field column="T_LONG" type="long" length="" notNull="true" desc="长整型"/>
<data PARAM_UPDATE="0" PARAM_DESC="是否使用管理页登录退出功能" GROUP_ID="zhiqim.manager" PARAM_POS="1" PARAM_VALUE="false" PARAM_KEY="hasManageLogin"/>
<data PARAM_UPDATE="1" PARAM_DESC="是否使用操作员组功能" GROUP_ID="zhiqim.manager" PARAM_POS="2" PARAM_VALUE="false" PARAM_KEY="hasOperatorGroup"/>
</table>
<table name="T_STRING" desc="测试字符串" key="T_ID" type="InnoDB">
<field column="T_ID" type="long" length="" notNull="true" desc="测试编号"/>
<field column="T_CHAR" type="string" length="19,char" notNull="false" desc="定长字符串"/>
<field column="T_VARCHAR" type="string" length="32" notNull="false" desc="变长字符串"/>
<field column="T_STRING2000" type="string" length="2000" notNull="false" desc="变成2000长度"/>
<field column="T_STRING4000" type="string" length="4000" notNull="false" desc="变长4000长度"/>
<field column="T_STRING8000" type="string" length="8000" notNull="false" desc="变长8000长度"/>
<field column="T_STRING16000" type="string" length="16000" notNull="false" desc="变长16000长度"/>
</table>
<table name="T_DATETIME" desc="测试日期格式" key="T_ID" type="InnoDB">
<field column="T_ID" type="long" length="" notNull="true" desc="测试编号"/>
<field column="T_DATETIME" type="datetime" length="" notNull="true" desc="测试日期"/>
<field column="T_DATETIME2" type="datetime" length="" notNull="true" desc="测试日期"/>
</table>
<table name="T_DECIMAL" desc="测试小数格式" key="T_ID" type="InnoDB">
<field column="T_ID" type="long" length="" notNull="true" desc="测试编号"/>
<field column="T_DM5_2" type="decimal" length="5,2" notNull="true" desc="测试5位长度,小数2位"/>
<field column="T_DM10_3" type="decimal" length="10,3" notNull="true" desc="测试10位长度,小数3位"/>
<field column="T_DM15_4" type="decimal" length="15,4" notNull="true" desc="测试15位长度,小数4位"/>
</table>
<table name="T_AUTO" desc="测试自增长字段" key="T_ID" type="InnoDB">
<field column="T_ID" type="long" length="" notNull="true" desc="测试编号"/>
<field column="T_VARCHAR" type="string" length="32" notNull="false" desc="变长字符串"/>
</table>
<table name="MESSAGE" desc="留言表" key="MESSAGE_ID" type="InnoDB">
<field column="MESSAGE_ID" type="long" length="" notNull="true" desc="留言编号"/>
<field column="MESSAGE_NAME" type="string" length="32" notNull="true" desc="访客称呼"/>
<field column="MESSAGE_CONTACTING" type="string" length="50" notNull="false" desc="访客联系方式"/>
<field column="MESSAGE_CONTENT" type="string" length="1000" notNull="true" desc="访客留言内容"/>
<field column="MESSAGE_TIME" type="string" length="19,char" notNull="true" desc="访客留言时间"/>
<field column="MESSAGE_RTIME" type="string" length="19,char" notNull="false" desc="管理员回复时间"/>
<field column="MESSAGE_REPLY" type="string" length="1000" notNull="false" desc="管理员回复内容"/>
</table>
<table name="ADMIN" desc="管理员表" key="ADMIN_NAME" type="InnoDB">
<field column="ADMIN_NAME" type="string" length="32" notNull="true" desc="管理员名称"/>
<field column="ADMIN_PASS" type="string" length="32" notNull="true" desc="管理员密码"/>
<field column="ADMIN_TIME" type="string" length="19,char" notNull="true" desc="管理员时间"/>
<data ADMIN_NAME="admin" ADMIN_PASS="111111"/>
</table>
<table name="ORDER" desc="订单表" key="ORDER_ID" type="InnoDB">
<field column="ORDER_ID" type="long" length="" notNull="true" desc="订单编号"/>
</table>
</package>
<package name="org.zhiqim.orm.test.dboext" type="true" desc="系统配置表">
<view name="T_INTEGER_STRING" type="true" desc="整型和字符串视图" table="T_INTEGER,T_STRING">
<join type="EQUAL" lTable="T_INTEGER" lColumn="T_ID" rTable="T_STRING" rColumn="T_ID"/>
<field column="*" table="T_INTEGER"/>
<field column="T_CHAR" table="T_STRING"/>
<field column="T_VARCHAR" table="T_STRING"/>
</view>
<view name="T_INTEGER_DATETIME" type="true" desc="整型和时间视图" table="T_INTEGER,T_DATETIME">
<join type="EQUAL" lTable="T_INTEGER" lColumn="T_ID" rTable="T_DATETIME" rColumn="T_ID"/>
<field column="*" table="T_INTEGER"/>
<field column="T_DATETIME" table="T_DATETIME"/>
</view>
<view name="T_INTEGER_DECIMAL" type="true" desc="整型和小数视图" table="T_INTEGER,T_DECIMAL">
<join type="EQUAL" lTable="T_INTEGER" lColumn="T_ID" rTable="T_DECIMAL" rColumn="T_ID"/>
<field column="T_ID" table="T_INTEGER"/>
<field column="T_BOOLEAN" table="T_INTEGER"/>
<field column="T_DM5_2" table="T_DECIMAL"/>
<field column="T_DM10_3" table="T_DECIMAL"/>
</view>
<view name="T_INTEGER_STRING_LEFT" type="true" desc="整型和字符串左联视图" table="T_INTEGER,T_STRING">
<join type="LEFT" lTable="T_INTEGER" lColumn="T_ID" rTable="T_STRING" rColumn="T_ID"/>
<field column="*" table="T_INTEGER"/>
<field column="T_CHAR" table="T_STRING"/>
<field column="T_VARCHAR" table="T_STRING"/>
</view>
</package>
</zhiqim-dbo>
+106
Переглянути файл
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<zhiqim-dbo>
<config version="1.2.0" dbType="postgresql" folder="../test" initDataWidth="820">
<![CDATA[
/*
* 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙,邂逅框架梦]
*
* 知启蒙数据库映射(zhiqim_orm)在LGPL3.0协议下开源:https://www.zhiqim.com/gitcan/zhiqim/zhiqim_orm.htm
*
* This file is part of [zhiqim_orm].
*
* [zhiqim_orm] is free software: you can redistribute
* it and/or modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* [zhiqim_orm] is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with [zhiqim_orm].
* If not, see <http://www.gnu.org/licenses/>.
*/
]]>
</config>
<package name="org.zhiqim.orm.test.qc.dbo" type="true" desc="问答定义表">
<table name="QC_QUESTION$ID$" desc="问答问题表" key="QUESTION_ID" type="InnoDB">
<field column="QUESTION_ID" type="long" length="" notNull="true" desc="问题编号"/>
<field column="QUESTION_TYPE" type="int" length="" notNull="true" desc="问题类型: 0技术疑问 1职业疑惑 2生活杂谈 3资讯动态 4其他"/>
<field column="QUESTION_STATUS" type="int" length="" notNull="true" desc="问题状态:0表示正常,1表示停用"/>
<field column="QUESTION_TITLE" type="string" length="100" notNull="true" desc="问题标题"/>
<field column="QUESTION_DESC" type="string" length="4000" notNull="true" desc="问题描述"/>
<field column="QUESTION_USER_ID" type="long" length="" notNull="true" desc="问题作者编号"/>
<field column="QUESTION_CREATE_TIME" type="string" length="19,char" notNull="true" desc="问题发表时间"/>
<field column="QUESTION_REPLY_NUM" type="int" length="" notNull="true" desc="问题评论数"/>
<field column="QUESTION_READ_NUM" type="int" length="" notNull="true" desc="问题阅读数"/>
</table>
<table name="QC_COMMENT" desc="问答评论表" key="QUESTION_ID,COMMENT_ID" type="InnoDB">
<field column="QUESTION_ID" type="long" length="" notNull="true" desc="问题编号"/>
<field column="COMMENT_ID" type="long" length="" notNull="true" desc="评论编号"/>
<field column="COMMENT_CONTENT" type="string" length="4000" notNull="true" desc="评论内容"/>
<field column="COMMENT_USER_ID" type="long" length="" notNull="true" desc="评论作者编号"/>
<field column="COMMENT_GOOD_NUM" type="int" length="" notNull="true" desc="点赞数"/>
<field column="COMMENT_CREATE_TIME" type="string" length="19,char" notNull="true" desc="评论发表时间"/>
</table>
<table name="QC_ANSWER" desc="回复表" key="COMMENT_ID,ANSWER_ID" type="InnoDB">
<field column="QUESTION_ID" type="long" length="" notNull="true" desc="问题编号"/>
<field column="COMMENT_ID" type="long" length="" notNull="true" desc="评论编号"/>
<field column="ANSWER_ID" type="long" length="" notNull="true" desc="回复编号"/>
<field column="COMMENT_USER_ID" type="long" length="" notNull="true" desc="评论作者编号"/>
<field column="ANSWER_CONTENT" type="string" length="2000" notNull="true" desc="回复内容"/>
<field column="ANSWER_USER_ID" type="long" length="" notNull="true" desc="回复作者编号"/>
<field column="ANSWER_TIME" type="string" length="19,char" notNull="true" desc="回复时间"/>
</table>
<table name="QC_GOOD" desc="点赞表" key="COMMENT_ID,GOOD_USER_ID" type="InnoDB">
<field column="COMMENT_ID" type="long" length="" notNull="true" desc="评论编号"/>
<field column="GOOD_USER_ID" type="long" length="" notNull="true" desc="点赞人编号"/>
</table>
<table name="USER_ACCOUNT" desc="用户表" key="USER_ID" type="InnoDB">
<field column="USER_ID" type="long" length="" notNull="true" desc="用户编号"/>
<field column="USER_NICK" type="string" length="32" notNull="false" desc="用户昵称"/>
<field column="USER_AVATAR_50" type="string" length="200" notNull="false" desc="用户头像"/>
</table>
</package>
<package name="org.zhiqim.orm.test.qc.ex" type="true" desc="问答扩展表">
<view name="QUESTION_EX" type="true" desc="问题扩展表" table="QC_QUESTION$ID$,USER_ACCOUNT">
<join type="EQUAL" lTable="QC_QUESTION$ID$" lColumn="QUESTION_USER_ID" rTable="USER_ACCOUNT" rColumn="USER_ID"/>
<field column="USER_NICK" table="USER_ACCOUNT"/>
<field column="USER_AVATAR_50" table="USER_ACCOUNT"/>
<field column="*" table="QC_QUESTION$ID$"/>
</view>
<view name="COMMENT_EX" type="true" desc="评论扩展表" table="QC_COMMENT,USER_ACCOUNT">
<join type="EQUAL" lTable="QC_COMMENT" lColumn="COMMENT_USER_ID" rTable="USER_ACCOUNT" rColumn="USER_ID"/>
<field column="USER_NICK" table="USER_ACCOUNT"/>
<field column="USER_AVATAR_50" table="USER_ACCOUNT"/>
<field column="*" table="QC_COMMENT"/>
</view>
<view name="ANSWER_EX" type="true" desc="回复扩展表" table="QC_ANSWER,USER_ACCOUNT a,USER_ACCOUNT b">
<join type="EQUAL" lTable="QC_ANSWER" lColumn="ANSWER_USER_ID" rTable="a" rColumn="USER_ID"/>
<join type="LEFT" lTable="QC_ANSWER" lColumn="COMMENT_USER_ID" rTable="b" rColumn="USER_ID"/>
<field column="USER_NICK ANSWER_USER_NICK" table="a"/>
<field column="USER_AVATAR_50 ANSWER_USER_AVATAR_50" table="a"/>
<field column="USER_NICK COMMENT_USER_NICK" table="b"/>
<field column="USER_AVATAR_50 COMMENT_USER_AVATAR_50" table="b"/>
<field column="*" table="QC_ANSWER"/>
</view>
</package>
</zhiqim-dbo>