Dataway 4.2.0 发布,全面支持各类数据库,各类型 SQL 语句,支持 nacos

栏目: 软件资讯 · 发布时间: 3年前

内容简介:Dataway介绍 Dataway 是基于 DataQL 服务聚合能力,为应用提供的一个接口配置工具。使得使用者无需开发任何代码就配置一个满足需求的接口。 整个接口配置、测试、冒烟、发布。一站式都通过 Dataway 提供的 UI 界面...

Dataway介绍

Dataway 4.2.0 发布,全面支持各类数据库,各类型  <a href='https://www.codercto.com/topics/18630.html'>SQL</a>  语句,支持 nacos

Dataway 是基于 DataQL 服务聚合能力,为应用提供的一个接口配置工具。使得使用者无需开发任何代码就配置一个满足需求的接口。 整个接口配置、测试、冒烟、发布。一站式都通过 Dataway 提供的 UI 界面完成。UI 会以 Jar 包方式提供并集成到应用中并和应用共享同一个 http 端口,应用无需单独为 Dataway 开辟新的管理端口。

这种内嵌集成方式模式的优点是,可以使得大部分老项目都可以在无侵入的情况下直接应用 Dataway。进而改进老项目的迭代效率,大大减少企业项目研发成本。

Dataway 工具化的提供 DataQL 配置能力。这种研发模式的变革使得,相当多的需求开发场景只需要配置即可完成交付。 从而避免了从数据存取到前端接口之间的一系列开发任务,例如:Mapper、BO、VO、DO、DAO、Service、Controller 统统不在需要。

新增

  • 【Issue】https://gitee.com/zycgit/hasor/issues/I1M93Z 支持多条 SQL 语句同时执行。
  • 新增 FRAGMENT_SQL_MULTIPLE_QUERIES hint,这个 hint 可以处理多条 SQL 同时执行时结果的保留策略。
  • 新增 LookupConnectionListener SPI 功效和 LookupDataSourceListener 类似只不过是进一步到 Connection。
  • 新增 FxSqlCheckChainSpi 扩展点可以用于执行 @@sql 时对 SQL 进行检查和改写。 
  • Dataway 沉淀 dataAccessLayer 元信息访问层
  • hasor-web :HttpParameters 增加三组方法clearReplaceMap、mergeReplaceMap、appendMap。
  • JdbcTemplate 增加一组 loadSplitSQL 方法,可以通过一个分隔符将 load 的SQL脚本分成多次执行。
  • 增加 HASOR_DATAQL_DATAWAY_DAL_TYPE 环境变量用于选择 dataway 元信息存储器类型。
  • dataql-fx-hconfig.xml 中 Fragment 提升到配置文件中配置。
  • dataway-hconfig.xml 中 dataAccessLayer 可以配置文件定义不同的 provider 然后利用 HASOR_DATAQL_DATAWAY_DAL_TYPE 来选择。
  • 新增 nacos 的支持,利用 nacos 来充当接口配置信息的存储器。

优化

  • 支持多条 SQL 语句同时执行。
  • SqlFragment 迎来重大升级。弱化了 SqlMode 的作用,允许执行其它类型的 SQL。 因此例如:存储过程的在 4.1.14 版本中得到了支持。
  • Dataway - release 表
    • 增加 comment 字段
    • 表全列改为字符串类型,并取消 pub_id 字段的自增特性
    • 原 api_path + api_method 作为唯一索引中删除 api_method 字段
  • Dataway - info 表
    • 表全列改为字符串类型,并取消 api_id 字段的自增特性
    • 为 pub_path 字段增加一个常规索引
  • pub_schema(release 表)、api_schema(info 表)字段存储内容优化
    • requestSchema 改名为 requestBody
    • responseSchema 改名为 responseBody
    • 新增 requestHeader、responseHeader。
    • 所有字段内容格式均为 JsonSchema 格式。
  • pub_sample(release 表)、api_sample(info 表)字段存储内容优化
    • headerData 改名为 requestHeader,内容格式从 JSON 对象改为 JSON 字符串。
    • 新增 responseBody、responseHeader 两个字段,内容也是 JSON 字符串。
  • 接口发布历史中,增加状态显示。
    • Dataway 4.2.0 发布,全面支持各类数据库,各类型 SQL 语句,支持 nacos
  • 删除 HASOR_DATAQL_DATAWAY_FORCE_DBTYPE 环境变量及其功能。
  • 删除 DataQL 中默认全局变量 dbMapping。
  • 删除 DataBaseMapping 枚举。

修复

  • 修复新增接口保存成功之后,无法点击冒烟和发布的问题。受影响所有 Editor 状态的接口都会无法冒烟和发布。
  • 解决 DatawayFinder 可能导致的循环依赖问题。

