Comments (4)
The tree of queries is used to generate paths and paths lead to components.
For a fragment, its paths are the paths of its children prefixed by the child index
paths_some_fragment(p) :- paths_child_0(p'), append([0], p', p)
...
paths_some_fragment(p) :- paths_child_N(p'), append([N], p', p)
from enlivez.
For a for, its paths are the paths of its children prefixed by the child key
paths_some_for(p) :- query_of_this_for(a_0, ..., a_N), paths_this_body(p'), append([a_k_0, .. a_k_M], p', p)
Ok this shows up deficiencies in my above notation: some arguments ahave to be passed to the body.
from enlivez.
paths_node(self, p) :- paths_node_for1(self, p)
paths_node_for1(self, p) :- datom(self, :node/name, _), path_node_for2(self, p'), append([true], p', p)
paths_node_for2(self, p) :- datom(self, :node/children, child), paths_node(child, p'), append([child], p', p)
Replacing query trees by rules sounds like an option; the sue of the impure append may cause trouble if there's a cycle in data.
from enlivez.
implemented
from enlivez.
Related Issues (20)
- Day #10
- Day #11
- Day #12 and #13
- Day #14 HOT 2
- TODOs HOT 1
- Days #15 #16 #17
- Unstub derivatives
- Unstub DOM
- Clean for-component
- Allow expressions in sort key HOT 1
- Less awkward predicates HOT 1
- `:state` maps shouldn't be query maps HOT 2
- Is `:state` needed at all?
- Collapsing empty sections
- aggregations
- lifting ors HOT 3
- Implementing rules HOT 5
- Relational expressions HOT 2
- Handlers and activations HOT 1
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 enlivez.