Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Watch
Unwatch
Watching
Releases Only
Ignoring
3
Star
4
Fork
2
EdgeDB
/
内宣
Code
Issues
12
Pull Requests
0
Insights
Pipelines
Service
JavaDoc
PHPDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Join Repository
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
关于树形结构数据的存储以及递归查询
Backlog
#I5VPE7
xyplayman
Opened this issue
2022-10-14 13:15
当前项目中有一些数据是树形结构的,比如菜单、组织结构。此前的 SQL 数据库一般用 (id, parent_id) 这样的方式存储,配合递归查询语法查询某一个 id 下的子树。 使用 EdgeDB,自然就会想到使用 `link parent` 来链接父节点。但是查找文档和 Github 上的信息之后发现,EdgeQL 目前还没有实现递归查询。这样的话,是不是要在代码中多次查询来获取一棵子树?现在项目数据的层次不深,倒也没有太大问题。 想请教两点: 1、在 EdgeDB 中存储树形结构,一般的使用场景下采用这种父链的方式,是不是一个合适的做法? 2、EdgeQL 的递归查询,有没有大概计划啥时候实现?
当前项目中有一些数据是树形结构的,比如菜单、组织结构。此前的 SQL 数据库一般用 (id, parent_id) 这样的方式存储,配合递归查询语法查询某一个 id 下的子树。 使用 EdgeDB,自然就会想到使用 `link parent` 来链接父节点。但是查找文档和 Github 上的信息之后发现,EdgeQL 目前还没有实现递归查询。这样的话,是不是要在代码中多次查询来获取一棵子树?现在项目数据的层次不深,倒也没有太大问题。 想请教两点: 1、在 EdgeDB 中存储树形结构,一般的使用场景下采用这种父链的方式,是不是一个合适的做法? 2、EdgeQL 的递归查询,有没有大概计划啥时候实现?
Comments (
2
)
Sign in
to comment
Status
Backlog
Backlog
Doing
Done
Closed
Assignees
Not set
Labels
优化
问题
Not set
Label settings
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
参与者(2)
1
https://gitee.com/edgedb/devrel.git
git@gitee.com:edgedb/devrel.git
edgedb
devrel
内宣
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register