開源地址:
更新內容
1、初步支持tidb,建議可以初步試用
2、針對elastic升級fastjson到1.2.70版本,修復安全漏洞,同時升級spring依賴版本
3、優化少量代碼
4、初步增加guassdb、oceanbase的方言支持,希望有相關使用者協助測試!
5、quickvo 將欄位對應資料庫原始類型作為vo屬性備註輸出,便於調整類型匹配
sqltoy特點說明:
* sqltoy的sql編寫(支持嵌套)
select *from sqltoy_device_order_info t where #[t.ORDER_ID=:orderId] #[and t.ORGAN_ID in (:authedOrganIds)] #[and t.STAFF_ID in (:staffIds)] #[and t.TRANS_DATE>=:beginDate] #[and t.TRANS_DATE<:endDate]
* mybatis同樣功能實現
select * from sqltoy_device_order_info t <where> <if test="orderId!=null"> and t.ORDER_ID=#{orderId} </if> <if test="authedOrganIds!=null"> and t.ORGAN_ID in <foreach collection="authedOrganIds" item="order_id" separator="," open="(" close=")"> #{order_id} </foreach> </if> <if test="staffIds!=null"> and t.STAFF_ID in <foreach collection="staffIds" item="staff_id" separator="," open="(" close=")"> #{staff_id} </foreach> </if> <if test="beginDate!=null"> and t.TRANS_DATE>=#{beginDate} </if> <if test="endDate!=null"> and t.TRANS_DATE<#{endDate} </if></where>
1、shortNanoTime 22位有序安全ID,格式: 13位當前毫秒+6位納秒+3位主機ID2、nanoTimeId 26位有序安全ID,格式:15位:yyMMddHHmmssSSS+6位納秒+2位(線程Id+隨機數)+3位主機ID3、uuid:32 位uuid4、SnowflakeId 雪花算法ID5、redisId 基於redis 來產生規則的ID主鍵
public class SqlToyContext implements ApplicationContextAware { // 省略其他代碼 /** * @todo 提供可以動態增加解析sql片段配置的接口,並返回具體id,用於第三方平臺集成,如報表平臺等 * @param sqlSegment * @return * @throws Exception */ public synchronized SqlToyConfig parseSqlSegment(Object sqlSegment) throws Exception { return scriptLoader.parseSqlSagment(sqlSegment); }}