-
Notifications
You must be signed in to change notification settings - Fork 21
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
Feat/cognitarium construct #396
Conversation
size-limit report 📦
|
Codecov Report
@@ Coverage Diff @@
## main #396 +/- ##
==========================================
- Coverage 97.77% 97.76% -0.02%
==========================================
Files 42 42
Lines 10163 10243 +80
==========================================
+ Hits 9937 10014 +77
- Misses 226 229 +3
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
WalkthroughThe changes primarily focus on refactoring the Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Files selected for processing (1)
- contracts/okp4-cognitarium/src/contract.rs (8 hunks)
Additional comments (Suppressed): 7
contracts/okp4-cognitarium/src/contract.rs (7)
49-59: The import list in the
execute
module has been updated. TheSelectItem
,SimpleWhereCondition
,WhereCondition
, andHashSet
are no longer imported, whileDataFormat
,Prefix
,TriplePattern
,WhereClause
,PrefixMap
,TripleReader
,HasCachedNamespaces
, andStoreEngine
are newly imported. Ensure these changes are intentional and do not affect other parts of the code.92-102: The logic for creating
patterns
andvariables
has been refactored to use utility functionsas_triple_patterns
andas_select_veriables
from theutil
module. This improves code readability and maintainability.106-113: The logic for creating
atoms
has been refactored to use the utility functionas_atoms_result
from theutil
module. This improves code readability and maintainability.139-147: The import list in the
query
module has been updated. TheConstructQuery
,DescribeQuery
,DescribeResponse
,Node
,SelectItem
,SelectQuery
,SelectResponse
,SimpleWhereCondition
,StoreResponse
,TriplePattern
,Value
,VarOrNamedNode
,VarOrNode
,VarOrNodeOrLiteral
,WhereCondition
,PlanBuilder
,QueryEngine
,rdf
,Atom
,PrefixMap
, andTripleWriter
are newly imported. Ensure these changes are intentional and do not affect other parts of the code.284-336: A new function
construct
has been added to handle theConstruct
query. This function builds a plan, executes it, and writes the results to aTripleWriter
. The logic for creatingpatterns
,variables
, andatoms
has been refactored to use utility functions from theutil
module. This improves code readability and maintainability.339-385: A new
util
module has been added to house utility functionsas_select_veriables
,as_triple_patterns
, andas_atoms_result
. This improves code modularity and maintainability.1894-1953: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [1894-1988]
The test
proper_construct
has been updated to reflect the changes in theconstruct
function. Ensure the test cases cover all possible scenarios and edge cases.
@amimart I've done the minimum required for the implementation of the feature. The test coverage has decreased due to an error case not tested but difficult to test. I believe we can accept this state. |
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.
Looks good thx :)
Finalize #327 by implementing the
CONSTRUCT
query over the triple store in thecognitarium
smart contract, allowing to retrieve a set of triples serialized in a specific format (turtle
,rdf/xml
, ...).Summary by CodeRabbit