Skip to content
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

Add resource_type for subjects in queries in the KnowledgeDatabase #7153

Merged
merged 6 commits into from
Nov 21, 2022

Conversation

drew2a
Copy link
Contributor

@drew2a drew2a commented Nov 8, 2022

@kozlovsky requested this change for KnowledgeDatabase.

He has noticed that methods like get_subjects, get_objects, get_statements, get_suggestions have missed the subject_type argument.

Therefore it was technically possible to have two subjects like 2002 both in the title and in the tag (for example). This possibility could cause confusion in the future.

The next step in this line of thought would be adding a mandatory type for all returning values.

@drew2a drew2a changed the title Add resource_type for subjects in queries in the KnowledgeDB Add resource_type for subjects in queries in the KnowledgeDatabase Nov 8, 2022
@drew2a drew2a added this to the 7.13.0 milestone Nov 9, 2022
@drew2a drew2a self-assigned this Nov 9, 2022
@drew2a drew2a marked this pull request as ready for review November 9, 2022 11:55
@drew2a drew2a requested review from a team and kozlovsky and removed request for a team November 9, 2022 11:55
Copy link
Contributor

@kozlovsky kozlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; please add an index for the object attribute

src/tribler/core/components/knowledge/db/knowledge_db.py Outdated Show resolved Hide resolved
src/tribler/core/components/knowledge/db/knowledge_db.py Outdated Show resolved Hide resolved
src/tribler/core/components/knowledge/db/knowledge_db.py Outdated Show resolved Hide resolved
@drew2a drew2a merged commit f4144de into Tribler:main Nov 21, 2022
@drew2a drew2a deleted the fix/resource_type branch November 21, 2022 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants