magic-api 0.5.5 is released, adding LINQ-style query

This update content:

  • New Linqquery and related functions
// 以下是一个分组+聚合的示例,相比lambda方式更直观一些。
return 
    select 
        t.api_group_id,
        count(t.api_group_id) count
    from db.select('select api_group_id from magic_api_info') t
    group by t.api_group_id
    order by count(t.api_group_id) desc
  • New aggregate functions group_concat, count, sum, max, min,avg
  • New functions round, ceil, floor, precent, date_format, ifnull,now
  • New custom function
  • Optimize 运行日志output
  • Optimize access to interface details, compatible with some unexpected situations

Project Introduction

magic-api is a Java-based interface rapid development framework. The interface will be written through the UI interface provided by magic-api, and it will be automatically mapped to an HTTP interface without defining Java objects such as Controller, Service, Dao, Mapper, XML, VO, etc. Complete common HTTP API interface development

How to use

maven introduction

<!-- 以spring-boot-starter的方式引用 -->
<dependency>
    <groupId>org.ssssssss</groupId>
    <artifactId>magic-api-spring-boot-starter</artifactId>
    <version>0.5.5</version>
</dependency

Modify application.properties

server.port =9999
 #Configure web page entrance 
magic.web =/magic/web
 #The following configuration needs to be modified 
according to the actual situation spring.datasource.url =jdbc:mysql://localhost/test
 spring.datasource.username =root
 spring. datasource.password =123456789
 spring.datasource.driver-class-name =com.mysql.jdbc.Drive

Execute table creation statement

Execute the db/magic-api.sql table creation statement in the source code 

Online editing

Access http://localhost:9999/magic/webto operate

Documents & Demo

Project screenshot

Overall screenshot

Switch skin

Code hint

DEBUG

history record

Guess you like

Origin www.oschina.net/news/124800/magic-api-0-5-5-released