-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis库列表显示保留有数据的,并加上key的数量 #2705
Open
feiazifeiazi
wants to merge
16
commits into
hhyo:master
Choose a base branch
from
feiazifeiazi:redis_database_update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
6ca8e7f
添加favicon图片
870ea4e
Merge branch 'master' of https://github.com/hhyo/Archery
d24784d
Merge branch 'master' of https://github.com/hhyo/Archery
e80b335
firset
e4d02bb
修改
118504c
撤销
a4531d0
Merge branch 'master' of https://github.com/hhyo/Archery
7c2fea5
Merge branch 'master' of https://github.com/hhyo/Archery
9fc3ebe
修改redis数据库列表内容
89a3b59
格式化一下
ad876d5
格式化
d3dcb90
添加单元测试
64abe26
Merge branch 'master' of https://github.com/hhyo/Archery
bf3f327
Merge branch 'master' of https://github.com/hhyo/Archery
d23edba
Merge branch 'master' of https://github.com/hhyo/Archery
987e4e3
Merge branch 'master' of https://github.com/feiazifeiazi/Archery_Genu…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
整体功能确实是一个非常实用的功能, 但这里我不确认这个参数是不是很合理, 有没有可能这样处理:
那这么设计的话, engine 层面就也不需要加参数, 尽力地去获取所有db 的 key 数量就可以了.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你说的这种方式应该可以。我要确认一下SQL提交那边的代码 看看要不要改,有没有影响。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从扩展来说,不同的数据库,可能需要传入不同的参数的。
应该是将post的参数,变成key,value,全部传给方法。这样子方法就自由了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我没太看懂你的意思,你能展开说一下吗?比如api 设计,后端大致逻辑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我应该先抛出问题:
get_all_databases() 父类这个方法,从设计上是不是要传参数才好呢?具体怎么传再议。
原因:这个方法现在父类没有参数,
各种engine层在实现这个方法时,因为没有前端的get或post参数,从而限制了子类的这个方法的实现,不够自由。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从名字来看,我个人觉得是不应该加参数的,因为名字就是获取所有的db,没有任何条件。
不过我觉得还是从上层用法来看比较合适,如果说各个engine定制很多,那加参数是必须要的,如果名字不贴切可以再改名字。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
恩。OK
我先试试在前端筛选。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LeoQuote 调用/instance/instance_resource/的地方太多,不好改虽然那里不可能选Redis实例,但得要一个个测。 主要是返回结果改了:之前返回一列数据。现在返回了2列(一个key,一个显示值。)
我先不改了。感觉还是支持参数比较好,方便扩展。