Skip to content

Releases: nebula-contrib/ngbatis

v1.1.2

23 Feb 03:51
14fb5bc
Compare
Choose a tag to compare

Develop behavior change.

  • If an entity type is another entity type's super class, all attribute are being required in database schema except @Transient

Bugfix

  • fix: when vertex has multi tags cannot set value properly.#120
  • fix: ng.join bug #122

Features

  • feat: multi tags support for vertex inserting.
  • feat: provide default data structure for edge \ vertex \ path \ sub-graph, and their result handler. #103 #118
  • feat: NebulaDaoBasic shortest path support. #118
  • feat: ng.valueFmt support escape ( default true ). Use ValueFmtFn.setEscape( false ); to disable this feature.
  • feat: add config to use nebula-java session pool
    nebula:
      ngbatis:
        use-session-pool: true
    

Dependencies upgrade

  • nebula-java: 3.3.0 -> 3.4.0

用法变动

  • 如果一个实体类是另一个实体类的父类,则其所有除了注解@Transient 了的属性,都需要在数据库中声明。(1.1.1版本父类只读取@Column的属性)

修复

  • 修复:点有多标签时,不能准确取值的问题.#120
  • 修复:ng.join数字型报错问题 #122

新特性

  • NebulaDaoBasic支持通过类的继承关系,写入多标签
  • 对路径、子图、未建java实体类的类型提供默认数据结构及其结果处理类 #103 #118
  • NebulaDaoBasic 提供最短路径接口 #118
  • ng.valueFmt 对String类型,默认进行转义,可以使用ValueFmtFn.setEscape( false );禁用自动转义。
  • 追加配置项开启 nebula-java session pool,如开启此用法,则在 xml 标签内 ngql 部分要甚用 use spacename;
    nebula:
      ngbatis:
        use-session-pool: true
    

依赖升级

  • nebula-java: 3.3.0 -> 3.4.0

v1.1.1

30 Nov 09:00
e666dae
Compare
Choose a tag to compare

Bugfix

  • fixed #89 BigDecimal / Set / Collection serialization to NebulaValue #97

v1.1.0

30 Nov 07:22
85ec627
Compare
Choose a tag to compare

Features

  • springcloud+nacos support #55
  • add upsert tag/edge function #82
  • support #39, use @javax.persistence.Transient #43

Enhancement

  • enhanced: #64 debug log print current space in session before switch #79
  • enhanced: NebulaDaoBasic default impls can be overwritten by xml #76
  • optimize #69 display exception detail & enable NebulaDaoBasic to support space switching #70
  • docs typo #52

Bugfix

  • fixed #89 splitting param serialization into two forms, json and NebulaValue #92
  • fixed #78 use space and gql are executed together incorrect in 3.3.0 #87
  • fixed #73 selectById use id value embedding instead of cypher parameter #74
  • fixed #65 selectByIds use id values embedding instead of cypher param #67
  • fixed the error of "ng.id" when id is in super class #62
  • fixed #51 The node params support the direct use of the ID value when insert edge #60
  • fixed #56 make it work well when returnType is Map and result is null #58
  • fixed #47 console bug when result type is basic type #48

1.1.0-rc

19 Sep 06:16
f0e8606
Compare
Choose a tag to compare

docs i18n help wanted

增加内置函数与内置变量可以在 xml 中使用:

  • ng.valueFmt

    对不定类型的数据值进行格式化,忽略是否追加单引号及日期格式化,直接传原始 java类型即可

    参数位 参数说明 类型 是否必传 默认值
    1 Object Y
    2 如果是字符串是否在前后追加 .* 形成模糊查询 boolean N false
  • ng.schemaFmt

    对模式名前后追加 `,以避免与数据库关键字冲突

    参数位 参数说明 类型 必传 默认值
    1 模式名,如 tagName, edgeName, propertyName Object Y
  • ng.tagName

    用于从实体类或Dao接口获取 tag name

    参数位 参数说明 类型 必传 默认值
    1 与Schema对应的实体类对象 Object Y
    2 类模型,使用 ng_cm 传入 ClassModel N null
  • ng.pkField

    用于获取 主键属性,java.lang.reflect.Field

    参数位 参数说明 类型 必传 默认值
    1 实体类类型 Class<?> Y
    2 如果不存在主键是否报错中断 Boolean N false
  • ng.pkName

    用于获取 主键名,String

    参数位 参数说明 类型 必传 默认值
    1 实体类对象 Object Y
    2 true 时使用列名,false 时使用属性名 Boolean N true
  • ng.entityType

    用于获取实体类类型

    参数位 参数说明 类型 必传 默认值
    1 实体类对象 Object Y
  • ng.fieldNames

    获取属性名集合(不包括主键)

    参数位 参数说明 类型 必传 默认值
    1 实体类对象 Object Y
    2 true 时使用列名,false 时使用属性名 Boolean N true
  • ng.id

    获取id值

    参数位 参数说明 类型 必传 默认值
    1 实体类对象 Object Y
    2 如果不存在主键是否报错中断 Boolean N true
    3 如果值为空,true会通过主键生成器返回新值,false 时 返回空 Boolean N true
  • ng.kv

    通过实体对象或者获取多个集合

    • columns 列名集合
    • valueNames 属性名集合
    • values 值集合
    • types 属性类型
    参数位 参数说明 类型 必传 默认值
    1 实体类对象 Object Y
    2 参数名前缀 String N null
    3 是否排除主键 Boolean N true
    4 是否排除空值 Boolean N true
    5 如无主键,是否报错中断 Boolean N true
  • ng.join

    对集合进行格式化

    参数位 参数说明 类型 必传 默认值
    1 待格式化的集合 Iterable Y
    2 元素间的分隔符 String N ,
    3 函数名,各元素拼接前,可进行函数名指定的格式化函数先行格式化,再拼接 String N null
  • ng.ifStringLike

    类型为字符串时,前后拼接 .*

    参数位 参数说明 类型 必传 默认值
    1 Object Y
    2 属性类型 Object N null
    3 属性名,用于不将值明文写在 ngql 中,而使用参数名,让 nebula 在参数中取值 String N null

1.1.0-beta

11 Aug 09:49
Compare
Choose a tag to compare

1.1.0-beta

1.1-dev-20220718

18 Jul 15:26
Compare
Choose a tag to compare

Prototype with some available functions.
Test Maven release.