Skip to content

Releases: nebula-contrib/ngbatis

v2.0.0-beta

21 Dec 14:02
5f84655
Compare
Choose a tag to compare

2.0.0-beta

Bugfix

  • fix: #329 correct the return value type and clearly the interface generic.#335
  • fix: remove JDK8's internal API: ParameterizedTypeImpl

Feature

  • feat: Entity Direct Search. (#319, via: @xYLiuuuuuu)

    • Entities can extend GraphBaseVertex or GraphBaseEdge to support direct search.

      • GraphBaseVertex:
      API Usage instructions
      queryIdsByProperties() Query a collection of vertex ids for a particular Tag or attribute
      queryVertexById() Query a single vertex for a specific vertex Id
      queryVertexByTag() Query a collection of vertices for a specific Tag
      queryVertexByProperties() Query a collection of vertexes for a specific property
      queryAllAdjacentVertex(Class<?>... edgeClass) Query a collection of all neighboring vertexes of a particular vertex, specifying one or more edge types that connect the two vertexes
      queryIncomingAdjacentVertex(Class<?>... edgeClass) Query the set of adjacent vertexes in the direction of the incoming edge of a particular vertex, specifying one or more edge types that connect two vertexes
      queryOutgoingAdjacentVertex(Class<?>... edgeClass) Query the set of adjacent vertexes in the direction of the edge of a particular vertex, specifying one or more edge types that connect two vertexes
      queryNeighborIdsWithHopById(int m, int n, Class<?>... edgeClass) Query a collection of vertex ids within a specified number of hops for a particular vertex, specifying one or more edge types that connect two vertexes
      queryConnectedEdgesById(Direction direction) Query the set of all edges associated with a particular vertex, specifying the direction and type of the edge
      queryPathFromVertex(Direction direction) Query the collection of all paths associated with a particular vertex, specifying the direction of the edge
      queryFixedLengthPathFromVertex(Integer maxHop, Direction direction, Class<?>... edgeClass) Query a set of fixed-length paths from a specific vertex, specifying the maximum number of steps, the direction of the edge, and the type of the edge
      queryVariableLengthPathFromVertex(Integer minHop, Integer maxHop, Direction direction, Class<?>... edgeClass) Query a set of variable-length paths from a specific vertex, specifying the minimum number of steps, the maximum number of steps, the direction of the edge, and the type of the edge
      queryShortestPathFromSrcAndDst(Integer maxHop, Direction direction, T v2) Query any shortest path from a specific vertex, specifying the number of steps, the direction of the edge, and the end vertex entity
      queryAllShortestPathsFromSrcAndDst(Integer maxHop, Direction direction, T v2) Query the set of all shortest paths from this vertex, specifying the number of steps, the direction of the edge, and the end vertex entity
      queryVertexCountByTag() Query the number of vertexes for a specific Tag
      • GraphBaseEdge:
      API Usage instructions
      queryEdgeByType(Direction direction) Query a set of edges of a specific type and direction
      queryEdgeWithSrcAndDstByProperties(T srcVertex, Direction direction, T dstVertex) Query a set of edges for a particular property
      queryEdgePropertiesBySrcAndDstId() Query a set of edges for a specific always vertex id
      queryEdgeCountByType() Query the number of edges for a specific Type
  • feat: fix #324 add insertForce(v) insertSelectiveForce(v) into NebulaDaoBasic.#335

  • feat: @Space annotation and space config in mapper xml supports dynamic configuration. (#318, via: @charle004)

    @Space 注解的 name 属性值和 xml 文件中 Mapper 标签指定的 Space 可通过 spring 配置文件自定义配置。

  • feat: support multiple mapper-locations in yml. (#318, via: @charle004)

  • feat: SessionPool support spaceFromParam.


2.0.0-beta

Bug修复

  • fix: #329 修正返回值类型并明确接口泛型。#335
  • fix: 移除 JDK8 的内部 API: ParameterizedTypeImpl

新特性

  • feat: 实体直接搜索。 (#319, 来自:@xYLiuuuuuu)

    • 实体可以继承 GraphBaseVertexGraphBaseEdge 来支持直接搜索。

      • GraphBaseVertex:
      API 用法说明
      queryIdsByProperties() 查询特定Tag或者属性的点Id集合
      queryVertexById() 查询特定点Id的单个点
      queryVertexByTag() 查询特定Tag的点集合
      queryVertexByProperties() 查询特定属性的点集合
      queryAllAdjacentVertex(Class<?>... edgeClass) 查询特定点的所有邻点集合,可指定一个或多个连接两点的边类型
      queryIncomingAdjacentVertex(Class<?>... edgeClass) 查询特定点入边方向的邻点集合,可指定一个或多个连接两点的边类型
      queryOutgoingAdjacentVertex(Class<?>... edgeClass) 查询特定点出边方向的邻点集合,可指定一个或多个连接两点的边类型
      queryNeighborIdsWithHopById(int m, int n, Class<?>... edgeClass) 查询特定点指定跳数内的点Id集合,可指定一个或多个连接两点的边类型
      queryConnectedEdgesById(Direction direction) 查询特定点关联的所有边集合,可指定边的方向和类型
      queryPathFromVertex(Direction direction) 查询特定点关联的所有路径集合,可指定边的方向
      queryFixedLengthPathFromVertex(Integer maxHop, Direction direction, Class<?>... edgeClass) 查询特定点出发的定长路径集合,可指定最大步数、边的方向、边的类型
      queryVariableLengthPathFromVertex(Integer minHop, Integer maxHop, Direction direction, Class<?>... edgeClass) 查询特定点出发的变长路径集合,可指定最小步数、最大步数、边的方向、边的类型
      queryShortestPathFromSrcAndDst(Integer maxHop, Direction direction, T v2) 查询特定点出发的任意一条最短路径,可指定步数、边的方向、终点实体
      queryAllShortestPathsFromSrcAndDst(Integer maxHop, Direction direction, T v2) 查询从该点出发的所有最短路径集合,可指定步数、边的方向、终点实体
      queryVertexCountByTag() 查询特定Tag的点的数量
      • GraphBaseEdge:
      API 用法说明
      queryEdgeByType(Direction direction) 查询特定类型、方向的边集合
      queryEdgeWithSrcAndDstByProperties(T srcVertex, Direction direction, T dstVertex) 查询特定属性的边集合
      queryEdgePropertiesBySrcAndDstId() 查询特定始终点id的边集合
      queryEdgeCountByType() 查询特定Type的边的数量
  • feat: 修复 #324 在 NebulaDaoBasic 中增加 insertForce(v) insertSelectiveForce(v)。#335

  • feat: @Space 注解和 Mapper xml 中的 space 配置支持动态配置。 (#318, 来自:@charle004)

  • feat: 支持 yml 中配置多个 mapper-locations。 (#318, 来自:@charle004)

  • feat: SessionPool 支持使用 spaceFromParam进行运行时的图空间切换,包括运行后才创建的图空间。

Full Changelog: v1.3.0...v2.0.0-beta

v1.3.0

30 Sep 07:30
2946f93
Compare
Choose a tag to compare

What's Changed

Dependencies upgrade

  • nebula-java: 3.6.0 -> 3.8.3
  • org.hibernate:hibernate-core was excluded.

    If you need to use hibernate-core, please add the dependency by yourself.

Bugfix

  • fix: when use-session-pool and spaceFromParam is true, skip the space addition.
  • fix: when timezone is not default, the time is incorrect.
  • fix: allow normal startup without any mapper files.
  • fix: Limit the node type obtained by selectById to the entity class of the interface.
  • fix: When a node has multiple tags, prioritize using the tag of resultType. (Collaborate with charle004, #311)
  • fix: debugging log output issue #312

Feature

  • feat: support the use of ciphertext passwords in yml.

  • feat: expanding the insertSelectiveBatch interface in NebulaDaoBasic.(#299, via Ozjq)

  • feat: expanding the shortestOptionalPath interface in NebulaDaoBasic.(#303, via xYLiu)

  • feat: expanding the showSpaces interface in NebulaDaoBasic.(#304, via xYLiu)

  • feat: support ssl and http2 config in yml.

    http2 属于企业版的数据库才支持,但我没有测试环境,所以不确定是否可用。
    http2 is supported by the enterprise version of the database, but I don't have a test environment, so I'm not sure if it works.

  • feat: support adding ID attributes of start and end nodes in edge entities.

    通过 @DstId, @SrcId 进行注解,可以将属性标记成特殊的属性,用于查询时可以填充的起始点和终点的id值。

    • example:

      nebula:
        pool-config:
          enable-ssl: true
          ssl-param:
            sign-mode: SELF_SIGNED
            crt-file-path: /path/to/client.crt
            key-file-path: /path/to/client.key
            password: password
          # ssl-param:
            # sign-mode: CA_SIGNED
            # ca-crt-file-path: /path/to/ca-client.crt
            # crt-file-path: /path/to/client.crt
            # key-file-path: /path/to/client.key
          use-http2: false
          custom-headers:
            Route-Tag: abc
  • feat: @Space annotation supports dynamic configuration. .(#317, via charle004)

    @Space 注解的 name 属性值可通过 spring 配置文件自定义配置。

    • example:

      app:
        person:
          space: PERSON_SPACE
      @Space(name = "${nebula.space}")
      @Table(name = "person")
      public class Person {
          @Id
          private String vid;
          private String name;
      
          public String getVid() {
              return vid;
          }
      
          public void setVid(String vid) {
              this.vid = vid;
          }
      
          public String getName() {
              return name;
          }
      
          public void setName(String name) {
              this.name = name;
          }
      }

New Contributors

Full Changelog: v1.2.2...v1.3.0

v1.2.2-jdk17

06 May 06:28
Compare
Choose a tag to compare

What's Changed

1.2.2

Bugfix

  • fix: complete the error code of ResultSet into QueryException.
  • fix: the issue of not being able to handle Set type.
  • fix: the issue of the ranking value of the edge object cannot be filled.
  • fix: when the field is aliased by @Column, the param name is incorrect. (multi tags support)
    • selectBySelective
    • selectIdBySelective
    • selectBySelectiveStringLike
    • selectIdBySelectiveStringLike
  • fix: unable to read the correct value of id, the value of the subclass' id is used now. (multi tag scene)
  • fix: do not generate asg debug when the log level is not debug, now.

Develop behavior change

  • No longer verifying the number of @Id in the entity, please keep the number to 1 on your own.

    不再对实体中的@Id个数进行校验,请注意保持个数为1 (含父类)

1.2.1

Bugfix

  • fix: set the specified space in the original method to the proxy method for paging. (#282)

Full Changelog: v1.2.0-jdk17...v1.2.2-jdk17

v1.2.2

06 May 05:16
e8504c0
Compare
Choose a tag to compare

What's Changed

1.2.2

Bugfix

  • fix: complete the error code of ResultSet into QueryException.
  • fix: the issue of not being able to handle Set type.
  • fix: the issue of the ranking value of the edge object cannot be filled.
  • fix: when the field is aliased by @Column, the param name is incorrect. (multi tags support)
    • selectBySelective
    • selectIdBySelective
    • selectBySelectiveStringLike
    • selectIdBySelectiveStringLike
  • fix: unable to read the correct value of id, the value of the subclass' id is used now. (multi tag scene)
  • fix: do not generate asg debug when the log level is not debug, now.

Develop behavior change

  • No longer verifying the number of @Id in the entity, please keep the number to 1 on your own.

    不再对实体中的@Id个数进行校验,请注意保持个数为1 (含父类)

1.2.1

Bugfix

  • fix: set the specified space in the original method to the proxy method for paging. (#282)

Full Changelog: v1.2.0...v1.2.2

v1.2.0-jdk17

14 Dec 16:35
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.2.0...v1.2.0-jdk17

v1.2.0

13 Dec 07:12
8dc7965
Compare
Choose a tag to compare

What's Changed

Dependencies upgrade

  • 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, via dieyi)
  • feat: extending NgPath, when 'with prop' is used in nGQL, edge attributes can be obtained from NgPath. (#228, via dieyi)
  • feat: expanding the insertEdgeBatch interface in NebulaDaoBasic. (#244, via Sunhb)
  • feat: expanding the deleteByIdBatch interface in NebulaDaoBasic. (#247, via Sunhb)
  • feat: expanding the listEndNodes interface in NebulaDaoBasic. (#272, via knqiufan)
  • feat: support specify space by param

Bugfix

  • fix: support methods in mapper tags to set space to null.

    • Such as:
    <mapper namespace="...">
      <create id="createSpace" space="null">
        create space new_space ( vid_type  = INT64 );
      </create>
    </mapper>
  • fix: #190 Insert failed when tag has no attributes

  • chore: removing and exclude some packages: log4j related or useless.

  • fix: #194 we can name the interface by @Component and @Resource, for example:

    • @Component("namedMapper"): use @Resource("namedMapper$Proxy") to inject. (since v1.0)
    • @Resource("namedComponent"): use @Resource("namedComponent") to inject. (new feature)
  • fix: when DAO/Mapper method has Page type param with @Param, the param name can not be use.

    如原来项目中分页相关接口,用了不起作用的 @Param, 但 xml 还是使用 p0, p1...
    需要将 @Param 移除,或者将 xml 中的参数名改成 注解的参数名,以保证参数名统一

  • fix:class 'ResultSetUtil.java' parse datetime type error. (#241, via 爱吃辣条的Jerry)

  • fix: remove unnecessary reflections in transformDateTime, and prevents errors in the millisecond bit in jdk17.

Develop behavior change

  • Remove deprecated classes and methods:
    • org.nebula.contrib.ngbatis.binding.DateDeserializer
    • org.nebula.contrib.ngbatis.binding.DefaultArgsResolver#customToJson
  • Dependencies changing:

    如果项目中有用到,且出现相关类找不到的情况,请自行引入

    • Exclude:

      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter</artifactId>
          <exclusions>
              <exclusion>
                  <groupId>org.apache.logging.log4j</groupId>
                  <artifactId>log4j-to-slf4j</artifactId>
              </exclusion>
              <exclusion>
                  <groupId>org.apache.logging.log4j</groupId>
                  <artifactId>log4j-api</artifactId>
              </exclusion>
              <exclusion>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-starter-web</artifactId>
              </exclusion>
          </exclusions>
      </dependency>
    • Removing:

      <!-- Why: make it possible to use undertow as web server -->
      <dependency> 
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-web</artifactId>
      </dependency>
      <!-- Why: useless in NgBatis-->
      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-jdbc</artifactId>
      </dependency>
      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-aop</artifactId>
      </dependency>

New Contributors

Full Changelog: v1.1.5...v1.2.0

v1.2.0-beta

15 Nov 20:54
14c6018
Compare
Choose a tag to compare

Dependencies upgrade

  • nebula-java: 3.5.0 -> 3.6.0
  • beetl: 3.1.8-RELEASE -> 3.15.10.RELEASE
  • antlr4: 4.7.2 -> 4.11.1

Feature

  • feat: support <nGQL> include query pieces. (#212, via dieyi)
  • feat: extending NgPath, when 'with prop' is used in nGQL, edge attributes can be obtained from NgPath. (#228, via dieyi)
  • feat: expanding the insertEdgeBatch interface in NebulaDaoBasic. (#244, via Sunhb)
  • feat: expanding the deleteByIdBatch interface in NebulaDaoBasic. (#247, via Sunhb)

Bugfix

  • fix: support methods in mapper tags to set space to null.

    • Such as:
    <mapper namespace="...">
      <create id="createSpace" space="null">
        create space new_space ( vid_type  = INT64 );
      </create>
    </mapper>
  • fix: #190 Insert failed when tag has no attributes

  • chore: removing and exclude some packages: log4j related or useless.

  • fix: #194 we can name the interface by @Component and @Resource, for example:

    • @Component("namedMapper"): use @Resource("namedMapper$Proxy") to inject. (since v1.0)
    • @Resource("namedComponent"): use @Resource("namedComponent") to inject. (new feature)
  • fix: when DAO/Mapper method has Page type param with @Param, the param name can not be use.

    如原来项目中分页相关接口,用了不起作用的 @Param, 但 xml 还是使用 p0, p1...
    需要将 @Param 移除,或者将 xml 中的参数名改成 注解的参数名,以保证参数名统一

  • fix:class 'ResultSetUtil.java' parse datetime type error. (#241, via 爱吃辣条的Jerry)

Develop behavior change

  • Remove deprecated classes and methods:
    • org.nebula.contrib.ngbatis.binding.DateDeserializer
    • org.nebula.contrib.ngbatis.binding.DefaultArgsResolver#customToJson
  • Dependencies changing:

    如果项目中有用到,且出现相关类找不到的情况,请自行引入

    • Exclude:

      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter</artifactId>
          <exclusions>
              <exclusion>
                  <groupId>org.apache.logging.log4j</groupId>
                  <artifactId>log4j-to-slf4j</artifactId>
              </exclusion>
              <exclusion>
                  <groupId>org.apache.logging.log4j</groupId>
                  <artifactId>log4j-api</artifactId>
              </exclusion>
              <exclusion>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-starter-web</artifactId>
              </exclusion>
          </exclusions>
      </dependency>
    • Removing:

      <!-- Why: make it possible to use undertow as web server -->
      <dependency> 
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-web</artifactId>
      </dependency>
      <!-- Why: useless in NgBatis-->
      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-jdbc</artifactId>
      </dependency>
      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-aop</artifactId>
      </dependency>

New Contributors

Full Changelog: v1.1.5...v1.2.0-beta

v1.1.5

20 Jul 03:45
ef7c714
Compare
Choose a tag to compare

Bugfix

  • fix: #176 use double quote instead of the original single quote in ng.valuaFmt function
  • fix: #181 when node has multi tag, can not update by subclass
    • updateById
    • updateByIdSelective
    • updateByIdBatchSelective
    • updateByIdBatchSelective
    • upsertByIdSelective
  • fix: #185 improve the accuracy of datetime to milliseconds

v1.1.4

09 Jun 10:37
206f79f
Compare
Choose a tag to compare

Develop behavior change.

  • When a field is declared by java.util.Date, it is no longer allowed to set a value using Timestamp

    当字段由java.util.Date声明时,不再允许使用java.sql.Timestamp设值

Bugfix

  • fix: data error for date type in the database.#102

Feature

  • Clear time type mapping.

    db type java type
    datetime java.util.Date
    date java.sql.Date
    time java.sql.Time
    timestamp java.sql.Timestamp
    duration java.time.Duration

v1.1.3

31 May 17:48
cfab26d
Compare
Choose a tag to compare

Bugfix

  • fix: make the error message clearer when 'use space' failed #150
  • fix: sessionPool is null when the space name only declared in yml

Dependencies upgrade

  • nebula-java: 3.4.0 -> 3.5.0