Comments (2)
This is brilliant, but can it be extended so Fetch statements can also be bound to a single name and parametrised?
The aim is to collapse a Fetch statement into a single name, with parameters, so it can be used interactively!!!
REASON: Fields like cybersecurity have composite Entities with many optional sub-parts, for example consider the basic File object, with its 10 optional sub-objects.
The strength of TypeQL is that it can handle this intricacy with ease.
The weakness of TypeQL is that you can't easily handle all of these optional variations interactively. Class hierarchies can reduce query complexity in the match statement, but you need to know which optional variations your desired object contains upfront. Fetch can handle all of this, since it is quite clever, but the downside is the statement will be very long, as the variations are described sequentially.
Once query intricacy passes a certain point (e.g. 5-10 lines), it becomes impractical interactively for average users.
What we need is a means of treating the Fetch statement in the same ways as the function, so it can be bound to a single name, parametrised, and used within other statements, particularly if it could be case-specific. The ideal would be the use of the lower case for the top-level entity (e.g. file), and the title case for the composite object's pre-registered Fetch statement (e.g. File).
Then TypeQL could really become very powerful for interactive use, since currently it is too verbose to handle more intricate domains. Currently we have to use a higher level query language for our User Interfaces, and then down-transpile to TypeQL. It would be brilliant if we could surface TypeQL to users with composite objects, bound to single names.
from typedb.
In case it helps, I packed some ideas around functions in the Functions section in my wishlist for 3.0
#6945
from typedb.
Related Issues (20)
- Some aggregates do not handle common edge cases correctly
- Matching no types to the right from `isa` throws an error HOT 1
- Matching by role type without scope incorrectly rejects query
- TypeDB 3.0: remove sessions in favor of 3 transaction types
- TypeDB 3.0: drop Concept API in favor of enhanced TypeQL HOT 1
- TypeDB 3.0: cascading deletes
- TypeDB 3.0: default dependent attributes
- TypeDB 3.0: enumerated value restrictions HOT 1
- TypeDB 3.0: struct value types HOT 3
- AttributeEntity HOT 1
- TypeDB 3.0: list attribute ownerships and ownership defaults
- TypeDB 3.0: list role players and changes to standard role definitions HOT 2
- TypeDB 3.0: compound keys and role players as keys
- Create a Cypher to TypeQL converter
- Inferred relation ID should have a constant ID across multiple queries HOT 1
- TypeDB 3.0: all query clauses are chainable streaming operations
- Wrong and inconsistent query results with inference enabled
- TypeDB has troubles cancelling active queries HOT 2
- During reasoning, nested patterns are not correctly bound if the variable skips a level 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 typedb.