nebula-contrib / ngbatis

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 的使用习惯进行开发。https://graph-cn.github.io/ngbatis-docs/
https://nebula-contrib.github.io/ngbatis/
Apache License 2.0
132 stars 42 forks source link

feat: include query pieces #212

Closed 1244453393 closed 1 year ago

1244453393 commented 1 year ago

自己业务需求需要,做了扩展,这种需求或许其他人也有

wey-gu commented 1 year ago

@1244453393 👍,感谢这个扩充!能把文档部分例子、描述也修改一下么?

codecov-commenter commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (ed810f3) 0.00% compared to head (1ae88e9) 0.00%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #212 +/- ## ====================================== Coverage 0.00% 0.00% ====================================== Files 72 74 +2 Lines 2471 2513 +42 Branches 270 275 +5 ====================================== - Misses 2471 2513 +42 ``` | [Files Changed](https://app.codecov.io/gh/nebula-contrib/ngbatis/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [...rib/ngbatis/binding/beetl/functions/IncludeFn.java](https://app.codecov.io/gh/nebula-contrib/ngbatis/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL21haW4vamF2YS9vcmcvbmVidWxhL2NvbnRyaWIvbmdiYXRpcy9iaW5kaW5nL2JlZXRsL2Z1bmN0aW9ucy9JbmNsdWRlRm4uamF2YQ==) | `0.00% <0.00%> (ø)` | | | [...ebula/contrib/ngbatis/io/MapperResourceLoader.java](https://app.codecov.io/gh/nebula-contrib/ngbatis/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL21haW4vamF2YS9vcmcvbmVidWxhL2NvbnRyaWIvbmdiYXRpcy9pby9NYXBwZXJSZXNvdXJjZUxvYWRlci5qYXZh) | `0.00% <0.00%> (ø)` | | | [.../org/nebula/contrib/ngbatis/models/ClassModel.java](https://app.codecov.io/gh/nebula-contrib/ngbatis/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL21haW4vamF2YS9vcmcvbmVidWxhL2NvbnRyaWIvbmdiYXRpcy9tb2RlbHMvQ2xhc3NNb2RlbC5qYXZh) | `0.00% <0.00%> (ø)` | | | [...a/org/nebula/contrib/ngbatis/models/NgqlModel.java](https://app.codecov.io/gh/nebula-contrib/ngbatis/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL21haW4vamF2YS9vcmcvbmVidWxhL2NvbnRyaWIvbmdiYXRpcy9tb2RlbHMvTmdxbE1vZGVsLmphdmE=) | `0.00% <0.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

1244453393 commented 1 year ago

@1244453393 👍,感谢这个扩充!能把文档部分例子、描述也修改一下么?

@wey-gu 没问题,吃完晚饭后做修改

wey-gu commented 1 year ago

@1244453393 Sorry I meant maybe you could add the example of your extended expression to the docs, not to include my PR related to docs :-P,

1244453393 commented 1 year ago

@1244453393 Sorry I meant maybe you could add the example of your extended expression to the docs, not to include my PR related to docs :-P,

@wey-gu 额不好意思,我还没改完文档,我刚刚是想从原仓库拉取新内容到我的仓库里,不知道刚刚是不是搞错了,我平时用svn,git用的少,不太熟

wey-gu commented 1 year ago

@1244453393 Sorry I meant maybe you could add the example of your extended expression to the docs, not to include my PR related to docs :-P,

@wey-gu 额不好意思,我还没改完文档,我刚刚是想从原仓库拉取新内容到我的仓库里,不知道刚刚是不是搞错了,我平时用svn,git用的少,不太熟

别担心哈,明白了,我以为是误解了我提到的文档的部分,原来你是想 rebase

# 我一般是这么弄哈
# 看远端的 repo 有哪些
git remote -v
# 假设 “origin” 已经是自己的 fork,可以再增加 upstream 为你要 PR 的 repo,比如
git remote add upstream https://github.com/nebula-contrib/ngbatis.git
# 把自己的 branch 从 master 分出来叫作 my_work,我们回头就会把它推导远端 1244453393/ngbatis 的 my_work ,这里,我看你弄得是 master (这也是可以的)
# git checkout -b my_work
# 我们现在就假设用 1244453393/ngbatis 的 master

# 如果在 pr 过程中,上游变了,想获得更新,我习惯的方式是:
# 设定当前的上游为 remote 中的 upstream 的 master
git branch --set-upstream-to=upstream/master
# 拉取一下上游,用 fetch 只会更新本地缓存,不会改当前 branch
git fetch upstream
# 然后 rebase,rebase 的意思就是让后来新的变化放在你的修改的前边
git pull --rebase
# 再次提交你的变化,因为 base 变了,需要 -f 去强制推到你自己 fork 的远端,也是和 pr 关联的 branch
git push -f
1244453393 commented 1 year ago

Now: 函数支持跨mapper文件引用 补充了相关文档 添加了相关代码例子

wey-gu commented 1 year ago

赞!

1244453393 commented 1 year ago

赞!

英文水平有限,英文文档就麻烦您弄一下了 build失败是maven检查代码风格插件报的错吗,缩进规范是2个字符,我的idea默认缩进4个字符,抱歉抱歉

wey-gu commented 1 year ago

赞,英文回头我来稿,大叶老师瞅瞅咋样了哈 @CorvusYe

1244453393 commented 1 year ago

2023-09-09: ng.include函数支持额外参数 增加了一个适用于ngbatis-mapper文件的dtd约束,使得开发mapper能有所提示

wey-gu commented 1 year ago

👍,这次 ci pass 了 我就先 merge 了哈,后边可以分开 pr 再跟进。