版本下官方提供的 元信息存储,数据库建表语句扩充了一倍,已经达到了 8 个。

http://www.hasor.net/doc/pages/viewpage.action?pageId=1573294

Dataway 4.2.0 发布,全面支持各类数据库,各类型 SQL 语句,支持 nacos

Dataway 4.1.5~4.1.13 数据库升级脚本,建议升级之前进行数据备份(Mysql 升级脚本)

/* 默认数据订正 */
update interface_info set api_comment = '' where api_comment is null;
update interface_info set api_schema = '{}' where api_schema is null;
update interface_info set api_sample = '{}' where api_sample is null;
update interface_info set api_option = '{}' where api_option is null;
update interface_info set api_create_time = now() where api_create_time is null;
update interface_info set api_gmt_time = now() where api_gmt_time is null;
 
update interface_release set pub_script = '' where pub_script is null;
update interface_release set pub_script_ori = '' where pub_script_ori is null;
update interface_release set pub_schema = '{}' where pub_schema is null;
update interface_release set pub_sample = '{}' where pub_sample is null;
update interface_release set pub_option = '{}' where pub_option is null;
update interface_release set pub_release_time = now() where pub_release_time is null;
 
/* 表结构变更 */
alter table interface_info
    modify api_id varchar(64) not null comment 'ID';
alter table interface_info
    modify api_status varchar(4) not null comment '状态:0,1,2,3';
alter table interface_info
    modify api_comment varchar(255) not null comment '注释';
alter table interface_info
    modify api_schema mediumtext not null comment '接口的请求/响应数据结构';
alter table interface_info
    modify api_sample mediumtext not null comment '请求/响应/请求头样本数据';
alter table interface_info
    modify api_option mediumtext not null comment '扩展配置信息';
alter table interface_info
    modify api_create_time varchar(32) not null comment '创建时间';
alter table interface_info
    modify api_gmt_time varchar(32) not null comment '修改时间';
 
alter table interface_release
    modify pub_id varchar(64) not null comment 'Publish ID';
alter table interface_release
    modify pub_api_id varchar(64) not null comment '所属API ID';
alter table interface_release
    modify pub_status varchar(4) not null comment '状态:0有效,1无效(可能被下线)';
alter table interface_release
    modify pub_script mediumtext not null comment '查询脚本:xxxxxxx';
alter table interface_release
    modify pub_script_ori mediumtext not null comment '原始查询脚本,仅当类型为SQL时不同';
alter table interface_release
    modify pub_schema mediumtext not null comment '接口的请求/响应数据结构';
alter table interface_release
    modify pub_sample mediumtext not null comment '请求/响应/请求头样本数据';
alter table interface_release
    modify pub_option mediumtext not null comment '扩展配置信息';
alter table interface_release
    modify pub_release_time varchar(32) not null comment '发布时间(下线不更新)';
alter table interface_release
    add pub_comment varchar(255) default '' not null comment '备注';
alter table interface_release
    modify pub_comment varchar(255) not null comment '备注';
 
/* 重建索引 */
alter table interface_info drop key idx_interface_info;
alter table interface_info
    add constraint idx_interface_info
        unique (api_path);
create index idx_interface_release_path
    on interface_release (pub_path);
 
/* 时间日期数据订正 */
update interface_info set
    api_create_time = UNIX_TIMESTAMP(STR_TO_DATE(api_create_time, '%Y-%m-%d %H:%i:%s') * 1000),
    api_gmt_time = UNIX_TIMESTAMP(STR_TO_DATE(api_gmt_time, '%Y-%m-%d %H:%i:%s') * 1000);
update interface_release set
    pub_release_time = UNIX_TIMESTAMP(STR_TO_DATE(pub_release_time, '%Y-%m-%d %H:%i:%s') * 1000);

 


以上所述就是小编给大家介绍的《Dataway 4.2.0 发布,全面支持各类数据库,各类型 SQL 语句,支持 nacos》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

明解C语言(第3版)

明解C语言(第3版)

[日] 柴田望洋 / 管杰、罗勇、杜晓静 / 人民邮电出版社 / 2015-11-1 / 79.00元

本书是日本的C语言经典教材,自出版以来不断重印、修订,被誉为“C语言圣经”。 本书图文并茂,示例丰富,第3版从190段代码和164幅图表增加至205段代码和220幅图表,对C语言的基础知识进行了彻底剖析,内容涉及数组、函数、指针、文件操作等。对于C语言语法以及一些难以理解的概念,均以精心绘制的示意图,清晰、通俗地进行讲解。原著在日本广受欢迎,始终位于网上书店C语言著作排行榜首位。一起来看看 《明解C语言(第3版)》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

html转js在线工具
html转js在线工具

html转js在线工具