Comments (1)
问题答疑
1. 学习和使用 APIJSON 需要了解哪些相关的知识?
需要了解 MySQL/PostgreSQL 或其它数据库的安装、建表、记录数据写入,Java IDE(InteliJ IDEA 或 Eclipse) 的安装,JDBC 驱动的接入(maven 或 jar 依赖)
https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONDemo/pom.xml
2. 接入不同数据库时,是否需要修改相关源码?
如果在业务项目(假设为 APIJSONDemo)则需要引入 maven/jar 依赖,并修改 DemoSQLConfig.java 的源码来配置数据库。
如果在 APIJSON 生成的 SQL 后出现不兼容该数据库 SQL 语法,则需要改 AbstractSQLConfig.java 的源码。
3. APIJSON 源码需要掌握到什么程度?
能够修改 APIJSONDemo 的源码,及 APIJSON AbstractSQLConfig.java 关于 JSON 转 SQL 的过程,可以参考用户写的源码解析
https://github.com/rainboy-learn/apijson-learn
例如对接 DB2 最主要的是部署数据库,接入对应的 JDBC 把它跑起来,可以使用最简单的 Demo 来修改
https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-Java-Server
AbstractSQLConfig.java 中 JSON 转 SQL 应该只需要把 分页 语法调整下就可以兼容低版本,
可以参考有个开发者贡献的 Oracle 分页语法(修改了 getSQL 和 getLimitString,使用 ROWNUM 和子查询)
Tencent/APIJSON@08a3125
AbstractSQLConfig.java 中 getQuote 为字段名引号,MySQL 用的是反引号 `id` , PostgreSQL/SQLServer/Oracle 都是双引号 "id",
如果字段名和数据库关键词没有冲突,可以直接 return ""; 即不使用引号,对于大部分数据库也都没问题。
from opensourcetalent.
Related Issues (20)
- 2022腾讯犀牛鸟开源人才培养计划-TencentOS Tiny
- 2022腾讯犀牛鸟开源人才培养计划-TDesign
- 2022腾讯犀牛鸟开源人才培养计划-Tencent konajdk
- 2022腾讯犀牛鸟开源人才培养计划-3TS
- 2022腾讯犀牛鸟开源人才培养计划-NCNN
- 开源项目实战-项目申请书模板
- 腾讯犀牛鸟开源人才培养计划 2023年是否继续开展? HOT 1
- 2024腾讯犀牛鸟开源人才培养计划-Apache InLong HOT 1
- 2024腾讯犀牛鸟开源人才培养计划-ncnn
- 2024腾讯犀牛鸟开源人才培养计划—Cherry Markdown
- 2024腾讯犀牛鸟开源人才培养计划—OpenCloudOS HOT 1
- 2024腾讯犀牛鸟开源人才培养计划—OMI HOT 1
- 2024腾讯犀牛鸟开源人才培养计划—TobudOS
- 2024腾讯犀牛鸟开源人才培养计划—TDesign
- 2024腾讯犀牛鸟开源人才培养计划—Tencent KonaJDK
- 2024腾讯犀牛鸟开源人才培养计划—3TS
- 腾讯犀牛鸟开源人才培养计划 2024年是否继续开展? HOT 5
- 2024腾讯犀牛鸟开源人才培养计划—tRPC
- 2024腾讯犀牛鸟开源人才培养计划—HunyuanDiT HOT 3
- issue实战指南:如何参与和完成issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensourcetalent.