Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions APIJSONORM/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# APIJSONORM [![](https://jitpack.io/v/Tencent/APIJSON.svg)](https://jitpack.io/#Tencent/APIJSON) [<img src="https://devin.ai/assets/deepwiki-badge.png" alt="Ask DeepWiki.com" height="20"/>](https://deepwiki.com/Tencent/APIJSON)
腾讯 [APIJSON](https://github.com/Tencent/APIJSON) ORM 库,可通过 Maven, Gradle 等远程依赖。<br />
Tencent [APIJSON](https://github.com/Tencent/APIJSON) ORM library for remote dependencies with Maven, Gradle, etc.
# APIJSONORM [![](https://jitpack.io/v/APIJSON/APIJSON.svg)](https://jitpack.io/#APIJSON/APIJSON) [<img src="https://devin.ai/assets/deepwiki-badge.png" alt="Ask DeepWiki.com" height="20"/>](https://deepwiki.com/APIJSON/APIJSON)
[APIJSON](https://github.com/APIJSON/APIJSON) ORM 库,可通过 Maven, Gradle 等远程依赖。<br />
[APIJSON](https://github.com/APIJSON/APIJSON) ORM library for remote dependencies with Maven, Gradle, etc.

### Maven
#### 1. 在 pom.xml 中添加 JitPack 仓库
Expand All @@ -19,9 +19,9 @@ Tencent [APIJSON](https://github.com/Tencent/APIJSON) ORM library for remote dep
#### 2. Add the APIJSON dependency to pom.xml
```xml
<dependency>
<groupId>com.github.Tencent</groupId>
<groupId>com.github.APIJSON</groupId>
<artifactId>APIJSON</artifactId>
<version>8.1.8</version>
<version>latest</version>
</dependency>
```

Expand All @@ -45,7 +45,7 @@ Tencent [APIJSON](https://github.com/Tencent/APIJSON) ORM library for remote dep
#### 2. Add the APIJSON dependency in one of your modules(such as `app`)
```gradle
dependencies {
implementation 'com.github.Tencent:APIJSON:8.1.8'
implementation 'com.github.APIJSON:APIJSON:latest'
}
```

Expand All @@ -54,7 +54,7 @@ Tencent [APIJSON](https://github.com/Tencent/APIJSON) ORM library for remote dep

### FASTJSON 2
#### Code
https://github.com/Tencent/APIJSON/tree/fastjson2
https://github.com/APIJSON/APIJSON/tree/fastjson2

#### Maven
https://mvnrepository.com/artifact/com.github.linushp/zikai-apijson/1.0
Expand Down
4 changes: 2 additions & 2 deletions APIJSONORM/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.Tencent</groupId>
<groupId>com.github.APIJSON</groupId>
<artifactId>APIJSON</artifactId>
<version>8.3.0</version>
<version>10.0.0</version>
<packaging>jar</packaging>

<name>APIJSONORM</name>
Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/JSON.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/JSONCreator.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/JSONList.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/JSONMap.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/JSONParser.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/JSONRequest.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/JSONResponse.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
4 changes: 2 additions & 2 deletions APIJSONORM/src/main/java/apijson/Log.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand All @@ -12,7 +12,7 @@
*/
public class Log {
public static boolean DEBUG = false;
public static final String VERSION = "8.3.0";
public static final String VERSION = "10.0.0";

public static final String LEVEL_VERBOSE = "VERBOSE";
public static final String LEVEL_INFO = "INFO";
Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/MethodAccess.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/NotNull.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/RequestMethod.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/SQL.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
10 changes: 5 additions & 5 deletions APIJSONORM/src/main/java/apijson/StringUtil.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down Expand Up @@ -114,7 +114,7 @@ public static String get(Object[] arr, boolean ignoreEmptyItem) {
public static String get(Object[] arr, String split) {
return get(arr, split, false);
}
//CS304 Issue link: https://github.com/Tencent/APIJSON/issues/182
//CS304 Issue link: https://github.com/APIJSON/APIJSON/issues/182
/**获取string,为null则返回""
* @param arr -the str arr given
* @param split -the token used to split
Expand Down Expand Up @@ -192,7 +192,7 @@ public static String getString(Object[] array, boolean ignoreEmptyItem) {
public static String getString(Object[] array, String split) {
return get(array, split, false);
}
//CS304 Issue link: https://github.com/Tencent/APIJSON/issues/182
//CS304 Issue link: https://github.com/APIJSON/APIJSON/issues/182
/**FIXME 用 get 替代
* @param array -the str array given
* @param split -the token used to split
Expand Down Expand Up @@ -755,7 +755,7 @@ public static String getNumber(String s) {
return getNumber(s, false);
}

//CS304 Issue link: https://github.com/Tencent/APIJSON/issues/182
//CS304 Issue link: https://github.com/APIJSON/APIJSON/issues/182
/**去掉string内所有非数字类型字符
* @param s -string passed in
* @param onlyStart 中间有非数字时只获取前面的数字
Expand Down Expand Up @@ -858,7 +858,7 @@ public static String getCorrectEmail(String email) {
public static String getPrice(String price) {
return getPrice(price, PRICE_FORMAT_DEFAULT);
}
//CS304 Issue link: https://github.com/Tencent/APIJSON/issues/182
//CS304 Issue link: https://github.com/APIJSON/APIJSON/issues/182
/**获取价格,保留两位小数
* @param price -price passed in
* @param formatType 添加单位(元)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
14 changes: 7 additions & 7 deletions APIJSONORM/src/main/java/apijson/orm/AbstractParser.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down Expand Up @@ -646,7 +646,7 @@ public M parseResponse(M request) {

onClose();

// CS304 Issue link: https://github.com/Tencent/APIJSON/issues/232
// CS304 Issue link: https://github.com/APIJSON/APIJSON/issues/232
if (IS_PRINT_REQUEST_STRING_LOG || Log.DEBUG || error != null) {
Log.sl("\n\n\n", '<', "");
Log.fd(TAG, requestMethod + "/parseResponse request = \n" + requestString + "\n\n");
Expand Down Expand Up @@ -829,8 +829,8 @@ public M extendResult(M object, int code, String msg, String warn, boolean isRoo
+ " \n数据库: DEFAULT_DATABASE = " + AbstractSQLConfig.DEFAULT_DATABASE
+ " \nJDK: " + Log.JAVA_VERSION + " " + Log.OS_ARCH
+ " \nAPIJSON: " + Log.VERSION
+ " \n \n【常见问题】:https://github.com/Tencent/APIJSON/issues/36"
+ " \n【通用文档】:https://github.com/Tencent/APIJSON/blob/master/Document.md"
+ " \n \n【常见问题】:https://github.com/APIJSON/APIJSON/issues/36"
+ " \n【通用文档】:https://github.com/APIJSON/APIJSON/blob/master/Document.md"
+ " \n【视频教程】:https://search.bilibili.com/all?keyword=APIJSON");

msg = index >= 0 ? msg.substring(0, index) : msg;
Expand Down Expand Up @@ -985,11 +985,11 @@ public M extendErrorResult(M object, Throwable e, RequestMethod requestMethod, S

msg += Log.KEY_SYSTEM_INFO_DIVIDER + " 浏览器打开以下链接查看解答"
+ (isSQLException ? "" : apiatuoAndGitHubLink)
// GitHub Issue 搜索貌似是精准包含,不易找到答案 + " \n\nGitHub: \n https://github.com/Tencent/APIJSON/issues?q=is%3Aissue+" + encodedMsg
// GitHub Issue 搜索貌似是精准包含,不易找到答案 + " \n\nGitHub: \n https://github.com/APIJSON/APIJSON/issues?q=is%3Aissue+" + encodedMsg
+ " \n\n【Google】:\n https://www.google.com/search?q=" + encodedMsg
+ " \n\n【百度】:\n https://www.baidu.com/s?ie=UTF-8&wd=" + encodedMsg
+ (isSQLException ? apiatuoAndGitHubLink : "")
+ " \n\n都没找到答案?打开这个链接 \n https://github.com/Tencent/APIJSON/issues/new?assignees=&labels=&template=--bug.md "
+ " \n\n都没找到答案?打开这个链接 \n https://github.com/APIJSON/APIJSON/issues/new?assignees=&labels=&template=--bug.md "
+ " \n然后提交问题,推荐用以下模板修改,注意要换行保持清晰可读。"
+ " \n【标题】:" + msg
+ " \n【内容】:" + env + "\n\n**问题描述**\n" + msg
Expand Down Expand Up @@ -2012,7 +2012,7 @@ public void putQueryResult(String path, Object result) {
queryResultMap.put(path, result);
// }
}
//CS304 Issue link: https://github.com/Tencent/APIJSON/issues/48
//CS304 Issue link: https://github.com/APIJSON/APIJSON/issues/48
/**根据路径获取值
* @param valuePath -the path need to get value
* @return parent == null ? valuePath : parent.get(keys[keys.length - 1])
Expand Down
6 changes: 3 additions & 3 deletions APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down Expand Up @@ -3253,7 +3253,7 @@ public AbstractSQLConfig<T, M, L> setWhere(Map<String, Object> where) {
public Object getWhere(String key) {
return getWhere(key, false);
}
//CS304 Issue link: https://github.com/Tencent/APIJSON/issues/48
//CS304 Issue link: https://github.com/APIJSON/APIJSON/issues/48
/**
* @param key - the key passed in
* @param exactMatch - whether it is exact match
Expand Down Expand Up @@ -4886,7 +4886,7 @@ public static <L extends List<Object>> L newJSONArray(Object obj) {
public String gainSetString() throws Exception {
return gainSetString(getMethod(), getContent(), ! isTest());
}
//CS304 Issue link: https://github.com/Tencent/APIJSON/issues/48
//CS304 Issue link: https://github.com/APIJSON/APIJSON/issues/48
/**获取SET
* @param method -the method used
* @param content -the content map
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/AbstractVerifier.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/Entry.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/FunctionParser.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/JSONRequest.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/Join.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/Logic.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/ObjectParser.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/OnParseCallback.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/Operation.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/Pair.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/Parser.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/ParserCreator.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/SQLConfig.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/SQLCreator.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/SQLExecutor.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/Subquery.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/Verifier.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/VerifierCreator.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/Visitor.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Copyright (C) 2020 Tencent. All rights reserved.
/*Copyright (C) 2026 the APIJSON group. All rights reserved.

This source code is licensed under the Apache License Version 2.0.*/

Expand Down
Loading