Skip to content

Commit

Permalink
Merge pull request #279 from CorvusYe/for-jdk17
Browse files Browse the repository at this point in the history
v1.2.0-jdk17
  • Loading branch information
CorvusYe authored Dec 14, 2023
2 parents 96c017f + 3b83e33 commit 8af7f87
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
server-password: MAVEN_PASSWORD # Environment variable for Maven password

- name: Publish package
run: mvn --batch-mode deploy -Dmaven.javadoc.skip=true
run: mvn --batch-mode -e deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
Expand Down
31 changes: 10 additions & 21 deletions .github/workflows/snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out Git repository
uses: actions/checkout@v3
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v3
- name: Install Java and Maven
uses: actions/setup-java@v1
with:
java-version: '17'
distribution: 'temurin'
java-version: 17

- name: Install nebula-graph
run: |
Expand All @@ -32,20 +31,10 @@ jobs:
popd
popd
- name: Set up Apache Maven Central
uses: actions/setup-java@v3
- name: Deploy Snapshot to Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
java-version: '17'
distribution: 'temurin'
gpg-private-key: ${{ secrets.GPG_SECRET }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Publish package
run: mvn --batch-mode deploy -Dmaven.javadoc.skip=true
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
gpg_private_key: ${{ secrets.GPG_SECRET }}
gpg_passphrase: ${{ secrets.GPG_PASSWORD }}
nexus_username: ${{ secrets.OSSRH_USER }}
nexus_password: ${{ secrets.OSSRH_PASSWORD }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@ This source code is licensed under Apache 2.0 License.
- nebula-java: 3.5.0 -> 3.6.0
- beetl: 3.1.8-RELEASE -> 3.15.10.RELEASE
- antlr4: 4.7.2 -> 4.11.1
- asm: 8.0 -> 9.4
- jsoup: 1.15.3 -> 1.15.4

## Feature

- feat: support `<nGQL>` include query pieces. ([#212](https://github.com/nebula-contrib/ngbatis/pull/212), via [dieyi](https://github.com/1244453393))
- feat: extending `NgPath`, when 'with prop' is used in nGQL, edge attributes can be obtained from NgPath. ([#228](https://github.com/nebula-contrib/ngbatis/pull/228), via [dieyi](https://github.com/1244453393))
- feat: expanding the `insertEdgeBatch` interface in `NebulaDaoBasic`. ([#244](https://github.com/nebula-contrib/ngbatis/pull/244), via [Sunhb](https://github.com/shbone))
- feat: expanding the `deleteByIdBatch` interface in `NebulaDaoBasic`. ([#247](https://github.com/nebula-contrib/ngbatis/pull/244), via [Sunhb](https://github.com/shbone))
- feat: expanding the `listEndNodes` interface in `NebulaDaoBasic`. ([#247](https://github.com/nebula-contrib/ngbatis/pull/272), via [knqiufan](https://github.com/knqiufan))
- feat: support specify space by param

## Bugfix

Expand Down
2 changes: 1 addition & 1 deletion ngbatis-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<dependency>
<groupId>org.nebula-contrib</groupId>
<artifactId>ngbatis</artifactId>
<version>1.2.0-jdk17-SNAPSHOT</version>
<version>1.2.0-jdk17</version>
</dependency>
</dependencies>

Expand Down
24 changes: 18 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<!-- <packaging>jar</packaging>-->
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
Expand All @@ -13,7 +13,19 @@
<name>ngbatis</name>
<groupId>org.nebula-contrib</groupId>
<artifactId>ngbatis</artifactId>
<version>1.2.0-jdk17-SNAPSHOT</version>
<version>1.2.0-jdk17</version>

<description>
NgBatis is a database ORM framework base NebulaGraph + spring-boot,
which takes advantage of the mybatis’ fashion development,
including some de-factor operations in single table and vertex-edge,
like mybatis-plus.
NgBatis 是一款针对 NebulaGraph + Springboot 的数据库 ORM 框架。
借鉴于 MyBatis 的使用习惯进行开发。
</description>

<url>https://github.com/nebula-contrib/ngbatis</url>

<developers>
<developer>
<name>CorvusYe</name>
Expand Down Expand Up @@ -80,7 +92,7 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>8.0</version>
<version>9.4</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
Expand All @@ -92,7 +104,7 @@
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.15.3</version>
<version>1.15.4</version>
</dependency>

<!-- Beetl project -->
Expand Down Expand Up @@ -138,7 +150,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -148,7 +160,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,14 @@ public static String getSpace(ClassModel cm, MethodModel mm) {
* @param paramsForTemplate 从模板参数中获取空间名
* @return 目标space
*/
public static String getSpace(ClassModel cm, MethodModel mm, Map<String, Object> paramsForTemplate) {
public static String getSpace(
ClassModel cm, MethodModel mm, Map<String, Object> paramsForTemplate
) {
boolean spaceFromParam = mm.isSpaceFromParam();
String space = getSpace(cm, mm);
if (spaceFromParam && space != null) return ENV.getTextResolver().resolve(space, paramsForTemplate);
if (spaceFromParam && space != null) {
return ENV.getTextResolver().resolve(space, paramsForTemplate);
}
return space;
}

Expand Down
24 changes: 12 additions & 12 deletions src/main/java/org/nebula/contrib/ngbatis/proxy/NebulaDaoBasic.java
Original file line number Diff line number Diff line change
Expand Up @@ -421,18 +421,6 @@ default List<T> listStartNodes(Class<?> edgeType, I endId) {
return (List<T>) listStartNodes(startType, edgeType, endId);
}

/**
* 通过开始节点id与关系类型获取所有结束节点,<br> 结束节点类型为当前接口实现类所管理的实体对应的类型
*
* @param startId 开始节点id
* @param edgeType 关系类型
* @return 结束节点列表
*/
default List<T> listEndNodes(I startId, Class<?> edgeType) {
Class<?> endType = entityType(this.getClass());
return (List<T>) listEndNodes(startId, edgeType, endType);
}

/**
* 指定开始节点类型,并通过结束节点id与关系类型获取所有开始节点
*
Expand All @@ -452,6 +440,18 @@ default List<?> listStartNodes(Class<?> startType, Class<?> edgeType, I endId) {
endId);
}

/**
* 通过开始节点id与关系类型获取所有结束节点,<br> 结束节点类型为当前接口实现类所管理的实体对应的类型
*
* @param startId 开始节点id
* @param edgeType 关系类型
* @return 结束节点列表
*/
default List<T> listEndNodes(I startId, Class<?> edgeType) {
Class<?> endType = entityType(this.getClass());
return (List<T>) listEndNodes(startId, edgeType, endType);
}

/**
* 指定结束节点类型 并通过开始节点id与关系类型获取所有结束节点
*
Expand Down

0 comments on commit 8af7f87

Please sign in to comment.