Comments (9)
As was stated in the vaticle/typedb#3281 (possible duplicate but in TypeDB repository), we can
Use Concept API, calling transaction.logic().getRule(label) or transaction.logic().getRules()
from typeql.
@izmalk Being able to query rules and see their dependencies on other rules would also be beneficial. I was talking about this with @tomassabat in the context of rules debugging where it's currently hard to assess the which rules get triggered from a particular query when there are multiple rules involved.
from typeql.
@izmalk Being able to query rules and see their dependencies on other rules would also be beneficial.
I'm not sure what are the dependencies on other rules. Do you mean rule interaction via inferred data?
it's currently hard to assess the which rules get triggered from a particular query when there are multiple rules involved.
But we can do that with an explanation option enabled. Did you try something like that: https://github.com/izmalk/typedb_test_queries/blob/main/all-queries.py#L176 ?
It's sometimes tricky to read the conclusion part of the explanation but I can't see any better solution for now. Do you?
from typeql.
I think @mathieuisabel is talking about showing the schema-level rule interaction graph, not the exact data-layer explanations, right?
from typeql.
That would be correct @flyingsilverfin . Here's probably a poor example that might give an idea:
Also in the same line of thought for debugging purposes, I remembered James showing me at some point a visual representation of the query plan (which was pretty intense). I don't know if there's a way to see that to help troubleshooting situations where rules are getting triggered unnecessarily due to common mistakes (i.e. not constraining types correctly).
Bottom line, the end game is figuring why queries are not performing in certain situations. i.e. It's tough to assess whether the query plan is ok without manually figuring out everything the query references.
from typeql.
That would be correct @flyingsilverfin . Here's probably a poor example that might give an idea:
Nice. But that seems to be out of the scope of this particular issue. Can you create a separate issue?
from typeql.
@izmalk Just to be sure, you're referring to the query plan piece specifically for the new issue? The dependency graph would still be in scope as you would want to be able to query rules for that kind of output.
from typeql.
@izmalk Just to be sure, you're referring to the query plan piece specifically for the new issue? The dependency graph would still be in scope as you would want to be able to query rules for that kind of output.
I was referring to the dependency graph. While these features can be connected, even dependent on each other, I think they are different features and might have a different priority/deadline/author. The original feature only requests to be able to retrieve rules from a schema.
from typeql.
Related to vaticle/typedb#3281
from typeql.
Related Issues (20)
- Allow multiple type constraints where permitted by the schema
- Common: error enum generator should create structures with named fields instead of tuples
- Attribute value restrictions HOT 2
- Convert regex value constraint into annotation
- Role names of a relation cannot be reused in its sub-relations via override HOT 8
- Allow nested negation and universal quantification in rules HOT 3
- Allow binding of ownerships to anonymous variables in query patterns
- Ignoring repeated constraints
- Support modifiers (at least the limit) in all type of queries HOT 3
- Using standard form for numeric literals throws an error when parsed HOT 5
- [Feature Request] More operators and basic functions HOT 1
- Make annotated constraints to apply to subtypes HOT 4
- Allow negations and disjunctions without an exterior binding
- Unary negation
- Factor out typedb-common and typedb-proc-macro crates
- Sanitize rust macros to avoid forcing user's environment
- Give relation and value constraints explicit keywords
- Add deployment tests for Cargo and Pip snapshots
- Introduce a syntax element to explicitly end a query string
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typeql.