Comments (2)
What you are asking for is infinite relations: as a
and b
are bindings, the relation represented by range
must be (at least conceptually) infinite. This has been studied in the academic literature as an extension to Datalog, but I am not aware of any practical Datalog implementation that supports it.
However, writing it in the following way is perfectly acceptable in CozoScript:
range[x] := x = $lower
range[x] := range[y], x = y + 1, x <= $upper
?[x] := range[x]
and at query time you can pass in $lower and $upper as parameters. Does this work for you?
from cozo.
I think it will work for my use case, yes.
Thanks for the explanation, I will look up infinite relations since now I am curious about them.
from cozo.
Related Issues (20)
- Can a chained query access a preceding query's return relation? HOT 7
- The CLA action seems to run on every comment. HOT 5
- unexpected error of function `trim_start` HOT 4
- Odd index creation parsing HOT 4
- Filters must be a list of filters - bug on python bindings HOT 2
- Unexpected result of `ge` on `-0.0` and `0.0` under magic rewrite HOT 10
- CozoDB unexpected hang HOT 2
- SSE APIs documentation HOT 3
- How to optimize the speed of hnsw vector index creation? HOT 1
- Crash in documentation code HOT 1
- Missing documentation on `$` prefix for parameters HOT 11
- "Corrupted index" error when using the `bind_vector` option in hnsw index search HOT 5
- Cannot drop FTS index, it says it can't find it HOT 1
- How to start server on Windows? HOT 1
- SQL to Cozoscript mapping
- Can I uses embeddings for similarity search? HOT 1
- Review & comment on CozoDB tutorial/overview HOT 14
- Make Expr::eval_to_const public for FixedRule. HOT 1
- cozo-node - add support for BigInt
- Undirected KShortestPathYen does not produce results but ShortestPathDijkstra does 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 cozo.