[Open Source] A Tool That Converts Database SQL Statements into RESTful-Style HTTP APIs

Open SourceProcess Management
2026-06-28 06:03 14 次浏览 • 0 次下载 0KB
[Open Source] A Tool That Converts Database SQL Statements into RESTful-Style HTTP APIs

1. Project Overview

SQLREST

Image

A tool that converts database SQL statements into RESTful-style HTTP APIs.

SQLREST is a fully open-source SQL2API low-code tool.

2. Open Source License

The author has not yet specified an open-source license.

3. Screenshots

1. Screenshots of Some System Interfaces

000.png
001.png
002.png
003.png
004.png
005.png
006.png
007.png
008.png
009.png
010.png

4. Feature Overview

In a nutshell, SQLREST provides tools for quickly building RESTful APIs using both SQL statements and Groovy scripts. Its features include:

  • Build RESTful APIs Using SQL

Provides a dynamic SQL syntax similar to MyBatis for building APIs.

  • Build RESTful APIs Using Scripts

Uses Groovy scripting syntax to build APIs for complex scenarios.

  • Supports Token-Based API Authentication

The executor supports token generation and token authentication.

  • Supports x-www-form-urlencoded and JSON API Request Parameters

HTTP request parameters support formats such as application/x-www-form-urlencoded and application/json.

  • Supports Online API Documentation Generation

Provides online API documentation generation based on swagger-ui.

  • Supports API Traffic Control

The executor uses Sentinel to provide API traffic control capabilities.

2. Supported Databases

  • Oracle Database by Oracle
  • Microsoft SQL Server by Microsoft
  • MySQL
  • MariaDB
  • PostgreSQL
  • Greenplum (requires using the PostgreSQL type)
  • DB2 by IBM
  • Sybase Database
  • Domestic Dameng Database (DM)
  • Domestic Kingbase Database (Kingbase8)
  • Domestic HighGo Database
  • Domestic Shentong Database (Oscar)
  • Domestic Nanda General Database (GBase8a)
  • Apache Hive
  • SQLite3
  • OpenGauss
  • ClickHouse
  • Apache Doris
  • StarRocks
  • OceanBase

3. Module Structure and Functions

└── sqlrest
    ├── sqlrest-common           // sqlrest common definition module
    ├── sqlrest-template         // sqlrest SQL content template module
    ├── sqlrest-cache            // sqlrest executor cache module
    ├── sqlrest-persistence      // sqlrest database persistence module
    ├── sqlrest-core             // sqlrest-core API implementation module
    ├── sqlrest-gateway          // Gateway gateway node
    ├── sqlrest-executor         // Executor API execution node
    ├── sqlrest-manager          // Manager management node
    ├── sqlrest-manager-ui       // Vue2-based Manager frontend WEB interface
    ├── sqlrest-dist             // Project packaging module based on the maven-assembly-plugin plugin

4. Planned Features

  • (1) API Response Fields and Documentation

Define API response fields and their documentation through manual configuration or API debugging.

  • (2) Support API Cache Configuration

Implement API cache configuration using distributed caching and other technologies.

  • (3) SQL Result Set Output Format Conversion

Convert SQL query result sets into the corresponding API response formats.

  • (4) Overall Frontend Interface Enhancement

Improve the visual presentation and interaction of the interface.

5. Tech Stack

Build and Package

This tool is developed entirely in Java, and all dependencies come from open-source projects.

1. Build and Package

  • Environment Requirements:
  • JDK
    :>=1.8 (JDK 1.8 is recommended)
  • maven
    :>=3.6

Maven repositories are hosted overseas by default, which can result in slow access from China. You can switch to Alibaba Cloud's Maven repository.

Reference Tutorial: Alibaba Cloud Maven Repository Configuration Guide

  • Build Commands:

(1) On Windows:

Double-click the build.cmd script file to compile and package the project.

(2) On Linux:

git clone sqlrest
cd sqlrest/
sh ./build.sh

(3) With Docker:

git clone sqlrest
cd sqlrest/
sh ./docker-maven-build.sh

2. Installation and Deployment

See the README.md documentation for details

#1
资源直链https://gitee.com/inrgihc/sqlrest
去下载
星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare