-
Notifications
You must be signed in to change notification settings - Fork 72
Review TypeQL reference to ensure it is up to date #980
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
Review TypeQL reference to ensure it is up to date #980
Conversation
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.
Flag stuff to that needs to be done for myself
@@ -3,7 +3,7 @@ | |||
This reference covers the usage of patterns in TypeQL. | |||
|
|||
== Scopes and operations | |||
|
|||
// TODO: Must update. |
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.
TODO: This is actually the ideal state but I'm not sure we'll ever implement it.
delete ( <variable> | has <variable> of <variable> | links ( <variable> [ , ... ] ) of <variable> ); [ ... ] | ||
delete | ||
( <variable> | has <variable> of <variable> | links ( <variable> [ , ... ] ) of <variable> ); | ||
[ ... ] |
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.
Is this better or worse?
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.
neither
@@ -13,7 +13,7 @@ match <pattern> | |||
where `<pattern>` denotes a valid xref:{page-version}@reference::typeql/patterns/index.adoc[pattern]. | |||
|
|||
== Behavior | |||
|
|||
// TODO: This should true for all pipelines. Why have it here? |
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.
If we can say this, we don't need to akwardly mention that update & delete can't be the first stage in the pipelines.
@@ -1,22 +1,26 @@ | |||
= With stage |
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.
I don't like calling it a stage if it's not in the pipeline.
550300d
to
ea54a07
Compare
@@ -43,6 +43,8 @@ type signature `... -> { A, B }` | |||
returns stream `{ $a, $b }` | |||
|=== | |||
|
|||
// TODO: Compare to rules |
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.
TODO
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.
Comments & approve
@@ -20,8 +20,7 @@ The `@abstract` annotation does not accept any arguments. | |||
|
|||
// tag::description[] | |||
When defined for a type, the `@abstract` annotation enforces the `abstract` constraint, making the type abstract. | |||
An abstract type cannot be a direct type for an instance. | |||
Thus, a concrete subtype is required for instances creation, and an abstract type can be used as a query target to retrieve information about its subtypes. | |||
An abstract type cannot be instantiated. but can be used in a query (e.g. in an `isa` constraint to refer to all its subtypes). |
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.
An abstract type cannot be instantiated. but can be used in a query (e.g. in an `isa` constraint to refer to all its subtypes). | |
An abstract type cannot be instantiated, but can be used in a query (e.g., in an `isa` constraint to refer to all its supertypes). |
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.
Subtypes, no?
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.
"in a constraint to refer to all its subtypes" is wrong, you don't refer to subtypes of anything through isa
. If you want your idea of referencing abstract types through concrete subtypes to be expressed, we need to find another sentence
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.
At least fix the ,
/ .
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.
Reworked. Check again pls?
|
||
// [,typeql] |
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.
What are you going to do with these commented out things?
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.
I can either keep them around, or remove them with a commit SHA saying "This commit actually refers to the other behaviour"
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.
Either remove or move or put a huge explicit todo
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.
Removed and replaced with a comment
Pattern comprise statements containing variables. Given a pattern, the *scope* of a variable is: | ||
|
||
* the block `{ ... }` in which variable appears at top-level (i.e., not nested in further `{...}`) but it does not appear outside of the block, | ||
- Exceptionally, if the variable appears in all branches of a disjunction, it counts as appearing in the parent conjunction. |
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.
I don't really understand the structure of this -
point with a full sentence "Exceptionally, .... ." splitting a bullet-point list of *
written in lowercase (naturally)
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.
I don't really know where to fit it.
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.
Not here or not this way at least... it's currently read as:
But it does not appear outside of the block, Exceptionaly, ...., it counts as appearing in the parent conjunction. or, the entire...
delete ( <variable> | has <variable> of <variable> | links ( <variable> [ , ... ] ) of <variable> ); [ ... ] | ||
delete | ||
( <variable> | has <variable> of <variable> | links ( <variable> [ , ... ] ) of <variable> ); | ||
[ ... ] |
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.
neither
@@ -1,6 +1,101 @@ | |||
= Optionals | |||
|
|||
Optional patterns can be used in `match` stages to optionally match a pattern, | |||
or in `insert` stages to insert a pattern *if* all the variables involved are bound. |
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.
insert or delete stages
[NOTE] | ||
==== | ||
Coming soon. | ||
Optional patterns are banned in `put` stages. |
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.
TBH i still have to think about this, but yah probably
Goal
Updates to TypeQL reference pages
Implementation